/* Build Game Customization Suite Copyright (c) 1999, 2004 Jonathon Fowler 15 September 2004 This is the source code to BCS. It was written in Borland Turbo C++ for DOS and [was] a 16bit real-mode DOS application. I'm releasing the code because I have no reason to keep it a secret. Some folks might find it interesting. BTW, you can use this code for any purpose you want. Jonathon Fowler jf@jonof.id.au http://www.jonof.id.au/ */ /* NOTE: This program does not fall under BUILDLIC. */ // DOS 16-bit real mode UI --> portable command line conversion by Hendricks266 #include "compat.h" const char APP_NAME[] = "Build Game Customization Suite v0.2-EDuke32"; const char APP_CPRT[] = "Copyright (c) 1999, 2004 Jonathon Fowler"; int bsExtractD3DPalette(int, const char*); int bsUpdateD3DPalette(int, const char*); int bsExtractPalette(const char*); int bsUpdatePalette(const char*); const char *MainMenuStrings[] = { "Options:", "Extract Duke Nukem 3D-specific Palettes", "Update Duke Nukem 3D-specific Palettes", "Extract Build Game Palette", "Update Build Game Palette" }; const char *D3DMenuStrings[] = { "Sub-Option: Duke Nukem 3D-specific Palettes:", "Water Palette", "Night-Vision Palette", "Title Screen Palette", "3D Realms Logo Palette", "Episode 1 Ending Animation Palette" }; const char *pal_deffn[] = { "GAME.PAL", "D3DWATER.PAL", "D3DNVIS.PAL", "D3DTITLE.PAL", "D3D3DR.PAL", "D3DEP1.PAL" }; int main(const int32_t argc, const char **argv) { int opt = 0, d3dpal = 0, k = 0; int16_t i = 1; char const * filename = NULL; // This is only a pointer. Do not strcpy to it. char const * c = NULL; Bprintf("%s\n%s\n\n", APP_NAME, APP_CPRT); if (argc > 1) { opt = Bstrtol(argv[i++],NULL,10); if ((opt == 1 || opt == 2) && i < argc) // Duke-specific palettes d3dpal = Bstrtol(argv[i++],NULL,10); while (i < argc) { c = (char const *)argv[i]; if ((*c == '-') #ifdef _WIN32 || (*c == '/') #endif ) { ++c; if (!Bstrcasecmp(c,"f")) { if (argc > i+1) filename = (char const *)argv[++i]; ++i; continue; } } ++i; } } if (opt < 1 || opt > 4 || (opt < 3 && (d3dpal < 1 || d3dpal > 5))) { Bprintf("usage: %s