diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3aa745d99..63acf5dac 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20070929 +-------- +INSTALL.txt, README.txt, SConstruct, arch/sdl/digi_audio.c, arch/sdl/event.c, arch/sdl/gr.c, arch/sdl/joy.c, arch/sdl/key.c, main/config.c, main/game.c, main/kconfig.c, main/menu.c, main/newmenu.c, main/scores.c: Updated docs; Removed GP2X support since I won't support this device anymore + 20070928 -------- d1x.ini, include/args.h, main/args.c, main/gameseq.c, main/inferno.c, main/multi.c, main/newmenu.c, main/playsave.c: main/state.c: Implemented -use_players_dir diff --git a/INSTALL.txt b/INSTALL.txt index c6dbc466b..9a9bf96e5 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -28,12 +28,11 @@ Currently, the following variables are supported: 'sdl_only=1' don't include OpenGL, use SDL-only instead 'sdlmixer=1' (*NIX only) use SDL_Mixer for sound (includes external music support) 'shareware=1' build SHAREWARE version -'no_asm=1' don't use ASSEMBLER (only with sdl_only=1) +'asm=1' use ASSEMBLER code (only with sdl_only=1, requires NASM and x86) 'debug=1' build DEBUG binary which includes asserts, debugging output, cheats and more output 'profiler=1' do profiler build 'editor=1' build editor !EXPERIMENTAL! 'arm=1' compile for ARM architecture -'gp2x=1' compile for GP2X handheld ‘sdlmixer’ as well as ‘editor’ are currently *not* supported and may not work. @@ -45,7 +44,7 @@ scons If you wish to add additional commands, just add them to the scons command. Example: -scons sdl_only=1 no_asm=1 +scons sdl_only=1 asm=1 To install the compiled binary to your system (/usr/local/bin/), type (as root): diff --git a/README.txt b/README.txt index a7aabaa3d..1416a751a 100644 --- a/README.txt +++ b/README.txt @@ -13,7 +13,7 @@ I spend much time to improve the Sourcecode, tried to fix bugs in there and adde I hope you enjoy the game as you did when you played it the first time. -If you have something to say about my release, feel free to contact me at zico [at] unixboard [dot] de +If you have something to say about my release, feel free to contact me at zicodxx [at] yahoo [dot] de - zico 20070407 @@ -59,4 +59,4 @@ See COPYING.txt 4. Contact http://www.dxx-rebirth.de/ -zico [at] unixboard [dot] de +zicodxx [at] yahoo [dot] de diff --git a/SConstruct b/SConstruct index d32a9eb47..3c342581b 100755 --- a/SConstruct +++ b/SConstruct @@ -39,7 +39,6 @@ editor = int(ARGUMENTS.get('editor', 0)) shareware = int(ARGUMENTS.get('shareware', 0)) sdlmixer = int(ARGUMENTS.get('sdlmixer', 0)) arm = int(ARGUMENTS.get('arm', 0)) -gp2x = int(ARGUMENTS.get('gp2x', 0)) # general source files common_sources = [ @@ -363,23 +362,6 @@ else: libs = generic_libs lflags = '-L/usr/X11R6/lib' -# GP2X test env -if (gp2x == 1): - sdl_only = 1 - arm = 1 - sharepath = '' - env.Replace(CC = '/usr/local/gp2xdev/bin/gp2x-gcc') - env.Replace(CXX = '/usr/local/gp2xdev/bin/gp2x-g++') - env.Append(CPPDEFINES = ['GP2X']) - env.Append(CPPPATH = ['/usr/local/gp2xdev/include']) - #env.Append(CPPFLAGS = ' -ffast-math -fPIC -funroll-all-loops -fomit-frame-pointer -march=armv4t') # left for further optimisation/debugging - common_sources += ['main/clock.c'] - libs += ['pthread'] - lflags = '-static' - lpath = '/usr/local/gp2xdev/lib' -else: - lpath = '' - # arm architecture? if (arm == 1): asm = 0 @@ -451,7 +433,7 @@ print '\n' env.Append(CPPDEFINES = [('DESCENT_DATA_PATH', '\\"' + str(sharepath) + '\\"')]) # finally building program... -env.Program(target=str(target), source = common_sources, LIBS = libs, LINKFLAGS = str(lflags), LIBPATH = str(lpath)) +env.Program(target=str(target), source = common_sources, LIBS = libs, LINKFLAGS = str(lflags)) env.Install(BIN_DIR, str(target)) env.Alias('install', BIN_DIR) @@ -474,7 +456,6 @@ Help(PROGRAM_NAME + ', SConstruct file help:' + 'profiler=1' do profiler build 'editor=1' build editor !EXPERIMENTAL! 'arm=1' compile for ARM architecture - 'gp2x=1' compile for GP2X handheld Default values: """ + ' sharepath = ' + DATA_DIR + """ diff --git a/arch/sdl/digi_audio.c b/arch/sdl/digi_audio.c index 3a24d36fd..bf767facf 100644 --- a/arch/sdl/digi_audio.c +++ b/arch/sdl/digi_audio.c @@ -51,11 +51,7 @@ extern inline fix fixmul(fix x, fix y) { return do_fixmul(x,y); } //changed on 980905 by adb to increase number of concurrent sounds #define MAX_SOUND_SLOTS 32 //end changes by adb -#ifdef GP2X -#define SOUND_BUFFER_SIZE 64 -#else #define SOUND_BUFFER_SIZE 512 -#endif #define MIN_VOLUME 10 diff --git a/arch/sdl/event.c b/arch/sdl/event.c index 96dfc7fd7..3a4178c5a 100644 --- a/arch/sdl/event.c +++ b/arch/sdl/event.c @@ -15,12 +15,7 @@ #include -#ifdef GP2X -#include "gp2x.h" -extern void key_handler(SDL_JoyButtonEvent *event); -#else extern void key_handler(SDL_KeyboardEvent *event); -#endif extern void mouse_button_handler(SDL_MouseButtonEvent *mbe); extern void mouse_motion_handler(SDL_MouseMotionEvent *mme); extern void joy_button_handler(SDL_JoyButtonEvent *jbe); @@ -29,7 +24,6 @@ extern void joy_axis_handler(SDL_JoyAxisEvent *jae); static int initialised=0; -#ifndef GP2X void event_poll() { SDL_Event event; @@ -66,53 +60,6 @@ void event_poll() } } } -#else -void event_poll() -{ - SDL_Event event; - - while(SDL_PollEvent(&event)) - { - switch(event.type) - { - case SDL_JOYBUTTONDOWN: - case SDL_JOYBUTTONUP: - switch(event.jbutton.button) - { - case GP2X_BUTTON_X: - case GP2X_BUTTON_Y: - case GP2X_BUTTON_A: - case GP2X_BUTTON_B: - case GP2X_BUTTON_UP: - case GP2X_BUTTON_DOWN: - case GP2X_BUTTON_LEFT: - case GP2X_BUTTON_RIGHT: - case GP2X_BUTTON_UPLEFT: - case GP2X_BUTTON_UPRIGHT: - case GP2X_BUTTON_DOWNLEFT: - case GP2X_BUTTON_DOWNRIGHT: - case GP2X_BUTTON_L: - case GP2X_BUTTON_R: - case GP2X_BUTTON_CLICK: - case GP2X_BUTTON_START: - case GP2X_BUTTON_VOLUP: - case GP2X_BUTTON_VOLDOWN: - case GP2X_BUTTON_SELECT: - - key_handler((SDL_JoyButtonEvent *)&event); - break; - } - break; - case SDL_QUIT: - { - void quit_request(); - quit_request(); - } - break; - } - } -} -#endif int event_init() { diff --git a/arch/sdl/gr.c b/arch/sdl/gr.c index 3e0bdfe9a..2359f2414 100644 --- a/arch/sdl/gr.c +++ b/arch/sdl/gr.c @@ -105,11 +105,7 @@ int gr_set_mode(u_int32_t mode) // changed by adb on 980913: added SDL_HWPALETTE (should be option?) // changed by someone on 980923 to add SDL_FULLSCREEN if(SDL_VideoModeOK(w,h,8,sdl_video_flags)){ -#ifdef GP2X - screen = SDL_SetVideoMode(w, 240, 8, sdl_video_flags); -#else screen = SDL_SetVideoMode(w, h, 8, sdl_video_flags); -#endif } else { screen=NULL; } diff --git a/arch/sdl/include/gp2x.h b/arch/sdl/include/gp2x.h deleted file mode 100644 index 5ea17f960..000000000 --- a/arch/sdl/include/gp2x.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef _GP2X_H_ -#define _GP2X_H_ - -#include - - -extern SDL_Joystick *gp2xJoystick; -extern int gp2xJoyButtons; - -#define GP2X_BUTTON_UP (0) -#define GP2X_BUTTON_DOWN (4) -#define GP2X_BUTTON_LEFT (2) -#define GP2X_BUTTON_RIGHT (6) -#define GP2X_BUTTON_UPLEFT (1) -#define GP2X_BUTTON_UPRIGHT (7) -#define GP2X_BUTTON_DOWNLEFT (3) -#define GP2X_BUTTON_DOWNRIGHT (5) - -#define GP2X_BUTTON_A (12) -#define GP2X_BUTTON_B (13) -#define GP2X_BUTTON_X (14) -#define GP2X_BUTTON_Y (15) -#define GP2X_BUTTON_L (10) -#define GP2X_BUTTON_R (11) -#define GP2X_BUTTON_CLICK (18) -#define GP2X_BUTTON_START (8) -#define GP2X_BUTTON_SELECT (9) -#define GP2X_BUTTON_VOLUP (16) -#define GP2X_BUTTON_VOLDOWN (17) - - -/* map gp2x joy buttons by redefining sdl keys. - reference to key_properties in arch/sdl/key.c. - these buttons should be configured in a player file. - mapped assuning X/Y and L/R buttons are swapped. */ - -#undef SDLK_ESCAPE -#undef SDLK_LALT -#undef SDLK_MINUS -#undef SDLK_EQUALS -#undef SDLK_a -#undef SDLK_KP_MULTIPLY -#undef SDLK_l -#undef SDLK_r -#undef SDLK_x -#undef SDLK_y -#undef SDLK_UP -#undef SDLK_DOWN -#undef SDLK_LEFT -#undef SDLK_RIGHT -#undef SDLK_KP1 -#undef SDLK_KP3 -#undef SDLK_KP7 -#undef SDLK_KP9 - -#define SDLK_ESCAPE GP2X_BUTTON_START -#define SDLK_LALT GP2X_BUTTON_SELECT -#define SDLK_MINUS GP2X_BUTTON_VOLDOWN -#define SDLK_EQUALS GP2X_BUTTON_VOLUP -#define SDLK_a GP2X_BUTTON_A -#define SDLK_KP_ENTER GP2X_BUTTON_B -#define SDLK_l GP2X_BUTTON_R -#define SDLK_r GP2X_BUTTON_L -#define SDLK_x GP2X_BUTTON_Y -#define SDLK_y GP2X_BUTTON_X -#define SDLK_UP GP2X_BUTTON_UP -#define SDLK_DOWN GP2X_BUTTON_DOWN -#define SDLK_LEFT GP2X_BUTTON_LEFT -#define SDLK_RIGHT GP2X_BUTTON_RIGHT -#define SDLK_KP1 GP2X_BUTTON_DOWNLEFT -#define SDLK_KP3 GP2X_BUTTON_DOWNRIGHT -#define SDLK_KP7 GP2X_BUTTON_UPLEFT -#define SDLK_KP9 GP2X_BUTTON_UPRIGHT - -#endif diff --git a/arch/sdl/joy.c b/arch/sdl/joy.c index dfe9ec88d..67b45bf1c 100644 --- a/arch/sdl/joy.c +++ b/arch/sdl/joy.c @@ -21,12 +21,6 @@ #include "text.h" #include "u_mem.h" -#ifdef GP2X -#include "gp2x.h" -SDL_Joystick *gp2xJoystick; -int gp2xJoyButtons; -#endif - extern char *joybutton_text[]; //from kconfig.c extern char *joyaxis_text[]; //from kconfig.c @@ -157,9 +151,6 @@ int joy_init() for (i = 0; i < n; i++) { printf("sdl-joystick %d: %s\n", i, SDL_JoystickName(i)); SDL_Joysticks[num_joysticks].handle = SDL_JoystickOpen(i); -#ifdef GP2X - gp2xJoystick=SDL_Joysticks[num_joysticks].handle; -#endif if (SDL_Joysticks[num_joysticks].handle) { joy_present = 1; @@ -173,9 +164,6 @@ int joy_init() SDL_Joysticks[num_joysticks].n_buttons = SDL_JoystickNumButtons(SDL_Joysticks[num_joysticks].handle); -#ifdef GP2X - gp2xJoyButtons=SDL_Joysticks[num_joysticks].n_buttons; -#endif if(SDL_Joysticks[num_joysticks].n_buttons > MAX_BUTTONS_PER_JOYSTICK) { Warning("sdl-joystick: found %d buttons, only %d supported. Game may be unstable.\n", SDL_Joysticks[num_joysticks].n_buttons, MAX_BUTTONS_PER_JOYSTICK); diff --git a/arch/sdl/key.c b/arch/sdl/key.c index 836f618df..1310e1904 100644 --- a/arch/sdl/key.c +++ b/arch/sdl/key.c @@ -22,10 +22,6 @@ #define KEY_BUFFER_SIZE 16 -#ifdef GP2X -#include "gp2x.h" -#endif - static unsigned char Installed = 0; //-------- Variable accessed by outside functions --------- @@ -365,22 +361,14 @@ unsigned char key_to_ascii(int keycode ) return key_properties[keycode].ascii_value; } -#ifdef GP2X -void key_handler(SDL_JoyButtonEvent *event) -#else void key_handler(SDL_KeyboardEvent *event) -#endif { ubyte state; int i, keycode, event_key, key_state; Key_info *key; unsigned char temp; -#ifndef GP2X event_key = event->keysym.sym; -#else - event_key = event->button; -#endif key_state = (event->state == SDL_PRESSED); // !(wInfo & KF_UP); //===================================================== @@ -571,9 +559,6 @@ int key_getch() unsigned int key_get_shift_status() { unsigned int shift_status = 0; -#ifdef GP2X - int i, state; -#endif if ( keyd_pressed[KEY_LSHIFT] || keyd_pressed[KEY_RSHIFT] ) shift_status |= KEY_SHIFTED; @@ -589,11 +574,6 @@ unsigned int key_get_shift_status() shift_status |=KEY_DEBUGGED; #endif -#ifdef GP2X - for (i=0;i Last_level) player_highest_level = Last_level; -#ifndef GP2X + if (player_highest_level > 1) { newmenu_item m[2]; char info_text[80]; @@ -673,7 +664,7 @@ try_again: goto try_again; } } -#endif + Difficulty_level = Player_default_difficulty; if (!do_difficulty_menu()) @@ -1013,42 +1004,3 @@ void do_ip_manual_join_menu() } while( choice > -1 ); } #endif - -#ifdef GP2X -extern void SetClock(unsigned int MHZ); - -void change_cpu_poll() -{ -} - -void do_cpu_menu() -{ - // edited 05/27/99 Matt Mueller - ingame fullscreen changing - newmenu_item m[12]; - u_int32_t modes[12]; - int i = 0, mc = 0, num_presets = 0; - //end edit -MM - unsigned int cpu_speed = 200; - - m[mc].type = NM_TYPE_RADIO; m[mc].text = "200 Mhz"; m[mc].value = (cpu_speed == 200); m[mc].group = 0; modes[mc] = 200; mc++; - m[mc].type = NM_TYPE_RADIO; m[mc].text = "233 Mhz"; m[mc].value = (cpu_speed == 233); m[mc].group = 0; modes[mc] = 233; mc++; - m[mc].type = NM_TYPE_RADIO; m[mc].text = "250 Mhz"; m[mc].value = (cpu_speed == 250); m[mc].group = 0; modes[mc] = 250; mc++; - m[mc].type = NM_TYPE_RADIO; m[mc].text = "266 Mhz"; m[mc].value = (cpu_speed == 266); m[mc].group = 0; modes[mc] = 266; mc++; - m[mc].type = NM_TYPE_RADIO; m[mc].text = "275 Mhz"; m[mc].value = (cpu_speed == 275); m[mc].group = 0; modes[mc] = 275; mc++; - - num_presets = mc; - m[mc].value=0; // make sure we count and reach the right selection - for (i = 0; i < mc; i++) - if (m[mc].value) - break; - - i = newmenu_do1(NULL, "CPU SPEED", mc, m, &change_cpu_poll, 0); - - cpu_speed = modes[i]; - - if (cpu_speed >= 200 && cpu_speed <= 275) { - printf("Set CPU Clock...(%i)\n",cpu_speed); - SetClock(cpu_speed); - } -} -#endif diff --git a/main/newmenu.c b/main/newmenu.c index cd32a56c7..1a0043c2b 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -60,10 +60,6 @@ static char rcsid[] = "$Id: newmenu.c,v 1.1.1.1 2006/03/17 19:44:42 zicodxx Exp #include "ogl_init.h" #endif -#ifdef GP2X -#include "gp2x.h" -#endif - #define TITLE_FONT (Gamefonts[GFONT_BIG_1]) #define SUBTITLE_FONT (Gamefonts[GFONT_MEDIUM_3]) #define CURRENT_FONT (Gamefonts[GFONT_MEDIUM_2]) @@ -1001,9 +997,6 @@ int newmenu_do3_real( char * title, char * subtitle, int nitems, newmenu_item * case KEY_ENTER: case KEY_PADENTER: -#ifdef GP2X - case GP2X_BUTTON_B: -#endif if ( (choice>-1) && (item[choice].type==NM_TYPE_INPUT_MENU) && (item[choice].group==0)) { item[choice].group = 1; item[choice].redraw = 1; @@ -1749,9 +1742,6 @@ ReadFileNames: break; case KEY_ENTER: case KEY_PADENTER: -#ifdef GP2X - case GP2X_BUTTON_B: -#endif done = 1; break; @@ -2119,9 +2109,6 @@ int newmenu_listbox1( char * title, int nitems, char * items[], int allow_abort_ break; case KEY_ENTER: case KEY_PADENTER: -#ifdef GP2X - case GP2X_BUTTON_B: -#endif done = 1; break; diff --git a/main/scores.c b/main/scores.c index db9b282a9..02585ecb3 100644 --- a/main/scores.c +++ b/main/scores.c @@ -223,10 +223,8 @@ void scores_fill_struct(stats_info * stats) void scores_maybe_add_player(int abort_flag) { -#ifndef GP2X char text1[COOL_MESSAGE_LEN+10]; newmenu_item m[10]; -#endif int i,position; scores_read(); @@ -250,7 +248,6 @@ void scores_maybe_add_player(int abort_flag) //-- } if ( position==0 ) { -#ifndef GP2X strcpy( text1, "" ); m[0].type = NM_TYPE_TEXT; m[0].text = TXT_COOL_SAYING; m[1].type = NM_TYPE_INPUT; m[1].text = text1; m[1].text_len = COOL_MESSAGE_LEN-5; @@ -258,9 +255,6 @@ void scores_maybe_add_player(int abort_flag) strncpy( Scores.cool_saying, text1, COOL_MESSAGE_LEN ); if (strlen(Scores.cool_saying)<1) sprintf( Scores.cool_saying, "No Comment" ); -#else - sprintf( Scores.cool_saying, " " ); -#endif } else { nm_messagebox( TXT_HIGH_SCORE, 1, TXT_OK, "%s %s!", TXT_YOU_PLACED, *(&TXT_1ST + position) ); }