aboutsummaryrefslogtreecommitdiff
path: root/tools/skycpt/AsciiCptCompile.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2005-11-04 00:42:30 +0000
committerRobert Göffringmann2005-11-04 00:42:30 +0000
commitcbe5f667c203de9afc52b892eb19431322537884 (patch)
tree873027a997656d9b80c164b3d8604dad1d35a504 /tools/skycpt/AsciiCptCompile.cpp
parent4a2bbb0e523c07915ff1eb3eac68bd3d6147a437 (diff)
downloadscummvm-rg350-cbe5f667c203de9afc52b892eb19431322537884.tar.gz
scummvm-rg350-cbe5f667c203de9afc52b892eb19431322537884.tar.bz2
scummvm-rg350-cbe5f667c203de9afc52b892eb19431322537884.zip
Changed the tool so it compiles with g++
svn-id: r19414
Diffstat (limited to 'tools/skycpt/AsciiCptCompile.cpp')
-rw-r--r--tools/skycpt/AsciiCptCompile.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/skycpt/AsciiCptCompile.cpp b/tools/skycpt/AsciiCptCompile.cpp
index dcfb38167d..9df29f8b44 100644
--- a/tools/skycpt/AsciiCptCompile.cpp
+++ b/tools/skycpt/AsciiCptCompile.cpp
@@ -18,8 +18,13 @@ typedef signed long int32;
void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *sve);
-int _tmain(int argc, _TCHAR* argv[])
+int main(int argc, char* argv[])
{
+ uint8 testBuf[4] = { 0x11, 0x22, 0x33, 0x44 };
+ if (*(uint32*)testBuf != 0x44332211) {
+ printf("Sorry, this program only works on little endian systems.\nGoodbye.\n");
+ return 0;
+ }
TextFile *cptDef = new TextFile("compact.txt");
FILE *inf = fopen("compact.txt", "r");
FILE *dbg = fopen("compact.dbg", "wb");