Advanced Strategic Command
|
The IO for many basic classes and structurs of ACS. More...
#include <cstdlib>
#include <cstring>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fstream>
#include <boost/regex.hpp>
#include "global.h"
#include "typen.h"
#include "basegfx.h"
#include "misc.h"
#include "sgstream.h"
#include "basestrm.h"
#include "palette.h"
#include "gameoptions.h"
Go to the source code of this file.
Functions | |
void | loadpalette (void) |
ASCString | resolvePath (ASCString path) |
bool | makeDirectory (const ASCString &path) |
ASCString | getDirectory (ASCString filename) |
ASCString | getConfigFileName () |
int | readgameoptions (const ASCString &filename) |
bool | writegameoptions (ASCString configFileName) |
void | checkFileLoadability (const ASCString &filename) |
void | initFileIO (const ASCString &configFileName, int skipChecks) |
void | versionError (const ASCString &filename, const ASCString &location) |
Variables | |
const char * | asc_EnvironmentName = "ASC_CONFIGFILE" |
int | dataVersion = 0 |
const int | object_version = 1 |
const int | technology_version = 1 |
The IO for many basic classes and structurs of ACS.
These routines are gradually being moved to become methods of their classes
Definition in file sgstream.cpp.
void checkFileLoadability | ( | const ASCString & | filename | ) |
Definition at line 440 of file sgstream.cpp.
References exist(), fatalError(), getSearchPath(), getSearchPathNum(), CGameOptions::Instance(), tnstream::reading, tnstream::readUint8(), CGameOptions::setChanged(), and writegameoptions().
Referenced by initFileIO().
ASCString getConfigFileName | ( | ) |
Definition at line 361 of file sgstream.cpp.
Referenced by initFileIO(), and showSearchPath().
Definition at line 170 of file sgstream.cpp.
References directoryExist().
Referenced by initFileIO(), and ConfigurationFileLocatorCore::setExecutableLocation().
void initFileIO | ( | const ASCString & | configFileName, |
int | skipChecks | ||
) |
Definition at line 475 of file sgstream.cpp.
References addSearchPath(), appendbackslash(), checkFileLoadability(), displayLogMessage(), fatalError(), getConfigFileName(), getDirectory(), tfileerror::getFileName(), CGameOptions::getSearchPath(), getSearchPath(), CGameOptions::getSearchPathNum(), CGameOptions::Instance(), isPathRelative(), opencontainer(), readgameoptions(), and resolvePath().
Referenced by main().
void loadpalette | ( | void | ) |
Definition at line 67 of file sgstream.cpp.
References txlattables::a, asc_paletteloaded, colormixbuf, colormixbufchar, displayLogMessage(), generategrayxlattable(), malloc(), pal, tn_c_lzw_filestream::readdata(), tnstream::reading, txlattables::xl, xlatpictgraytable, and xlattables.
Referenced by gamethread(), loadcursor(), loaddata(), GraphicSetManager_Base::loadData(), mapeditorMainThread(), and runTester().
bool makeDirectory | ( | const ASCString & | path | ) |
Definition at line 146 of file sgstream.cpp.
References constructFileName(), createDirectory(), directoryExist(), and resolvePath().
Referenced by readgameoptions(), and writegameoptions().
int readgameoptions | ( | const ASCString & | filename | ) |
Definition at line 372 of file sgstream.cpp.
References displayLogMessage(), exist(), fatalError(), tfileerror::getFileName(), ASCmsgException::getMessage(), getSearchPath(), CGameOptions::Instance(), CGameOptions::load(), makeDirectory(), CGameOptions::setChanged(), warningMessage(), and writegameoptions().
Referenced by checkbi3dir(), and initFileIO().
Definition at line 113 of file sgstream.cpp.
Referenced by ConfigurationFileLocatorCore::getConfigFileName(), initFileIO(), makeDirectory(), and writegameoptions().
Definition at line 517 of file sgstream.cpp.
References fatalError().
bool writegameoptions | ( | ASCString | configFileName | ) |
Definition at line 418 of file sgstream.cpp.
References extractPath(), CGameOptions::Instance(), makeDirectory(), resolvePath(), and CGameOptions::save().
Referenced by checkFileLoadability(), main(), and readgameoptions().
const char* asc_EnvironmentName = "ASC_CONFIGFILE" |
Definition at line 58 of file sgstream.cpp.
Referenced by ConfigurationFileLocatorCore::getConfigFileName().
int dataVersion = 0 |
Definition at line 59 of file sgstream.cpp.
const int object_version = 1 |
Definition at line 61 of file sgstream.cpp.
const int technology_version = 1 |
Definition at line 62 of file sgstream.cpp.