Skip to content

Commit

Permalink
Merge remote-tracking branch 'eduke32/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendricks266 committed Mar 6, 2024
2 parents 5a24112 + f5cb424 commit ff88c19
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 19 deletions.
18 changes: 14 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ tools_obj := $(obj)/$(tools)

tools_cflags := $(engine_cflags) -I$(engine_src)

tools_deps := engine_tools mimalloc
tools_deps := engine_tools

ifneq (0,$(USE_MIMALLOC))
tools_deps += mimalloc
endif

tools_targets := \
arttool \
Expand Down Expand Up @@ -1217,16 +1221,19 @@ endif
#### Includes

COMPILERFLAGS += \
-MP -MMD \
-I$(engine_inc) \
-I$(mact_inc) \
-I$(audiolib_inc) \
-I$(glad_inc) \
-I$(voidwrap_inc) \
-I$(mimalloc_inc) \
-I$(imgui_inc) \
-I$(libsmackerdec_inc) \
-I$(hmpplay_inc) \
-MP -MMD \

ifneq (0,$(USE_MIMALLOC))
COMPILERFLAGS += -I$(mimalloc_inc)
endif

ifneq (0,$(USE_PHYSFS))
COMPILERFLAGS += -I$(physfs_inc) -DUSE_PHYSFS
Expand Down Expand Up @@ -1254,13 +1261,16 @@ libraries := \
glad \
imgui \
libxmplite \
mimalloc \
mact \
voidwrap \
libsmackerdec \
hmpplay \
n64 \

ifneq (0,$(USE_MIMALLOC))
libraries += mimalloc
endif

ifneq (0,$(USE_PHYSFS))
libraries += physfs
endif
Expand Down
2 changes: 0 additions & 2 deletions source/duke3d/src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ enum gametokens
T_DISTANCE,
T_VOLUME,
T_DELAY,
T_RENAMEFILE,
T_GLOBALGAMEFLAGS,
T_ASPECT,
T_FORCEFILTER,
Expand Down Expand Up @@ -5409,7 +5408,6 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
{ "sound", T_SOUND },
{ "cutscene", T_CUTSCENE },
{ "animsounds", T_ANIMSOUNDS },
{ "renamefile", T_RENAMEFILE },
{ "globalgameflags", T_GLOBALGAMEFLAGS },
{ "newgamechoices", T_NEWGAMECHOICES },
{ "localization" , T_LOCALIZATION },
Expand Down
1 change: 0 additions & 1 deletion source/duke3d/src/gamedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ extern int32_t g_numXStrings;
extern int32_t g_scriptVersion;
extern int32_t g_totalLines;
extern int32_t g_warningCnt;
extern uint32_t g_scriptcrc;
extern int32_t otherp;
extern uint8_t *bitptr;

Expand Down
1 change: 1 addition & 0 deletions source/duke3d/src/gameexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7344,6 +7344,7 @@ void G_RestoreMapState(void)

G_ClearFIFO();
G_ResetTimers(0);
G_ResetViewScreenData();
}
}

Expand Down
5 changes: 4 additions & 1 deletion source/duke3d/src/gamevars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int Gv_ReadSave(buildvfs_kfd kFile)
auto const siz = tabledivide32_branchfree(arrayAllocSize, readArray.size);

switch (aGameArrays[index].flags & GAMEARRAY_TYPE_MASK)
{
{
case 0:
{
if (siz == sizeof(int16_t))
Expand Down Expand Up @@ -1990,6 +1990,9 @@ void Gv_RefreshPointers(void)
#endif

aGameArrays[Gv_GetArrayIndex("gotpic")].pValues = (intptr_t *)&gotpic[0];
aGameArrays[Gv_GetArrayIndex("gotsector")].pValues = (intptr_t *)&gotsector[0];
aGameArrays[Gv_GetArrayIndex("radiusdmgstatnums")].pValues = (intptr_t *)&g_radiusDmgStatnums[0];
aGameArrays[Gv_GetArrayIndex("show2dsector")].pValues = (intptr_t *)&show2dsector[0];
aGameArrays[Gv_GetArrayIndex("tilesizx")].pValues = (intptr_t *)&tilesiz[0].x;
aGameArrays[Gv_GetArrayIndex("tilesizy")].pValues = (intptr_t *)&tilesiz[0].y;
}
3 changes: 0 additions & 3 deletions source/duke3d/src/osdfuncs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "premap.h"

int osdhightile = 1;
int osdshown = 0;

#ifdef EDUKE32_TOUCH_DEVICES
float osdscale = 2.f, osdrscale = 0.5f;
Expand Down Expand Up @@ -134,8 +133,6 @@ void dukeConsoleOnShowCallback(int shown)

mouseLockToWindow(lock);

osdshown = shown;

// XXX: it's weird to fake a keypress like this.
// if (numplayers == 1 && ((shown && !ud.pause_on) || (!shown && ud.pause_on)))
// KB_KeyDown[sc_Pause] = 1;
Expand Down
1 change: 0 additions & 1 deletion source/duke3d/src/osdfuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ void dukeConsoleOnShowCallback(int shown);
void dukeConsoleClearBackground(int numcols, int numrows);

extern int osdhightile;
extern int osdshown;
extern float osdscale, osdrscale;
7 changes: 1 addition & 6 deletions source/duke3d/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "android.h"
#endif

int32_t lastvisinc;
hudweapon_t hudweap;

#ifdef SPLITSCREEN_MOD_HACKS
Expand Down Expand Up @@ -3011,7 +3010,6 @@ enddisplayweapon:;
#define MAXHORIZVEL 256

int32_t g_myAimMode, g_myAimStat, g_oldAimStat;
int32_t mouseyaxismode = -1;
uint64_t g_lastInputTicks;

enum inputlock_t
Expand Down Expand Up @@ -4565,10 +4563,7 @@ static void P_ProcessWeapon(int playerNum)
if (PWEAPON(playerNum, pPlayer->curr_weapon, Shoots) != 0)
{
if (!(PWEAPON(playerNum, pPlayer->curr_weapon, Flags) & WEAPON_NOVISIBLE))
{
lastvisinc = (int32_t) totalclock+32;
pPlayer->visibility = 0;
}

P_SetWeaponGamevars(playerNum, pPlayer);
A_Shoot(pPlayer->i, PWEAPON(playerNum, pPlayer->curr_weapon, Shoots));
Expand Down Expand Up @@ -5081,7 +5076,7 @@ void P_ProcessInput(int playerNum)

int32_t cz[4], fz[4], hzhit[4], lzhit[4];
vec3_t pos[4] = { pPlayer->pos, pPlayer->pos, pPlayer->pos, pPlayer->pos };

int const thirdStep = pPlayer->autostep_sbw / 3;

pos[0].z += pPlayer->autostep_sbw;
Expand Down
1 change: 0 additions & 1 deletion source/duke3d/src/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ extern int32_t g_levelTextTime;
extern int32_t g_myAimMode;
extern int32_t g_numObituaries;
extern int32_t g_numSelfObituaries;
extern int32_t mouseyaxismode;
extern int32_t ticrandomseed;
extern uint64_t g_lastInputTicks;

Expand Down
4 changes: 4 additions & 0 deletions source/duke3d/src/premap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,10 @@ void G_ResetTimers(bool saveMoveCnt)

if (!saveMoveCnt)
g_moveThingsCount = 0;
}

void G_ResetViewScreenData(void)
{
for (int vscrIndex = 0; vscrIndex < MAX_ACTIVE_VIEWSCREENS; vscrIndex++)
{
if (g_activeVscrSprite[vscrIndex] >= 0)
Expand Down Expand Up @@ -2074,6 +2077,7 @@ int G_EnterLevel(int gameMode)
for (int i=g_interpolationCnt-1; i>=0; i--) bakipos[i] = *curipos[i];

G_ResetTimers(0); // Here we go
G_ResetViewScreenData();

Bmemcpy(currentboardfilename, boardfilename, BMAX_PATH);

Expand Down
1 change: 1 addition & 0 deletions source/duke3d/src/premap.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ void G_CacheMapData(void);
void G_FreeMapState(int levelNum);
void G_NewGame(int volumeNum, int levelNum, int skillNum);
void G_ResetTimers(bool saveMoveCnt);
void G_ResetViewScreenData();
void G_SetCrosshairColor(int32_t r,int32_t g,int32_t b);
void G_UpdateScreenArea(void);
void G_SetViewportShrink(int32_t dir);
Expand Down
1 change: 1 addition & 0 deletions source/duke3d/src/savegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2562,6 +2562,7 @@ static void postloadplayer(int32_t savegamep)
//8
// if (savegamep) ?
G_ResetTimers(0);
G_ResetViewScreenData();
P_SetupMiscInputSettings();

#ifdef USE_STRUCT_TRACKERS
Expand Down

0 comments on commit ff88c19

Please sign in to comment.