/*========================================================================= MAIN.CPP Author: Gary Liddon @ Fareham Created: 3rd March 1999 Project: Theme Park World Playstation Purpose: Main module for Folio Copyright (c) 1998 G R Liddon ===========================================================================*/ /*---------------------------------------------------------------------- Includes -------- */ /* Std Lib ------- */ #include #include #include #include #include #include /* Glib ---- */ #include #include #include #include /* tplib ---- */ #include #include #include /* local ---- */ #include "kanjiclass.h" /*---------------------------------------------------------------------- Version info 1.0 - 1.2 GL Initial working version 1.3 GL Longer line length (now 4096) 1.4 GL Added comments to file 1.5 GL Changed it so that \n are now returns 1.6 GL Added a slew of stuff to handle kanji 1.7 GL Chganged format of kanji table 1.8 GL Removed bug with kanji frame lookup 1.9 GL added -s so user can specify the size of output font 1.91 GL Transtext also writes out an ID text file (id.dat) 1.92 GL fixed bug with output kanji table being too short /*---------------------------------------------------------------------- /*---------------------------------------------------------------------- Tyepdefs && Defines ------------------- */ using namespace std; /*---------------------------------------------------------------------- Structure defintions -------------------- */ /*---------------------------------------------------------------------- Function Prototypes ------------------- */ static void usage(void); static char * cycleCommands(char *String,int Num); /*---------------------------------------------------------------------- Vars ---- */ static const float version=1.92f; static GString fileWithTranslations; static GString headerFile; static GString outDir; static GString g_japKanjiFile; static GString g_japLbmDir; static GString g_englishLbmsDir; static GString g_japLbmListFile; static int g_fontSize=0; /*---------------------------------------------------------------------- Data ---- */ /*---------------------------------------------------------------------- Function: Purpose: Params: Returns: ---------------------------------------------------------------------- */ int main(int argc, char ** argv) { cerr<<"GRLiddon() TRANSTEXT text translation stuphh "<getNumOfStrings(); for (int f=0;fgetText(f)); if (g_japLbmDir) { if (g_fontSize >=0 && g_fontSize < 3) kClass.saveKanjiLbms(g_japLbmDir,KanjiClass::KanjiFontSize(g_fontSize)); else GObject::Error(ERR_FATAL,"illegal font size parameter"); } if (g_japKanjiFile) kClass.saveKanjiTable(g_japKanjiFile); if (g_japLbmListFile && g_japLbmDir) kClass.saveKanjiLbmNames(g_japLbmDir,g_japLbmListFile); cout<<"text uses "< [ switches.. ]\n"; cout<<"Switches:\n"< Dir to save translation strings to"< Dir write ascii images to"< File to save lang enums to"< Dir to save kanji lbms to"< File to save kanji table to"< File to save list of saved lbms to"< Set the size of the output font"<