Revisited Kip's non-Tracker changes and implemented to D2X: Prettier SConstruct output, Forgotten newlines at end of files, Improvement in dl_list code, Revamped menu GUI defines; I am NOT HAPPY I have to do these changes seperately
This commit is contained in:
parent
51c322d3aa
commit
52ed53f829
|
@ -6,6 +6,7 @@ arch/ogl.c, include/gr.h, main/game.c, main/gamerend.c, main/gauges.c, main/gaug
|
|||
main/gamerend.c, main/manu.c, main/newmenu.c: Fixes for my last revisions: More reliable check for cockpit_decode_alpha, more reliable check is newmenu sub-bitmap needs to be re-created, call gr_set_mode() in change_res() with correct Game_screen_mode
|
||||
INSTALL.txt, README.txt: Docs update: We moved from www.dxx-rebirth.de to www.dxx-rebirth.com!
|
||||
arch/sdl/gr.c, arch/ogl/gr.c, arch/ogl/ogl.c, include/args.h, main/game.c, main/gamecntl.c, main/inferno.c, main/menu.c, main/playsave.c, main/playsave.h, misc/args.c: Cleanup: Renderstats; Made PRShot a non-OpenGL-related feature and added to Misc Options; Added command for SDL_ASYNCBLIT to command-line args
|
||||
SConstruct, include/dl_list.h, main/config.c, main/console.c, main/menu.c, main/robot.h, misc/dl_list.c: Revisited Kip's non-Tracker changes and implemented to D2X: Prettier SConstruct output, Forgotten newlines at end of files, Improvement in dl_list code, Revamped menu GUI defines; I am NOT HAPPY I have to do these changes seperately!!!
|
||||
|
||||
20081023
|
||||
--------
|
||||
|
|
17
SConstruct
17
SConstruct
|
@ -10,6 +10,8 @@ PROGRAM_NAME = 'D2X-Rebirth'
|
|||
# version number
|
||||
D2XMAJOR = 0
|
||||
D2XMINOR = 54
|
||||
D2XSVN = os.popen('svnversion .').read()[:-1]
|
||||
D2XSVN = D2XSVN.split(':')[-1]
|
||||
|
||||
# installation path
|
||||
PREFIX = '/usr/local/'
|
||||
|
@ -35,7 +37,7 @@ if (micro > 0):
|
|||
else:
|
||||
D2XMICRO = 0
|
||||
|
||||
VERSION_STRING = ' v' + str(D2XMAJOR) + '.' + str(D2XMINOR)
|
||||
VERSION_STRING = ' v' + str(D2XMAJOR) + '.' + str(D2XMINOR) + " svn " + str(D2XSVN)
|
||||
if (D2XMICRO):
|
||||
VERSION_STRING += '.' + str(D2XMICRO)
|
||||
|
||||
|
@ -295,12 +297,21 @@ noasm_sources = [
|
|||
'maths/vecmat.c'
|
||||
]
|
||||
|
||||
# flags and stuff for all platforms
|
||||
# Acquire environment object...
|
||||
env = Environment(ENV = os.environ)
|
||||
|
||||
# Prettier build messages......
|
||||
env["CCCOMSTR"] = "Compiling $SOURCE ..."
|
||||
env["CXXCOMSTR"] = "Compiling $SOURCE ..."
|
||||
env["LINKCOMSTR"] = "Linking $TARGET ..."
|
||||
env["ARCOMSTR"] = "Archiving $TARGET ..."
|
||||
env["RANLIBCOMSTR"] = "Indexing $TARGET ..."
|
||||
|
||||
# flags and stuff for all platforms
|
||||
env.ParseConfig('sdl-config --cflags')
|
||||
env.ParseConfig('sdl-config --libs')
|
||||
env.Append(CPPFLAGS = ['-Wall', '-funsigned-char'])
|
||||
env.Append(CPPDEFINES = [('D2XMAJOR', '\\"' + str(D2XMAJOR) + '\\"'), ('D2XMINOR', '\\"' + str(D2XMINOR) + '\\"')])
|
||||
env.Append(CPPDEFINES = [('PROGRAM_NAME', '\\"' + str(PROGRAM_NAME) + '\\"'), ('D2XMAJOR', '\\"' + str(D2XMAJOR) + '\\"'), ('D2XMINOR', '\\"' + str(D2XMINOR) + '\\"')])
|
||||
#env.Append(CPPDEFINES = [('VERSION', '\\"' + str(VERSION) + '\\"')])
|
||||
#env.Append(CPPDEFINES = [('USE_SDLMIXER', sdlmixer)])
|
||||
env.Append(CPPDEFINES = ['NETWORK', 'HAVE_NETIPX_IPX_H', '_REENTRANT'])
|
||||
|
|
|
@ -6,24 +6,26 @@
|
|||
#ifndef __DL_LIST__
|
||||
#define __DL_LIST__
|
||||
|
||||
struct dl_list_elem {
|
||||
void *data;
|
||||
struct dl_list_elem *prev;
|
||||
struct dl_list_elem *next;
|
||||
};
|
||||
|
||||
typedef struct dl_list_elem dl_item;
|
||||
|
||||
typedef struct {
|
||||
struct dl_list_elem *first;
|
||||
struct dl_list_elem *last;
|
||||
struct dl_list_elem *current;
|
||||
struct dl_list_elem {
|
||||
void *data;
|
||||
struct dl_list_elem *prev;
|
||||
struct dl_list_elem *next;
|
||||
};
|
||||
|
||||
typedef struct dl_list_elem dl_item;
|
||||
|
||||
typedef struct {
|
||||
struct dl_list_elem *first;
|
||||
struct dl_list_elem *last;
|
||||
struct dl_list_elem *current;
|
||||
unsigned int size;
|
||||
} dl_list;
|
||||
|
||||
dl_list *dl_init();
|
||||
void dl_add(dl_list *, void *);
|
||||
void dl_add(dl_list *, void *);
|
||||
void dl_remove(dl_list *, dl_item *);
|
||||
int dl_is_empty(dl_list *);
|
||||
int dl_is_empty(dl_list const *);
|
||||
int dl_size(dl_list const *);
|
||||
int dl_forward(dl_list *);
|
||||
int dl_backward(dl_list *);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ int ReadConfigFile()
|
|||
#else
|
||||
strncpy(GameCfg.JukeboxPath, "::::Jukebox", PATH_MAX+1);
|
||||
#endif
|
||||
memset(GameCfg.MplIpHostAddr, 0, 128);
|
||||
memset(GameCfg.MplIpHostAddr, '\x0', sizeof(GameCfg.MplIpHostAddr));
|
||||
|
||||
infile = PHYSFSX_openReadBuffered("descent.cfg");
|
||||
|
||||
|
@ -202,8 +202,8 @@ int WriteConfigFile()
|
|||
PHYSFSX_printf(infile, "%s=%d\n", SndEnableRedbookStr, GameCfg.SndEnableRedbook);
|
||||
PHYSFSX_printf(infile, "%s=%d\n", ReverseStereoStr, GameCfg.ReverseStereo);
|
||||
PHYSFSX_printf(infile, "%s=%d\n", GammaLevelStr, GameCfg.GammaLevel);
|
||||
PHYSFSX_printf(infile, "%s=%s\n", LastPlayerStr, Players[Player_num].callsign );
|
||||
PHYSFSX_printf(infile, "%s=%s\n", LastMissionStr, GameCfg.LastMission );
|
||||
PHYSFSX_printf(infile, "%s=%s\n", LastPlayerStr, Players[Player_num].callsign);
|
||||
PHYSFSX_printf(infile, "%s=%s\n", LastMissionStr, GameCfg.LastMission);
|
||||
PHYSFSX_printf(infile, "%s=%i\n", ResolutionXStr, SM_W(Game_screen_mode));
|
||||
PHYSFSX_printf(infile, "%s=%i\n", ResolutionYStr, SM_H(Game_screen_mode));
|
||||
PHYSFSX_printf(infile, "%s=%i\n", AspectXStr, GameCfg.AspectX);
|
||||
|
@ -213,8 +213,8 @@ int WriteConfigFile()
|
|||
PHYSFSX_printf(infile, "%s=%i\n", VSyncStr, GameCfg.VSync);
|
||||
PHYSFSX_printf(infile, "%s=%i\n", MultisampleStr, GameCfg.Multisample);
|
||||
PHYSFSX_printf(infile, "%s=%i\n", JukeboxOnStr, GameCfg.JukeboxOn);
|
||||
PHYSFSX_printf(infile, "%s=%s\n", JukeboxPathStr, GameCfg.JukeboxPath );
|
||||
PHYSFSX_printf(infile, "%s=%s\n", IPHostAddrStr, GameCfg.MplIpHostAddr );
|
||||
PHYSFSX_printf(infile, "%s=%s\n", JukeboxPathStr, GameCfg.JukeboxPath);
|
||||
PHYSFSX_printf(infile, "%s=%s\n", IPHostAddrStr, GameCfg.MplIpHostAddr);
|
||||
|
||||
PHYSFS_close(infile);
|
||||
|
||||
|
|
|
@ -214,4 +214,4 @@ void con_init(void)
|
|||
|
||||
gamelog_fp = PHYSFSX_openWriteBuffered("gamelog.txt");
|
||||
atexit(con_close);
|
||||
}
|
||||
}
|
||||
|
|
58
main/menu.c
58
main/menu.c
|
@ -77,34 +77,36 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
|
||||
//char *menu_difficulty_text[] = { "Trainee", "Rookie", "Fighter", "Hotshot", "Insane" };
|
||||
|
||||
#define MENU_NEW_GAME 0
|
||||
#define MENU_GAME 1
|
||||
#define MENU_EDITOR 2
|
||||
#define MENU_VIEW_SCORES 3
|
||||
#define MENU_QUIT 4
|
||||
#define MENU_LOAD_GAME 5
|
||||
#define MENU_SAVE_GAME 6
|
||||
#define MENU_DEMO_PLAY 8
|
||||
#define MENU_LOAD_LEVEL 9
|
||||
#define MENU_START_IPX_NETGAME 10
|
||||
#define MENU_JOIN_IPX_NETGAME 11
|
||||
#define MENU_CONFIG 13
|
||||
#define MENU_REJOIN_NETGAME 14
|
||||
#define MENU_DIFFICULTY 15
|
||||
#define MENU_HELP 19
|
||||
#define MENU_NEW_PLAYER 20
|
||||
#define MENU_MULTIPLAYER 21
|
||||
#define MENU_SHOW_CREDITS 23
|
||||
#define MENU_ORDER_INFO 24
|
||||
#define MENU_PLAY_SONG 25
|
||||
//#define MENU_START_TCP_NETGAME 26 // TCP/IP support was planned in Descent II,
|
||||
//#define MENU_JOIN_TCP_NETGAME 27 // but never realized.
|
||||
#define MENU_START_APPLETALK_NETGAME 28
|
||||
#define MENU_JOIN_APPLETALK_NETGAME 29
|
||||
#define MENU_START_UDP_NETGAME 30 // UDP/IP support copied from d1x
|
||||
#define MENU_JOIN_UDP_NETGAME 31
|
||||
#define MENU_START_KALI_NETGAME 32 // Kali support copied from d1x
|
||||
#define MENU_JOIN_KALI_NETGAME 33
|
||||
// Menu IDs...
|
||||
enum MENUS
|
||||
{
|
||||
MENU_NEW_GAME = 0,
|
||||
MENU_GAME,
|
||||
MENU_EDITOR,
|
||||
MENU_VIEW_SCORES,
|
||||
MENU_QUIT,
|
||||
MENU_LOAD_GAME,
|
||||
MENU_SAVE_GAME,
|
||||
MENU_DEMO_PLAY,
|
||||
MENU_LOAD_LEVEL,
|
||||
MENU_START_IPX_NETGAME,
|
||||
MENU_JOIN_IPX_NETGAME,
|
||||
MENU_CONFIG,
|
||||
MENU_REJOIN_NETGAME,
|
||||
MENU_DIFFICULTY,
|
||||
MENU_HELP,
|
||||
MENU_NEW_PLAYER,
|
||||
MENU_MULTIPLAYER,
|
||||
MENU_SHOW_CREDITS,
|
||||
MENU_ORDER_INFO,
|
||||
MENU_PLAY_SONG,
|
||||
MENU_START_APPLETALK_NETGAME,
|
||||
MENU_JOIN_APPLETALK_NETGAME,
|
||||
MENU_START_UDP_NETGAME,
|
||||
MENU_JOIN_UDP_NETGAME,
|
||||
MENU_START_KALI_NETGAME,
|
||||
MENU_JOIN_KALI_NETGAME,
|
||||
};
|
||||
|
||||
//ADD_ITEM("Start netgame...", MENU_START_NETGAME, -1 );
|
||||
//ADD_ITEM("Send net message...", MENU_SEND_NET_MESSAGE, -1 );
|
||||
|
|
|
@ -185,4 +185,4 @@ extern int robot_info_read_n(robot_info *ri, int n, CFILE *fp);
|
|||
*/
|
||||
extern int jointpos_read_n(jointpos *jp, int n, CFILE *fp);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,7 @@ dl_list *dl_init() {
|
|||
list->first = NULL;
|
||||
list->last = NULL;
|
||||
list->current = NULL;
|
||||
list->size = 0;
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -30,6 +31,7 @@ void dl_add(dl_list *list, void *data) {
|
|||
list->current = item;
|
||||
}
|
||||
list->last = item;
|
||||
list->size++;
|
||||
}
|
||||
|
||||
void dl_remove(dl_list *list, dl_item *item) {
|
||||
|
@ -42,12 +44,17 @@ void dl_remove(dl_list *list, dl_item *item) {
|
|||
else item->next->prev = item->prev;
|
||||
|
||||
d_free(item);
|
||||
list->size--;
|
||||
}
|
||||
|
||||
int dl_is_empty(dl_list *list) {
|
||||
int dl_is_empty(dl_list const *list) {
|
||||
return (list->first == NULL);
|
||||
}
|
||||
|
||||
int dl_size(dl_list const *list) {
|
||||
return list->size;
|
||||
}
|
||||
|
||||
int dl_forward(dl_list *list) {
|
||||
if (!dl_is_empty(list) && list->current->next != NULL) {
|
||||
list->current = list->current->next;
|
||||
|
|
Loading…
Reference in a new issue