Mercurial > hg > demos > krapula
changeset 31:c7703611ea04
Update to match with engine changes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 04 Oct 2012 05:40:20 +0300 |
parents | f0e79fd6e720 |
children | 94c099530548 |
files | config.mak krapula.c |
diffstat | 2 files changed, 7 insertions(+), 74 deletions(-) [+] |
line wrap: on
line diff
--- a/config.mak Wed Oct 03 11:35:53 2012 +0300 +++ b/config.mak Thu Oct 04 05:40:20 2012 +0300 @@ -14,9 +14,9 @@ DM_USE_TREMOR=no -DMRES_PACKFS=yes -DMRES_STDIO=no -DMRES_MEMIO=no +DM_USE_PACKFS=yes +DM_USE_STDIO=no +DM_USE_MEMIO=no DM_GFX_TTF_TEXT=no
--- a/krapula.c Wed Oct 03 11:35:53 2012 +0300 +++ b/krapula.c Thu Oct 04 05:40:20 2012 +0300 @@ -3,61 +3,6 @@ #include <math.h> -DMOptArg optList[] = -{ - { 0, '?', "help", "Show this help", OPT_NONE }, - { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, - { 2, 'f', "fs", "Fullscreen", OPT_NONE }, -#ifdef DM_DEBUG - { 3, 'd', "debug", "Debug mode", OPT_NONE }, -#endif -}; - -const int optListN = sizeof(optList) / sizeof(optList[0]); - - - -void argShowHelp() -{ - dmPrintBanner(stdout, dmProgName, "[options]"); - dmArgsPrintHelp(stdout, optList, optListN); -} - - -BOOL argHandleOpt(const int optN, char *optArg, char *currArg) -{ - (void) optArg; - - switch (optN) - { - case 0: - argShowHelp(); - exit(0); - break; - - case 1: - dmVerbosity++; - break; - - case 2: - engine.optVFlags |= SDL_FULLSCREEN; - break; - -#ifdef DM_DEBUG - case 3: - engine.optDebug = TRUE; - break; -#endif - - default: - dmError("Unknown option '%s'.\n", currArg); - return FALSE; - } - - return TRUE; -} - - #define DM_COLORS (256) void dmMakePalette(SDL_Surface *scr) @@ -383,9 +328,11 @@ SDL_Surface *nosfe[NOSFE_MAX - NOSFE_MIN + 1]; -int demoPreInit(int argc, char *argv[]) +int demoPreInit() { - dmInitProg("krapula", "Lauantai Aamun Krapula", "0.2", "(c) 2012 Anciat Prodz & TNSP", "PENIS."); + dmInitProg("krapula", + "Lauantai Aamun Krapula", + "0.2", "(c) 2012 Anciat Prodz & TNSP", "PENIS."); engine.optPackFilename = "orvellys.dat"; engine.optDataPath = NULL; @@ -399,20 +346,6 @@ engine.demoDuration = 150; #endif - if (!dmArgsProcess(argc, argv, optList, optListN, - argHandleOpt, NULL, FALSE)) - return DMERR_INIT_FAIL; - - dmPrint(0, "%s\n", dmProgDesc); - dmPrint(0, "TNSP simple demoengine initializing.\n"); - dmPrint(0, "%s\n", dmProgAuthor); -#ifdef DM_USE_TREMOR - dmPrint(0, "Using libSDL, Tremor Vorbis codec, zlib and modified stb_image.\n" -#else - dmPrint(0, "Using libSDL, zlib and modified stb_image.\n" -#endif - "See README.txt for more information.\n"); - return DMERR_OK; }