From DONOTREPLY at icculus.org Sun Jul 10 05:41:57 2005 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 10 Jul 2005 05:41:57 -0400 Subject: r121 - trunk/src Message-ID: <20050710094157.25339.qmail@icculus.org> Author: jonas Date: 2005-07-10 05:41:56 -0400 (Sun, 10 Jul 2005) New Revision: 121 Modified: trunk/src/SDL_rotozoom.h trunk/src/animation.h trunk/src/characters_common.h trunk/src/common.h trunk/src/events.h trunk/src/font.h trunk/src/gfxeng.h trunk/src/imgcache.h trunk/src/input.h trunk/src/menu.h trunk/src/monsters_common.h trunk/src/objectpools.h trunk/src/objects_common.h trunk/src/physics.h trunk/src/players_common.h trunk/src/scenario.h trunk/src/sfxeng.h trunk/src/sndcache.h trunk/src/weapons.h Log: support g++ up to version 4.0.1, fixed a major naming bug (_MAP_H is reserved) Modified: trunk/src/SDL_rotozoom.h =================================================================== --- trunk/src/SDL_rotozoom.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/SDL_rotozoom.h 2005-07-10 09:41:56 UTC (rev 121) @@ -5,8 +5,8 @@ * */ -#ifndef _SDL_rotozoom_h -#define _SDL_rotozoom_h +#ifndef DEF_SDL_ROTOZOOM_H +#define DEF_SDL_ROTOZOOM_H #ifndef M_PI #define M_PI 3.141592654 Modified: trunk/src/animation.h =================================================================== --- trunk/src/animation.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/animation.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _ANIMATION_H -#define _ANIMATION_H 1 +#ifndef DEF_ANIMATION_H +#define DEF_ANIMATION_H 1 /** \brief A container for frames. Modified: trunk/src/characters_common.h =================================================================== --- trunk/src/characters_common.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/characters_common.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _CHARACTERS_COMMON_H -#define _CHARACTERS_COMMON_H 1 +#ifndef DEF_CHARACTERS_COMMON_H +#define DEF_CHARACTERS_COMMON_H 1 #include "weapons.h" #include "objects_common.h" Modified: trunk/src/common.h =================================================================== --- trunk/src/common.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/common.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _COMMON_H -#define _COMMON_H 1 +#ifndef DEF_COMMON_H +#define DEF_COMMON_H 1 /// Common header file /// Modified: trunk/src/events.h =================================================================== --- trunk/src/events.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/events.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _EVENTS_H -#define _EVENTS_H 1 +#ifndef DEF_EVENTS_H +#define DEF_EVENTS_H 1 #define EV_DELAY 0x00000001 #define EV_START 0x00000002 Modified: trunk/src/font.h =================================================================== --- trunk/src/font.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/font.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _FONT_H -#define _FONT_H 1 +#ifndef DEF_FONT_H +#define DEF_FONT_H 1 /* Copyright (C) 2003 Matthias Braun Modified: trunk/src/gfxeng.h =================================================================== --- trunk/src/gfxeng.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/gfxeng.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _GFXENG_H -#define _GFXENG_H 1 +#ifndef DEF_GFXENG_H +#define DEF_GFXENG_H 1 #define BAR_HEIGHT 138 #define ICON_SIZE 46 Modified: trunk/src/imgcache.h =================================================================== --- trunk/src/imgcache.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/imgcache.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _IMGCACHE_H -#define _IMGCACHE_H 1 +#ifndef DEF_IMGCACHE_H +#define DEF_IMGCACHE_H 1 /** \brief Caches images. Modified: trunk/src/input.h =================================================================== --- trunk/src/input.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/input.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _INPUT_H -#define _INPUT_H 1 +#ifndef DEF_INPUT_H +#define DEF_INPUT_H 1 /** \brief Handels keyboard events Modified: trunk/src/menu.h =================================================================== --- trunk/src/menu.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/menu.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _MENU_H -#define _MENU_H 1 +#ifndef DEF_MENU_H +#define DEF_MENU_H 1 /** \brief abstract menu base class Modified: trunk/src/monsters_common.h =================================================================== --- trunk/src/monsters_common.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/monsters_common.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _MONSTERS_COMMON_H -#define _MONSTERS_COMMON_H 1 +#ifndef DEF_MONSTERS_COMMON_H +#define DEF_MONSTERS_COMMON_H 1 #include "characters_common.h" Modified: trunk/src/objectpools.h =================================================================== --- trunk/src/objectpools.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/objectpools.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _OBJECTPOOLS_H -#define _OBJECTPOOLS_H 1 +#ifndef DEF_OBJECTPOOLS_H +#define DEF_OBJECTPOOLS_H 1 /** \brief Container for objects. Modified: trunk/src/objects_common.h =================================================================== --- trunk/src/objects_common.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/objects_common.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _OBJECTS_COMMON_H -#define _OBJECTS_COMMON_H 1 +#ifndef DEF_OBJECTS_COMMON_H +#define DEF_OBJECTS_COMMON_H 1 //Object types //dense types are the same as directions (that fact is beeing used) Modified: trunk/src/physics.h =================================================================== --- trunk/src/physics.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/physics.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _PHYSICS_H -#define _PHYSICS_H 1 +#ifndef DEF_PHYSICS_H +#define DEF_PHYSICS_H 1 /** \brief Updates all game states and animations, acts as a Mediator between objects Modified: trunk/src/players_common.h =================================================================== --- trunk/src/players_common.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/players_common.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _PLAYERS_COMMON_H -#define _PLAYERS_COMMON_H 1 +#ifndef DEF_PLAYERS_COMMON_H +#define DEF_PLAYERS_COMMON_H 1 #include "characters_common.h" Modified: trunk/src/scenario.h =================================================================== --- trunk/src/scenario.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/scenario.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _MAP_H -#define _MAP_H 1 +#ifndef DEF_SCENARIO_H +#define DEF_SCENARIO_H 1 /** \brief Scenario organization Modified: trunk/src/sfxeng.h =================================================================== --- trunk/src/sfxeng.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/sfxeng.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _SOUNDSENGINE_H -#define _SOUNDSENGINE_H 1 +#ifndef DEF_SOUNDSENGINE_H +#define DEF_SOUNDSENGINE_H 1 /** \brief Sounds engine Modified: trunk/src/sndcache.h =================================================================== --- trunk/src/sndcache.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/sndcache.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _SOUNDCACHE_H -#define _SOUNDCACHE_H 1 +#ifndef DEF_SOUNDCACHE_H +#define DEF_SOUNDCACHE_H 1 /** \brief Caches sounds. Modified: trunk/src/weapons.h =================================================================== --- trunk/src/weapons.h 2005-06-18 22:47:14 UTC (rev 120) +++ trunk/src/weapons.h 2005-07-10 09:41:56 UTC (rev 121) @@ -1,5 +1,5 @@ -#ifndef _WEAPONS_H -#define _WEAPONS_H 1 +#ifndef DEF_WEAPONS_H +#define DEF_WEAPONS_H 1 //normal hit #define W_STRIKE 0x00000001 From DONOTREPLY at icculus.org Sun Jul 10 06:01:26 2005 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 10 Jul 2005 06:01:26 -0400 Subject: r122 - in trunk: . src Message-ID: <20050710100126.26990.qmail@icculus.org> Author: jonas Date: 2005-07-10 06:01:26 -0400 (Sun, 10 Jul 2005) New Revision: 122 Modified: trunk/lost_penguins.conf trunk/src/common.h trunk/src/gfxeng.cpp trunk/src/lost_penguins.cpp trunk/src/menu.cpp Log: support automatically selected bpp Modified: trunk/lost_penguins.conf =================================================================== --- trunk/lost_penguins.conf 2005-07-10 09:41:56 UTC (rev 121) +++ trunk/lost_penguins.conf 2005-07-10 10:01:26 UTC (rev 122) @@ -4,4 +4,3 @@ full 0 width 1024 height 768 -bpp 16 Modified: trunk/src/common.h =================================================================== --- trunk/src/common.h 2005-07-10 09:41:56 UTC (rev 121) +++ trunk/src/common.h 2005-07-10 10:01:26 UTC (rev 122) @@ -100,7 +100,6 @@ struct Config { Uint16 width; Uint16 height; - Uint8 bpp; bool full; Uint16 audio_format; int audio_rate; Modified: trunk/src/gfxeng.cpp =================================================================== --- trunk/src/gfxeng.cpp 2005-07-10 09:41:56 UTC (rev 121) +++ trunk/src/gfxeng.cpp 2005-07-10 10:01:26 UTC (rev 122) @@ -95,7 +95,7 @@ if (fullscreen) vflags|=SDL_FULLSCREEN; else vflags&=~SDL_FULLSCREEN; - if ((screen=SDL_SetVideoMode(width,height,config.bpp,vflags)) != NULL) { + if ((screen=SDL_SetVideoMode(width,height,0,vflags)) != NULL) { } else { cout << "Couldn't set VideoMode: " << SDL_GetError() << endl; quitGame(-1); Modified: trunk/src/lost_penguins.cpp =================================================================== --- trunk/src/lost_penguins.cpp 2005-07-10 09:41:56 UTC (rev 121) +++ trunk/src/lost_penguins.cpp 2005-07-10 10:01:26 UTC (rev 122) @@ -89,7 +89,6 @@ //default values config.width=640; config.height=480; - config.bpp=16; config.full=false; config.audio_rate = MIX_DEFAULT_FREQUENCY; config.audio_format = MIX_DEFAULT_FORMAT; @@ -133,8 +132,6 @@ config.width=atoi(arg1.c_str()); } else if (option=="height") { config.height=atoi(arg1.c_str()); - } else if (option=="bpp") { - config.bpp=atoi(arg1.c_str()); } else if (option=="full") { if (arg1=="1") config.full=true; else config.full=false; @@ -157,9 +154,6 @@ } else if ( strcmp(argv[i], "-height") == 0 || strcmp(argv[i], "-h") == 0) { config.height=atoi(argv[i+1]); i++; - } else if ( strcmp(argv[i], "-bpp") == 0 ) { - config.bpp=atoi(argv[i+1]); - i++; } else if ( strcmp(argv[i], "-full") == 0 || strcmp(argv[i], "-fs") == 0) { config.full=SDL_FULLSCREEN; } else if ( strcmp(argv[i], "-map") == 0 ) { @@ -176,7 +170,6 @@ cout << "Usage: lost_penguins [OPTIONS]\n\n"; cout << " -w, -width Changes resolution (width) of game. Default: 640\n"; cout << " -h, -height Changes resolution (height) of game. Default: 480\n"; - cout << " -bpp Specifies color depth (bpp) of screen. Default: 16\n"; cout << " -fs, -full Enable fullscreen. Default: disabled\n"; cout << " -map Load specified map from data dir. Default: map1\n"; cout << " -h, --help Show this text \n"; Modified: trunk/src/menu.cpp =================================================================== --- trunk/src/menu.cpp 2005-07-10 09:41:56 UTC (rev 121) +++ trunk/src/menu.cpp 2005-07-10 10:01:26 UTC (rev 122) @@ -271,7 +271,7 @@ entries[0]="Fullscreen: " + string((gfxeng->fullscreen) ? "ON" : "OFF"); entries[1]="Show FPS: "+string((gfxeng->show_fps) ? "ON" : "OFF"); entries[2]="Show Player Bar: "+string((gfxeng->show_bar) ? "ON" : "OFF"); - entries[3]="Video settings: [" + string(driver_name) + "] " + itos(gfxeng->screen->w) + " x " + itos(gfxeng->screen->h) + " (" + itos(config.bpp) + " bpp)"; + entries[3]="Video settings: [" + string(driver_name) + "] " + itos(gfxeng->screen->w) + " x " + itos(gfxeng->screen->h); /* entries.push_back(""); From DONOTREPLY at icculus.org Sun Jul 10 06:09:34 2005 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 10 Jul 2005 06:09:34 -0400 Subject: r123 - trunk/tools Message-ID: <20050710100934.27937.qmail@icculus.org> Author: jonas Date: 2005-07-10 06:09:34 -0400 (Sun, 10 Jul 2005) New Revision: 123 Modified: trunk/tools/lvl2magick.c Log: we need a va_list for ImageMagick... Modified: trunk/tools/lvl2magick.c =================================================================== --- trunk/tools/lvl2magick.c 2005-07-10 10:01:26 UTC (rev 122) +++ trunk/tools/lvl2magick.c 2005-07-10 10:09:34 UTC (rev 123) @@ -13,6 +13,7 @@ #include #include #include +#include #include #define EXIT(a) { errno=(a); goto end; }