Fix rednukem compiling

# Conflicts:
#	source/rr/src/anim.cpp
#	source/rr/src/common.cpp
#	source/rr/src/common_game.h
#	source/rr/src/game.cpp
#	source/rr/src/grpscan.cpp
#	source/rr/src/menus.cpp
#	source/rr/src/menus.h
#	source/rr/src/net.cpp
#	source/rr/src/net.h
#	source/rr/src/osdcmds.cpp
#	source/rr/src/player.cpp
#	source/rr/src/rts.cpp
#	source/rr/src/savegame.cpp
#	source/rr/src/screens.cpp
#	source/rr/src/sounds.cpp
#	source/rr/src/startosx.game.mm
#	source/rr/src/startwin.game.cpp
This commit is contained in:
nukeykt 2019-12-06 03:38:35 +09:00 committed by Christoph Oelckers
parent d1ed4063eb
commit 9a71545c51
9 changed files with 32 additions and 23 deletions

View file

@ -108,7 +108,9 @@ static struct
grpfile_t const * grp; grpfile_t const * grp;
char *gamedir; char *gamedir;
ud_setup_t shared; ud_setup_t shared;
#ifdef POLYMER
int polymer; int polymer;
#endif
} settings; } settings;
static int32_t retval = -1, mode = TAB_MESSAGES; static int32_t retval = -1, mode = TAB_MESSAGES;
@ -130,6 +132,7 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data)
gtk_tree_model_get(data, &iter, 1, &val, -1); gtk_tree_model_get(data, &iter, 1, &val, -1);
settings.shared.xdim = validmode[val].xdim; settings.shared.xdim = validmode[val].xdim;
settings.shared.ydim = validmode[val].ydim; settings.shared.ydim = validmode[val].ydim;
settings.shared.bpp = validmode[val].bpp;
} }
static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
@ -272,7 +275,7 @@ static unsigned char GetModsDirNames(GtkListStore *list)
char *homedir; char *homedir;
char pdir[BMAX_PATH]; char pdir[BMAX_PATH];
unsigned char iternumb = 0; unsigned char iternumb = 0;
CACHE1D_FIND_REC *dirs = NULL; BUILDVFS_FIND_REC *dirs = NULL;
GtkTreeIter iter; GtkTreeIter iter;
pathsearchmode = 1; pathsearchmode = 1;
@ -280,7 +283,7 @@ static unsigned char GetModsDirNames(GtkListStore *list)
if ((homedir = Bgethomedir())) if ((homedir = Bgethomedir()))
{ {
Bsnprintf(pdir, sizeof(pdir), "%s/" ".eduke32", homedir); Bsnprintf(pdir, sizeof(pdir), "%s/" ".eduke32", homedir);
dirs = klistpath(pdir, "*", CACHE1D_FIND_DIR); dirs = klistpath(pdir, "*", BUILDVFS_FIND_DIR);
for (; dirs != NULL; dirs=dirs->next) for (; dirs != NULL; dirs=dirs->next)
{ {
if ((Bstrcmp(dirs->name, "autoload") == 0) || if ((Bstrcmp(dirs->name, "autoload") == 0) ||
@ -866,9 +869,7 @@ int32_t startwin_run(void)
settings.gamedir = g_modDir; settings.gamedir = g_modDir;
settings.grp = g_selectedGrp; settings.grp = g_selectedGrp;
#ifdef POLYMER #ifdef POLYMER
settings.polymer = (glrendmode == REND_POLYMER); settings.polymer = (glrendmode == REND_POLYMER) & (settings.shared.bpp != 8);
#else
settings.polymer = 0;
#endif #endif
PopulateForm(ALL); PopulateForm(ALL);
@ -878,7 +879,9 @@ int32_t startwin_run(void)
if (retval) // launch the game with these parameters if (retval) // launch the game with these parameters
{ {
ud.setup = settings.shared; ud.setup = settings.shared;
#ifdef POLYMER
glrendmode = (settings.polymer) ? REND_POLYMER : REND_POLYMOST; glrendmode = (settings.polymer) ? REND_POLYMER : REND_POLYMOST;
#endif
g_selectedGrp = settings.grp; g_selectedGrp = settings.grp;
Bstrcpy(g_modDir, (g_noSetup == 0 && settings.gamedir != NULL) ? settings.gamedir : "/"); Bstrcpy(g_modDir, (g_noSetup == 0 && settings.gamedir != NULL) ? settings.gamedir : "/");

View file

@ -494,7 +494,6 @@ int32_t Anim_Play(const char *fn)
// setpalette(0L,256L,tempbuf); // setpalette(0L,256L,tempbuf);
P_SetGamePalette(g_player[myconnectindex].ps, ANIMPAL, 8 + 2); P_SetGamePalette(g_player[myconnectindex].ps, ANIMPAL, 8 + 2);
timerUpdate();
ototalclock = totalclock; ototalclock = totalclock;
i = 1; i = 1;

View file

@ -1,4 +1,4 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 2016 EDuke32 developers and contributors Copyright (C) 2016 EDuke32 developers and contributors
@ -7882,8 +7882,6 @@ MAIN_LOOP_RESTART:
do do
{ {
timerUpdate();
if (ready2send == 0) break; if (ready2send == 0) break;
Net_GetInput(); Net_GetInput();
@ -7897,8 +7895,6 @@ MAIN_LOOP_RESTART:
G_MoveLoop(); G_MoveLoop();
} }
timerUpdate();
if (totalclock - moveClock >= TICSPERFRAME) if (totalclock - moveClock >= TICSPERFRAME)
{ {
// computing a tic takes longer than a tic, so we're slowing // computing a tic takes longer than a tic, so we're slowing

View file

@ -5901,7 +5901,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
{ {
if (object->findhigh[i]) if (object->findhigh[i])
{ {
CACHE1D_FIND_REC *dir; BUILDVFS_FIND_REC *dir;
int32_t y = 0; int32_t y = 0;
const int32_t y_upper = object->format[i]->pos.y; const int32_t y_upper = object->format[i]->pos.y;
const int32_t y_lower = klabs(object->format[i]->bottomcutoff); const int32_t y_lower = klabs(object->format[i]->bottomcutoff);
@ -6694,7 +6694,7 @@ static void Menu_RunInput(Menu_t *cm)
{ {
int32_t i; int32_t i;
CACHE1D_FIND_REC *seeker = object->findhigh[object->currentList]; BUILDVFS_FIND_REC *seeker = object->findhigh[object->currentList];
inputState.ClearKeyStatus(sc_PgUp); inputState.ClearKeyStatus(sc_PgUp);
@ -6717,7 +6717,7 @@ static void Menu_RunInput(Menu_t *cm)
{ {
int32_t i; int32_t i;
CACHE1D_FIND_REC *seeker = object->findhigh[object->currentList]; BUILDVFS_FIND_REC *seeker = object->findhigh[object->currentList];
inputState.ClearKeyStatus(sc_PgDn); inputState.ClearKeyStatus(sc_PgDn);
@ -6771,7 +6771,7 @@ static void Menu_RunInput(Menu_t *cm)
ch = inputState.keyGetChar(); ch = inputState.keyGetChar();
if (ch > 0 && ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9'))) if (ch > 0 && ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9')))
{ {
CACHE1D_FIND_REC *seeker = object->findhigh[object->currentList]->usera; BUILDVFS_FIND_REC *seeker = object->findhigh[object->currentList]->usera;
if (ch >= 'a') if (ch >= 'a')
ch -= ('a'-'A'); ch -= ('a'-'A');
while (seeker) while (seeker)

View file

@ -2863,7 +2863,6 @@ void Net_ReceiveDisconnect(ENetEvent *event)
void Net_GetPackets(void) void Net_GetPackets(void)
{ {
timerUpdate();
MUSIC_Update(); MUSIC_Update();
G_HandleSpecialKeys(); G_HandleSpecialKeys();

View file

@ -927,8 +927,10 @@ int32_t registerosdcommands(void)
OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer); OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer);
#endif #endif
#if !defined NETCODE_DISABLE #if !defined NETCODE_DISABLE
//OSD_RegisterFunction("kick","kick <id>: kicks a multiplayer client. See listplayers.", osdcmd_kick); #if 0
//OSD_RegisterFunction("kickban","kickban <id>: kicks a multiplayer client and prevents them from reconnecting. See listplayers.", osdcmd_kickban); OSD_RegisterFunction("kick","kick <id>: kicks a multiplayer client. See listplayers.", osdcmd_kick);
OSD_RegisterFunction("kickban","kickban <id>: kicks a multiplayer client and prevents them from reconnecting. See listplayers.", osdcmd_kickban);
#endif
OSD_RegisterFunction("listplayers","listplayers: lists currently connected multiplayer clients", osdcmd_listplayers); OSD_RegisterFunction("listplayers","listplayers: lists currently connected multiplayer clients", osdcmd_listplayers);
#endif #endif

View file

@ -641,7 +641,6 @@ void G_CacheMapData(void)
{ {
Bsprintf(tempbuf, "Loaded %d%% (%d/%d textures)\n", lpc, pc, g_precacheCount); Bsprintf(tempbuf, "Loaded %d%% (%d/%d textures)\n", lpc, pc, g_precacheCount);
G_DoLoadScreen(tempbuf, lpc); G_DoLoadScreen(tempbuf, lpc);
timerUpdate();
if (totalclock - tc >= 1) if (totalclock - tc >= 1)
{ {

View file

@ -447,8 +447,6 @@ static void G_SaveTimers(void)
static void G_RestoreTimers(void) static void G_RestoreTimers(void)
{ {
timerUpdate();
totalclock = g_timers.totalclock; totalclock = g_timers.totalclock;
totalclocklock = g_timers.totalclocklock; totalclocklock = g_timers.totalclocklock;
ototalclock = g_timers.ototalclock; ototalclock = g_timers.ototalclock;

View file

@ -98,15 +98,28 @@ void S_SoundShutdown(void)
void S_MusicStartup(void) void S_MusicStartup(void)
{ {
initprintf("Initializing music...\n"); initprintf("Initializing MIDI driver... ");
if (MUSIC_Init(MusicDevice) == MUSIC_Ok) if (MUSIC_Init(MusicDevice) == MUSIC_Ok)
{ {
MUSIC_SetVolume(mus_volume); MUSIC_SetVolume(mus_volume);
return; return;
} }
#if 0
MUSIC_SetVolume(ud.config.MusicVolume);
initprintf("S_MusicStartup(): failed initializing\n"); auto const fil = kopen4load("d3dtimbr.tmb", 0);
if (fil != buildvfs_kfd_invalid)
{
int l = kfilelength(fil);
auto tmb = (uint8_t *)Xmalloc(l);
kread(fil, tmb, l);
AL_RegisterTimbreBank(tmb);
Xfree(tmb);
kclose(fil);
}
#endif
} }
void S_MusicShutdown(void) void S_MusicShutdown(void)