loadbi3.h File Reference

Loading Battle Isle 3 maps. The central BI3 map loading class is a straight conversion of Joerg Richter's code from his BI3 map editor. More...

#include "typen.h"
#include "sgstream.h"
#include "itemrepository.h"

Include dependency graph for loadbi3.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BI3TranslationTableLoader

Functions

void importbattleislemap (const ASCString &path, const ASCString &mapfilename, TerrainType::Weather *trrn, const ASCString &importTable, ASCString *errorOutput=NULL, bool __fakeMap=false)
 Imports a Battle Isle map.
void insertbattleislemap (int x, int y, const ASCString &path, const ASCString &mapfilename, const ASCString &importTable)
 Imports a Battle Isle map and inserts it into the current ASC map.
ASCString getbi3path ()
 returns the path to the BI3 installation
void setDefaultBI3ImportTranslationTable (const ASCString &filename)
 to prevent the appearnce of the dialog "choose import translation table" when running in batch mode, a default translation table can be specified
vector< ASCStringgetBI3ImportTables ()
 returns the names of the import tables that are available
int getterraintranslatenum (void)
int getobjectcontainertranslatenum (void)
const int * getterraintranslate (int pos)
const int * getobjectcontainertranslate (int pos)


Detailed Description

Loading Battle Isle 3 maps. The central BI3 map loading class is a straight conversion of Joerg Richter's code from his BI3 map editor.

Definition in file loadbi3.h.


Function Documentation

vector<ASCString> getBI3ImportTables (  ) 

returns the names of the import tables that are available

Definition at line 366 of file loadbi3.cpp.

References bi3ImportTables.

Referenced by ImportBI3MapDialog::ImportBI3MapDialog().

ASCString getbi3path (  ) 

returns the path to the BI3 installation

Definition at line 129 of file loadbi3.cpp.

References CGameOptions::BI3directory, and CGameOptions::Instance().

Referenced by getbipath().

const int* getobjectcontainertranslate ( int  pos  ) 

int getobjectcontainertranslatenum ( void   ) 

const int* getterraintranslate ( int  pos  ) 

int getterraintranslatenum ( void   ) 

void importbattleislemap ( const ASCString path,
const ASCString mapfilename,
TerrainType::Weather trrn,
const ASCString importTable,
ASCString errorOutput = NULL,
bool  __fakeMap = false 
)

Imports a Battle Isle map.

Parameters:
path the path to the BI3 installation
mapfilename The name of the map
trrn The terrain that is used for all fields which are unknown to ASC
errorOutput Pointer to a string which will store all warning and error messages from the import. May be NULL.
__fakeMap If true ASC tries to make the map look like the Battle Isle map, generating new ObjectType and TerrainType instances if necessary. This must not be used by any program other than map2pcx, since the maps can not be played. This is only used to generate the images of the Battle Isle Map Archive.

Definition at line 1663 of file loadbi3.cpp.

References tloadBImap::____fakeMap____(), findTable(), and tloadBImap::LoadFromFile().

Referenced by process_BI_map().

void insertbattleislemap ( int  x,
int  y,
const ASCString path,
const ASCString mapfilename,
const ASCString importTable 
)

Imports a Battle Isle map and inserts it into the current ASC map.

Parameters:
x The x coordinate of field where the upper left field of the BI map will be placed.
y The y coordinate of field where the upper left field of the BI map will be placed.
path the path to the BI3 installation
filename The name of the map

Definition at line 1685 of file loadbi3.cpp.

References findTable(), and tloadBImap::LoadFromFile().

void setDefaultBI3ImportTranslationTable ( const ASCString filename  ) 

to prevent the appearnce of the dialog "choose import translation table" when running in batch mode, a default translation table can be specified

Definition at line 1656 of file loadbi3.cpp.

References defaultImportTranslationTable.

Referenced by main().


Generated on Mon May 21 01:37:15 2012 for Advanced Strategic Command by  doxygen 1.5.1