Advanced Strategic Command
Classes | Functions
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. More...
 
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. More...
 
ASCString getbi3path ()
 returns the path to the BI3 installation More...
 
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 More...
 
vector< ASCStringgetBI3ImportTables ()
 returns the names of the import tables that are available More...
 
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.

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
paththe path to the BI3 installation
mapfilenameThe name of the map
trrnThe terrain that is used for all fields which are unknown to ASC
errorOutputPointer to a string which will store all warning and error messages from the import. May be NULL.
__fakeMapIf 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 1666 of file loadbi3.cpp.

References tloadBImap::____fakeMap____(), GameMap::_resourcemode, actmap, GameMap::cleartemps(), 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
xThe x coordinate of field where the upper left field of the BI map will be placed.
yThe y coordinate of field where the upper left field of the BI map will be placed.
paththe path to the BI3 installation
filenameThe name of the map

Definition at line 1688 of file loadbi3.cpp.

References GameMap::_resourcemode, actmap, GameMap::cleartemps(), 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 1659 of file loadbi3.cpp.

Referenced by main().