Updated docs; Removed GP2X support since I won't support this device anymore
This commit is contained in:
parent
487c6fa0e2
commit
18d7e3fb69
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
21
SConstruct
21
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 + """
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
#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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
#ifndef _GP2X_H_
|
||||
#define _GP2X_H_
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
|
||||
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
|
|
@ -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);
|
||||
|
|
|
@ -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<gp2xJoyButtons;i++)
|
||||
state=SDL_JoystickGetButton(gp2xJoystick,i);
|
||||
#endif
|
||||
|
||||
return shift_status;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ int ReadConfigFile()
|
|||
Config_midi_volume = 4;
|
||||
Config_control_type = 0;
|
||||
|
||||
#if defined(__unix__) && !defined (GP2X)
|
||||
#if defined(__unix__)
|
||||
/* we abuse the line buf here todo some unix specific stuff */
|
||||
ptr = getenv("HOME");
|
||||
snprintf(line, sizeof(line), "%s/.d1x-rebirth", ptr? ptr:".");
|
||||
|
|
22
main/game.c
22
main/game.c
|
@ -1886,9 +1886,6 @@ ubyte exploding_flag = 0;
|
|||
extern void dump_used_textures_all();
|
||||
int ostate_p=0;
|
||||
int ostate_s=0;
|
||||
#ifdef GP2X
|
||||
extern int digi_volume;
|
||||
#endif
|
||||
|
||||
void HandleDeathKey(int key)
|
||||
{
|
||||
|
@ -1983,14 +1980,6 @@ void HandleDemoKey(int key)
|
|||
#endif
|
||||
|
||||
case KEY_F3: toggle_cockpit(); break;
|
||||
#ifdef GP2X
|
||||
case KEY_ALTED+KEY_F9:
|
||||
digi_set_digi_volume( digi_volume-2048 );
|
||||
break;
|
||||
case KEY_ALTED+KEY_F10:
|
||||
digi_set_digi_volume( digi_volume+2048 );
|
||||
break;
|
||||
#endif
|
||||
case KEY_F2: Config_menu_flag = 1; break;
|
||||
case KEY_F7:
|
||||
#ifdef NETWORK
|
||||
|
@ -2184,14 +2173,6 @@ void HandleGameKey(int key)
|
|||
case KEY_PAUSE: do_game_pause(1); break;
|
||||
case KEY_PRINT_SCREEN: save_screen_shot(0); break;
|
||||
|
||||
#ifdef GP2X
|
||||
case KEY_ALTED+KEY_F9:
|
||||
digi_set_digi_volume( digi_volume-2048 );
|
||||
break;
|
||||
case KEY_ALTED+KEY_F10:
|
||||
digi_set_digi_volume( digi_volume+2048 );
|
||||
break;
|
||||
#endif
|
||||
case KEYS_GR_TOGGLE_FULLSCREEN:
|
||||
gr_toggle_fullscreen();
|
||||
break;
|
||||
|
@ -2203,9 +2184,6 @@ void HandleGameKey(int key)
|
|||
Game_aborted=1;
|
||||
Function_mode=FMODE_EXIT;
|
||||
break;
|
||||
#ifdef GP2X
|
||||
case KEY_ALTED + KEY_ESC:
|
||||
#endif
|
||||
case KEY_ALTED+KEY_F2: if (!Player_is_dead) state_save_all( 0 ); break; // 0 means not between levels.
|
||||
case KEY_ALTED+KEY_F3: if (!Player_is_dead) state_restore_all(1); break;
|
||||
|
||||
|
|
|
@ -64,10 +64,6 @@ static char rcsid[] = "$Id: kconfig.c,v 1.1.1.1 2006/03/17 19:44:27 zicodxx Exp
|
|||
#include "ogl_init.h"
|
||||
#endif
|
||||
|
||||
#ifdef GP2X
|
||||
#include "gp2x.h"
|
||||
#endif
|
||||
|
||||
// Array used to 'blink' the cursor while waiting for a keypress.
|
||||
sbyte fades[64] = { 1,1,1,2,2,3,4,4,5,6,8,9,10,12,13,15,16,17,19,20,22,23,24,26,27,28,28,29,30,30,31,31,31,31,31,30,30,29,28,28,27,26,24,23,22,20,19,17,16,15,13,12,10,9,8,6,5,4,4,3,2,2,1,1 };
|
||||
|
||||
|
@ -1968,17 +1964,12 @@ void controls_read_all()
|
|||
if ( (use_mouse)&&(kc_mouse[3].value < 255 )) Controls.forward_thrust_time -= mouse_button_down_time( kc_mouse[3].value );
|
||||
|
||||
//----------- Read fire_primary_down_count
|
||||
#ifdef GP2X // deny these controls for GP2X combo actions with SELECT
|
||||
if (!keyd_pressed[ KEY_LALT ])
|
||||
#endif
|
||||
{
|
||||
if (kc_keyboard[24].value < 255 ) Controls.fire_primary_down_count += key_down_count(kc_keyboard[24].value);
|
||||
if (kc_keyboard[25].value < 255 ) Controls.fire_primary_down_count += key_down_count(kc_keyboard[25].value);
|
||||
|
||||
if ((use_joystick)&&(kc_joystick[0].value < 255 )) Controls.fire_primary_down_count += joy_get_button_down_cnt(kc_joystick[0].value);
|
||||
if ((use_joystick)&&(kc_joystick[29].value < 255 )) Controls.fire_primary_down_count += joy_get_button_down_cnt(kc_joystick[29].value);
|
||||
if ((use_mouse)&&(kc_mouse[0].value < 255 )) Controls.fire_primary_down_count += mouse_button_down_count(kc_mouse[0].value);
|
||||
}
|
||||
#ifdef NETWORK
|
||||
if(use_alt_vulcanfire)
|
||||
{
|
||||
|
@ -2009,10 +2000,6 @@ void controls_read_all()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef GP2X // deny these controls for GP2X combo actions with SELECT
|
||||
if (!keyd_pressed[ KEY_LALT ])
|
||||
#endif
|
||||
{
|
||||
//----------- Read fire_primary_state
|
||||
if (kc_keyboard[24].value < 255 ) Controls.fire_primary_state |= keyd_pressed[kc_keyboard[24].value];
|
||||
if (kc_keyboard[25].value < 255 ) Controls.fire_primary_state |= keyd_pressed[kc_keyboard[25].value];
|
||||
|
@ -2033,7 +2020,6 @@ void controls_read_all()
|
|||
if ((use_joystick)&&(kc_joystick[1].value < 255 )) Controls.fire_secondary_state |= joy_get_button_state(kc_joystick[1].value);
|
||||
if ((use_joystick)&&(kc_joystick[30].value < 255 )) Controls.fire_secondary_state |= joy_get_button_state(kc_joystick[30].value);
|
||||
if ((use_mouse)&&(kc_mouse[1].value < 255) ) Controls.fire_secondary_state |= mouse_button_state(kc_mouse[1].value);
|
||||
}
|
||||
|
||||
//----------- Read fire_flare_down_count
|
||||
if (kc_keyboard[28].value < 255 ) Controls.fire_flare_down_count += key_down_count(kc_keyboard[28].value);
|
||||
|
@ -2120,56 +2106,6 @@ void controls_read_all()
|
|||
memset( &Controls, 0, sizeof(control_info) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GP2X
|
||||
if (keyd_pressed[ KEY_LALT ] && key_down_count( KEY_R )) // SELECT + R = cycle primary
|
||||
Controls.cycle_primary_down_count = 1;
|
||||
if (keyd_pressed[ KEY_LALT ] && key_down_count( KEY_L )) // SELECT + L = cycle seconday
|
||||
Controls.cycle_secondary_down_count = 1;
|
||||
if (keyd_pressed[ KEY_A ] && keyd_pressed[ KEY_R ]) // A + R = fire flare
|
||||
Controls.fire_flare_down_count = 1;
|
||||
if (keyd_pressed[ KEY_A ] && keyd_pressed[ KEY_X ]) // A + X = automap
|
||||
Controls.automap_down_count = 1;
|
||||
if (keyd_pressed[ KEY_LALT ] && keyd_pressed[ KEY_DOWN ]) // SELECT + STICK DOWN = rear-view
|
||||
Controls.rear_view_down_count = 1;
|
||||
if (keyd_pressed[ KEY_PADENTER ] && keyd_pressed[ KEY_A ]) // B + A = drop bomb
|
||||
Controls.drop_bomb_down_count = 1;
|
||||
if (!slide_on) {
|
||||
if (keyd_pressed[ KEY_PAD1 ]) {
|
||||
Controls.pitch_time = -FrameTime/2;
|
||||
Controls.heading_time = -FrameTime/2;
|
||||
}
|
||||
if (keyd_pressed[ KEY_PAD3 ]) {
|
||||
Controls.pitch_time = -FrameTime/2;
|
||||
Controls.heading_time = FrameTime/2;
|
||||
}
|
||||
if (keyd_pressed[ KEY_PAD7 ]) {
|
||||
Controls.pitch_time = FrameTime/2;
|
||||
Controls.heading_time = -FrameTime/2;
|
||||
}
|
||||
if (keyd_pressed[ KEY_PAD9 ]) {
|
||||
Controls.pitch_time = FrameTime/2;
|
||||
Controls.heading_time = FrameTime/2;
|
||||
}
|
||||
} else {
|
||||
if (keyd_pressed[ KEY_PAD1 ]) {
|
||||
Controls.vertical_thrust_time = -FrameTime/2;
|
||||
Controls.sideways_thrust_time = -FrameTime/2;
|
||||
}
|
||||
if (keyd_pressed[ KEY_PAD3 ]) {
|
||||
Controls.vertical_thrust_time = -FrameTime/2;
|
||||
Controls.sideways_thrust_time = FrameTime/2;
|
||||
}
|
||||
if (keyd_pressed[ KEY_PAD7 ]) {
|
||||
Controls.vertical_thrust_time = FrameTime/2;
|
||||
Controls.sideways_thrust_time = -FrameTime/2;
|
||||
}
|
||||
if (keyd_pressed[ KEY_PAD9 ]) {
|
||||
Controls.vertical_thrust_time = FrameTime/2;
|
||||
Controls.sideways_thrust_time = FrameTime/2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void reset_cruise(void)
|
||||
|
|
52
main/menu.c
52
main/menu.c
|
@ -208,16 +208,12 @@ void create_main_menu(newmenu_item *m, int *menu_choice, int *callers_num_option
|
|||
ADD_ITEM(TXT_NEW_GAME,MENU_NEW_GAME,KEY_N);
|
||||
|
||||
ADD_ITEM(TXT_LOAD_GAME,MENU_LOAD_GAME,KEY_L);
|
||||
#ifndef GP2X
|
||||
#ifdef NETWORK
|
||||
ADD_ITEM(TXT_MULTIPLAYER_,MENU_MULTIPLAYER,-1);
|
||||
#endif
|
||||
ADD_ITEM(TXT_OPTIONS_, MENU_CONFIG, -1 );
|
||||
ADD_ITEM(TXT_CHANGE_PILOTS,MENU_NEW_PLAYER,unused);
|
||||
ADD_ITEM(TXT_VIEW_DEMO,MENU_DEMO_PLAY,0);
|
||||
#else
|
||||
ADD_ITEM("CPU SPEED",99,0);
|
||||
#endif
|
||||
ADD_ITEM(TXT_VIEW_SCORES,MENU_VIEW_SCORES,KEY_V);
|
||||
#ifdef SHAREWARE
|
||||
ADD_ITEM(TXT_ORDERING_INFO,MENU_ORDER_INFO,-1);
|
||||
|
@ -402,11 +398,6 @@ void do_option ( int select)
|
|||
gr_palette_fade_out( gr_palette,32,0);
|
||||
credits_show();
|
||||
break;
|
||||
#ifdef GP2X
|
||||
case 99:
|
||||
do_cpu_menu();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
Error("Unknown option %d in do_option",select);
|
||||
break;
|
||||
|
@ -645,7 +636,7 @@ void do_new_game_menu()
|
|||
|
||||
if (player_highest_level > 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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue