- put RedNukem game frontend into a namespace.

This commit is contained in:
Christoph Oelckers 2019-09-22 00:10:48 +02:00
parent 401a645ea1
commit 2dc051f7cf
71 changed files with 270 additions and 21 deletions

View file

@ -169,8 +169,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\source\rr\src\actors.h" />
<ClInclude Include="..\..\source\rr\src\android.h" />
<ClInclude Include="..\..\source\rr\src\in_android.h" />
<ClInclude Include="..\..\source\rr\src\anim.h" />
<ClInclude Include="..\..\source\rr\src\cheats.h" />
<ClInclude Include="..\..\source\rr\src\cmdline.h" />

View file

@ -7,9 +7,6 @@
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\android">
<UniqueIdentifier>{c0296ff5-d859-419b-a732-9596d77717dc}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
</Filter>
@ -126,12 +123,6 @@
<ClInclude Include="..\..\source\rr\src\common_game.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\source\rr\src\in_android.h">
<Filter>Header Files\android</Filter>
</ClInclude>
<ClInclude Include="..\..\source\rr\src\android.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\source\rr\src\cheats.h">
<Filter>Header Files</Filter>
</ClInclude>

View file

@ -379,7 +379,7 @@ void ChooseGame()
//API call succeeded, now , check return values
if (nResult == 1000)
{
gi = &Duke::Interface;
//gi = &Duke::Interface;
}
else if (nResult == 1001)
{

View file

@ -30,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "_control.h"
#include "control.h"
BEGIN_RR_NS
#ifndef function_private_h_
#define function_private_h_
// KEEPINSYNC lunatic/con_lang.lua
@ -388,3 +390,5 @@ static const char * joystickdigitaldefaults[MAXJOYDIGITAL] =
#endif
#endif
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef rts_private__
#define rts_private__
BEGIN_RR_NS
//===============
// TYPES
//===============
@ -47,4 +49,6 @@ typedef struct
char name[8];
} filelump_t;
END_RR_NS
#endif

View file

@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "duke3d.h"
BEGIN_RR_NS
#if KRANDDEBUG
# define ACTOR_STATIC
#else
@ -9708,3 +9710,5 @@ void G_MoveWorld(void)
g_moveWorldTime = (1-0.033)*g_moveWorldTime + 0.033*(timerGetHiTicks()-worldTime);
}
END_RR_NS

View file

@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "player.h"
# include "namesdyn.h"
BEGIN_RR_NS
#define MAXSLEEPDIST 16384
#define SLEEPTIME 1536
#define ZOFFSET (1<<8)
@ -337,4 +339,6 @@ EXTERN_INLINE int A_CheckEnemySprite(void const * const pSprite)
#endif
END_RR_NS
#endif

View file

@ -36,6 +36,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# include "animvpx.h"
#endif
BEGIN_RR_NS
// animsound_t.sound
EDUKE32_STATIC_ASSERT(INT16_MAX >= MAXSOUNDS);
@ -598,3 +600,4 @@ end_anim:
return !running;
}
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef anim_h_
#define anim_h_
BEGIN_RR_NS
typedef struct {
uint16_t frame;
int16_t sound;
@ -46,4 +48,6 @@ extern dukeanim_t * Anim_Create(const char *fn);
int32_t Anim_Play(const char *fn);
void Anim_Init(void);
END_RR_NS
#endif

View file

@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "osdcmds.h"
#include "cheats.h"
BEGIN_RR_NS
// KEEPINSYNC game.h: enum cheatindex_t
char CheatStrings [NUMCHEATS][MAXCHEATLEN] =
{
@ -903,3 +905,4 @@ void G_DoCheats(void)
}
}
}
END_RR_NS

View file

@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma once
BEGIN_RR_NS
#define MAXCHEATLEN 20
#define NUMCHEATCODES (int32_t)ARRAY_SIZE(CheatStrings)
@ -104,3 +106,5 @@ enum CheatCodeFunctions
CHEATFUNC_DEBUG,
NUMCHEATFUNCS,
};
END_RR_NS

View file

@ -28,6 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "renderlayer.h"
#include "cmdline.h"
BEGIN_RR_NS
int32_t g_commandSetup = 0;
int32_t g_noSetup = 0;
int32_t g_noAutoLoad = 0;
@ -794,3 +796,4 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv)
} while (i < argc);
}
}
END_RR_NS

View file

@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h"
BEGIN_RR_NS
extern void G_CheckCommandLine(int32_t argc, char const * const * argv);
extern void G_ShowParameterHelp(void);
extern void G_ShowDebugHelp(void);
@ -38,4 +40,7 @@ extern const char *CommandMap;
extern const char *CommandName;
extern int32_t g_forceWeaponChoice;
extern int32_t g_fakeMultiMode;
END_RR_NS
#endif // cmdline_h__

View file

@ -27,6 +27,8 @@
#include "common.h"
#include "common_game.h"
BEGIN_RR_NS
struct grpfile_t const *g_selectedGrp;
int32_t g_gameType = GAMEFLAG_DUKE;
@ -1192,3 +1194,5 @@ void Duke_CommonCleanup(void)
}
#endif
END_RR_NS

View file

@ -10,6 +10,9 @@
#include "collections.h"
#include "grpscan.h"
BEGIN_RR_NS
extern int g_useCwd;
#ifndef APPNAME
@ -162,4 +165,6 @@ extern int32_t S_OpenAudio(const char *fn, char searchfirst, uint8_t ismusic);
void G_AddGroup(const char* buffer);
void G_AddPath(const char* buffer);
END_RR_NS
#endif

View file

@ -38,6 +38,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define __SETUP__ // JBF 20031211
#include "_functio.h"
BEGIN_RR_NS
hashtable_t h_gamefuncs = { NUMGAMEFUNCTIONS<<1, NULL };
int32_t CONFIG_FunctionNameToNum(const char *func)
@ -1016,3 +1018,4 @@ int32_t CONFIG_SetMapBestTime(uint8_t const * const mapmd4, int32_t const tm)
return 0;
}
END_RR_NS

View file

@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "function.h"
BEGIN_RR_NS
#define SETUPNAMEPARM "SETUPFILE"
int32_t CONFIG_ReadSetup( void );
@ -45,4 +47,6 @@ int32_t CONFIG_AnalogNameToNum(const char *func);
const char *CONFIG_AnalogNumToName(int32_t func);
void CONFIG_SetDefaults(void);
END_RR_NS
#endif

View file

@ -30,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "input.h"
#include "screens.h"
BEGIN_RR_NS
char g_firstDemoFile[BMAX_PATH];
FILE *g_demo_filePtr = (FILE *)NULL; // write
@ -1151,3 +1153,5 @@ nextdemo_nomenu:
// return so that e.g. the title can be shown
return 1;
}
END_RR_NS

View file

@ -25,6 +25,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h"
BEGIN_RR_NS
#define DEMOFN_FMT "edemo%03d.edm"
#define LDEMOFN_FMT "demo%d.dmo"
#define MAXDEMOS 1000
@ -64,4 +67,6 @@ int32_t krd_print(const char *filename);
void krd_enable(int32_t which);
#endif
END_RR_NS
#endif

View file

@ -34,13 +34,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "keyboard.h"
#include "pragmas.h"
#ifdef POLYMER
#include "polymer.h"
#else
#ifdef USE_OPENGL
#include "polymost.h"
#endif
#endif
#include "polymost.h"
BEGIN_RR_NS
#define HEAD2 APPNAME
@ -113,6 +109,8 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
// so that debugging with valgrind --smc-check=none is possible:
//#define DEBUG_VALGRIND_NO_SMC
END_RR_NS
#include "_rts.h"
#include "actors.h"
#include "common_game.h"
@ -138,6 +136,8 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
#include "sounds.h"
#include "soundsdyn.h"
BEGIN_RR_NS
static inline int32_t G_HaveActor(int spriteNum)
{
return g_tile[spriteNum].execPtr!=NULL;
@ -148,4 +148,6 @@ static inline int32_t G_DefaultActorHealth(int spriteNum)
return G_HaveActor(spriteNum) ? g_tile[spriteNum].execPtr[0] : 0;
}
END_RR_NS
#endif

View file

@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef function_public_h_
#define function_public_h_
BEGIN_RR_NS
#define NUMGAMEFUNCTIONS 62
#define MAXGAMEFUNCLEN 32
@ -103,4 +105,7 @@ enum GameFunction_t
gamefunc_Third_Person_View,
gamefunc_Toggle_Crouch, // TODO: Implement properly for mp
};
END_RR_NS
#endif

View file

@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "cmdline.h"
#include "palette.h"
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
// also uncomment ENGINE_CLEAR_SCREEN in build/src/engine_priv.h.
//#define DEBUG_MIRRORS_ONLY
@ -65,6 +66,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# endif
#endif /* _WIN32 */
BEGIN_RR_NS
void Duke_CommonCleanup(void);
extern const char* G_DefaultDefFile(void);
extern const char* G_DefFile(void);
@ -8895,3 +8899,4 @@ GameInterface Interface = {
startwin_idle,
startwin_run
};
END_RR_NS

View file

@ -35,6 +35,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "net.h"
#include "mmulti.h"
BEGIN_RR_NS
#ifndef ONLY_USERDEFS
// Compile game-side legacy Room over Room code?
@ -595,3 +597,5 @@ EXTERN_INLINE void SetIfGreater(int32_t *variable, int32_t potentialValue)
#endif
#endif
END_RR_NS

View file

@ -34,6 +34,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "osd.h"
#include "crc32.h"
BEGIN_RR_NS
int32_t g_scriptVersion = 14; // 13 = 1.3D-style CON files, 14 = 1.4/1.5 style CON files
char g_scriptFileName[BMAX_PATH] = "(none)"; // file we're currently compiling
@ -2514,3 +2516,4 @@ void C_ReportError(int32_t iError)
}
}
END_RR_NS

View file

@ -29,6 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "common.h" // tokenlist
#include "player.h" // projectile_t
BEGIN_RR_NS
enum
{
LABEL_ANY = -1,
@ -310,5 +312,6 @@ enum ScriptKeywords_t
};
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua
END_RR_NS
#endif // gamedef_h_

View file

@ -31,6 +31,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef gamedefs_public_h_
#define gamedefs_public_h_
BEGIN_RR_NS
// config file name
#define SETUPFILENAME APPBASENAME ".cfg"
@ -61,5 +64,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define DEFAULTJOYSTICKANALOGUESATURATE 9500
#endif
END_RR_NS
#endif

View file

@ -36,6 +36,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "debugbreak.h"
BEGIN_RR_NS
#if KRANDDEBUG
# define GAMEEXEC_INLINE
# define GAMEEXEC_STATIC
@ -2705,3 +2707,4 @@ safe_delete:
if (vm.flags & VM_SAFEDELETE)
A_DeleteSprite(spriteNum);
}
END_RR_NS

View file

@ -28,6 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "gamedef.h" // vmstate_t
#include "events_defs.h"
BEGIN_RR_NS
extern int32_t ticrandomseed;
@ -61,4 +63,6 @@ void G_GetTimeDate(int32_t * pValues);
int G_StartTrack(int levelNum);
void VM_UpdateAnim(int spriteNum, int32_t *pData);
END_RR_NS
#endif

View file

@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "global.h"
#include "duke3d.h"
BEGIN_RR_NS
user_defs ud;
const char *s_buildDate = "20120522";
@ -124,3 +126,4 @@ char CheatKeys[2] = { sc_D, sc_N };
char g_setupFileName[BMAX_PATH] = SETUPFILENAME;
END_RR_NS

View file

@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sector.h"
#include "sounds.h"
BEGIN_RR_NS
#define MAXMINECARTS 16
#define MAXJAILDOORS 32
#define MAXLIGHTNINSECTORS 64
@ -319,4 +321,6 @@ EXTERN_INLINE void G_RestoreInterpolations(void) //Stick at end of drawscreen
#endif
END_RR_NS
#endif

View file

@ -32,6 +32,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "common_game.h"
#include "grpscan.h"
BEGIN_RR_NS
//static void process_vaca13(int32_t crcval);
static void process_vacapp15(int32_t crcval);
@ -538,3 +540,5 @@ static void process_vacapp15(int32_t crcval)
initgroupfile("VACATION.PRG");
}
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef grpscan_h_
#define grpscan_h_
BEGIN_RR_NS
#define MAXLISTNAMELEN 32
// List of internally-known GRP files
@ -99,4 +101,6 @@ extern grpfile_t * FindGroup(int32_t crcval);
int32_t ScanGroups(void);
void FreeGroups(void);
END_RR_NS
#endif

View file

@ -31,6 +31,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "input.h"
#include "menus.h"
BEGIN_RR_NS
int32_t I_CheckAllInput(void)
{
return (
@ -345,3 +348,4 @@ int32_t I_EnterText(char *t, int32_t maxlength, int32_t flags)
return 0;
}
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef input_h_
#define input_h_
BEGIN_RR_NS
extern int32_t I_CheckAllInput(void);
extern void I_ClearAllInput(void);
@ -63,4 +65,6 @@ enum EnterTextFlags_t {
extern int32_t I_EnterText(char *t, int32_t maxlength, int32_t flags);
END_RR_NS
#endif

View file

@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma once
BEGIN_RR_NS
enum dukeinv_t
{
GET_STEROIDS, // 0
@ -56,3 +58,4 @@ extern int const icon_to_inv[ICON_MAX];
extern int const inv_to_icon[GET_MAX];
END_RR_NS

View file

@ -22,6 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef KEYS_H
BEGIN_RR_NS
#define KEYS_H
#define NUM_CODES 128
@ -145,4 +148,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define asc_Enter 13
#define asc_Space 32
END_RR_NS
#endif

View file

@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mmulti.h"
BEGIN_RR_NS
// Macros, some from SW source
static FORCE_INLINE int32_t krand2(void)
@ -209,4 +211,6 @@ static FORCE_INLINE int32_t krand2(void)
#define T5(i) actor[i].t_data[4]
#define T6(i) actor[i].t_data[5]
END_RR_NS
#endif

View file

@ -4,6 +4,9 @@
#include "mdump.h"
#include <tchar.h>
BEGIN_RR_NS
LPCSTR MiniDumper::m_szAppName;
MiniDumper g_dumper("eduke32");
@ -111,4 +114,6 @@ LONG MiniDumper::TopLevelFilter( struct _EXCEPTION_POINTERS *pExceptionInfo )
::MessageBox( NULL, szResult, m_szAppName, MB_OK );
return retval;
}
}
END_RR_NS

View file

@ -3,6 +3,8 @@
#define NEED_MMSYSTEM_H
#include "windows_inc.h"
BEGIN_RR_NS
// based on dbghelp.h
typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
@ -20,3 +22,5 @@ private:
public:
MiniDumper( LPCSTR szAppName );
};
END_RR_NS

View file

@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "menus.h"
#include "cheats.h"
BEGIN_RR_NS
// common positions
#define MENU_MARGIN_REGULAR 40
#define MENU_MARGIN_WIDE 32
@ -7729,3 +7731,4 @@ void M_DisplayMenus(void)
CAMERADIST = 65536;
}
}
END_RR_NS

View file

@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h"
BEGIN_RR_NS
enum MenuIndex_t {
MENU_NULL = INT32_MIN, // sentinel for "do nothing"
@ -504,5 +505,6 @@ extern int32_t m_mousewake_watchpoint, m_menuchange_watchpoint;
# define MOUSEINACTIVECONDITIONAL(condition) (!MOUSEACTIVECONDITION && (condition))
# define MOUSEWATCHPOINTCONDITIONAL(condition) ((condition) || m_mousewake_watchpoint || m_menuchange_watchpoint == 3)
END_RR_NS
#endif

View file

@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "namesdyn.h"
#include "global.h"
BEGIN_RR_NS
#define DVPTR(x) &x
int16_t DynamicTileMap[MAXTILES];
@ -3031,3 +3033,4 @@ void G_InitDynamicTiles(void)
MENUSCREEN = LOADSCREEN = BETASCREEN;
#endif
}
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef namesdyn_h__
#define namesdyn_h__
BEGIN_RR_NS
#define SECTOREFFECTOR__STATIC 1
#define ACTIVATOR__STATIC 2
@ -3580,4 +3582,7 @@ extern int32_t SLINGBLADE_WEAPON;
extern int32_t CHICKEN_WEAPON;
#define DYNAMICWEAPONMAP(Weaponnum) (DynamicWeaponMap[Weaponnum])
END_RR_NS
#endif // namesdyn_h__

View file

@ -33,6 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "lz4.h"
#include "crc32.h"
BEGIN_RR_NS
#define TIMERUPDATESIZ 32
ENetHost *g_netServer = NULL;
@ -4070,3 +4072,5 @@ void Net_ReceiveMapVoteCancel(uint8_t *pbuf)
}
#endif // !defined NETCODE_DISABLE
END_RR_NS

View file

@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "enet/enet.h"
BEGIN_RR_NS
// net packet specification/compatibility version
#define NETVERSION 1
@ -392,4 +394,6 @@ void faketimerhandler(void);
#endif
END_RR_NS
#endif // netplay_h_

View file

@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "savegame.h"
#include "sbar.h"
BEGIN_RR_NS
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
@ -1598,3 +1600,4 @@ int32_t registerosdcommands(void)
return 0;
}
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef osdcmds_h_
#define osdcmds_h_
BEGIN_RR_NS
struct osdcmd_cheatsinfo {
int32_t cheatnum; // -1 = none, else = see DoCheats()
int32_t volume,level;
@ -45,5 +47,7 @@ extern const char *const ConsoleButtons[];
extern uint32_t cl_cheatmask;
END_RR_NS
#endif // osdcmds_h_

View file

@ -28,6 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "osdfuncs.h"
#include "premap.h"
BEGIN_RR_NS
int32_t osdhightile = 1;
int32_t osdshown = 0;
@ -181,3 +183,5 @@ void GAME_clearbackground(int32_t numcols, int32_t numrows)
}
#undef OSD_SCALE
END_RR_NS

View file

@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//-------------------------------------------------------------------------
BEGIN_RR_NS
void GAME_drawosdchar(int32_t x, int32_t y, char ch, int32_t shade, int32_t pal);
void GAME_drawosdstr(int32_t x, int32_t y, const char *ch, int32_t len, int32_t shade, int32_t pal);
void GAME_drawosdcursor(int32_t x, int32_t y, int32_t type, int32_t lastkeypress);
@ -32,3 +34,5 @@ extern int32_t osdhightile;
extern int32_t osdshown;
extern float osdscale, osdrscale;
extern float osdscale2, osdrscale2;
END_RR_NS

View file

@ -25,6 +25,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "demo.h"
#include "enet/enet.h"
BEGIN_RR_NS
int32_t PHEIGHT = PHEIGHT_DUKE;
int32_t lastvisinc;
@ -8128,3 +8131,5 @@ int P_HasKey(int sectNum, int playerNum)
}
return 0;
}
END_RR_NS

View file

@ -28,6 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "fix16.h"
#include "net.h"
BEGIN_RR_NS
extern int32_t g_mostConcurrentPlayers;
#define MOVEFIFOSIZ 256
@ -308,4 +310,6 @@ static inline int P_GetP(const void *pSprite)
// Get the player index given an APLAYER sprite index.
static inline int P_Get(int32_t spriteNum) { return P_GetP((const uspritetype *)&sprite[spriteNum]); }
END_RR_NS
#endif

View file

@ -28,6 +28,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "savegame.h"
#include "cmdline.h"
extern coltypef fogtable[MAXPALOOKUPS];
BEGIN_RR_NS
static int32_t g_whichPalForPlayer = 9;
static uint8_t precachehightile[2][MAXTILES>>3];
@ -2622,7 +2626,6 @@ void G_SetFog(int fogtype)
static char *lut0,*lut30,*lut33,*lut23,*lut8;
#ifdef USE_OPENGL
static palette_t flut0,flut30,flut33,flut23,flut8;
extern coltypef fogtable[MAXPALOOKUPS];
#endif
if (!makeTables)
{
@ -2695,3 +2698,5 @@ void G_SetFog(int fogtype)
#endif
}
}
END_RR_NS

View file

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef premap_h_
#define premap_h_
BEGIN_RR_NS
extern int16_t g_ambientLotag[64];
extern int16_t g_ambientHitag[64];
extern int32_t g_levelTextTime;
@ -49,4 +51,6 @@ extern int32_t fragbarheight(void);
void G_SetFog(int fogtype);
void G_InitRRRASkies(void);
END_RR_NS
#endif

View file

@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "duke3d.h"
BEGIN_RR_NS
static int32_t rts_numlumps;
static void **rts_lumpcache;
@ -169,3 +170,4 @@ void *RTS_GetSound(int32_t lump)
return rts_lumpcache[lump];
}
END_RR_NS

View file

@ -29,6 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef rts_public_
#define rts_public_
BEGIN_RR_NS
extern char rts_lumplockbyte[11];
/* Files with a .rts extension are idlink files with multiple lumps */
@ -41,4 +43,6 @@ int32_t RTS_SoundLength(int32_t lump);
void *RTS_GetSound(int32_t lump);
END_RR_NS
#endif

View file

@ -26,6 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "prlights.h"
#include "savegame.h"
BEGIN_RR_NS
static OutputFileCounter savecounter;
// For storing pointers in files.
@ -2023,3 +2026,5 @@ static void postloadplayer(int32_t savegamep)
////////// END GENERIC SAVING/LOADING SYSTEM //////////
END_RR_NS

View file

@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "game.h"
BEGIN_RR_NS
# define SV_MAJOR_VER 1
#define SV_MINOR_VER 7
@ -148,4 +149,6 @@ enum
void G_Util_PtrToIdx(void *ptr, int32_t count, const void *base, int32_t mode);
void G_Util_PtrToIdx2(void *ptr, int32_t count, size_t stride, const void *base, int32_t const mode);
END_RR_NS
#endif

View file

@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h"
#include "sbar.h"
BEGIN_RR_NS
int32_t althud_flashing = 1;
int32_t althud_numbertile = 2930;
int32_t althud_numberpal = 0;
@ -1469,3 +1471,5 @@ void G_DrawBackground(void)
pus = pub = NUMPAGES;
}
END_RR_NS

View file

@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma once
BEGIN_RR_NS
extern int32_t althud_flashing;
extern int32_t althud_numberpal;
extern int32_t althud_numbertile;
@ -37,3 +39,5 @@ int32_t sbarxr16(int32_t x);
int32_t sbary16(int32_t y);
void G_DrawInventory(const DukePlayer_t *p);
void G_DrawStatusBar(int32_t snum);
END_RR_NS

View file

@ -33,6 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "demo.h"
#include "mdsprite.h"
BEGIN_RR_NS
#define COLOR_RED redcol
#define COLOR_WHITE whitecol
@ -3244,3 +3246,4 @@ void G_BonusScreenRRRA(int32_t bonusonly)
g_vixenLevel = 0;
}
END_RR_NS

View file

@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//-------------------------------------------------------------------------
BEGIN_RR_NS
extern void G_DisplayExtraScreens(void);
extern void G_DisplayLogo(void);
extern void G_DoOrderScreen(void);
@ -44,3 +46,5 @@ extern int32_t dr_yxaspect, dr_viewingrange;
extern int32_t g_noLogoAnim, g_noLogo;
extern void G_FadePalette(int32_t r, int32_t g, int32_t b, int32_t e);
END_RR_NS

View file

@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sbar.h"
#include "menus.h"
BEGIN_RR_NS
// get the string length until the next '\n'
int32_t G_GetStringLineLength(const char *text, const char *end, const int32_t iter)
{
@ -1166,3 +1168,4 @@ void P_DoQuote(int32_t q, DukePlayer_t *p)
pub = NUMPAGES;
pus = NUMPAGES;
}
END_RR_NS

View file

@ -24,6 +24,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "menus.h"
BEGIN_RR_NS
#define MAXUSERQUOTES 6
extern int32_t user_quote_time[MAXUSERQUOTES];
@ -94,3 +96,4 @@ extern void G_AddCoordsFromRotation(vec2_t *coords, const vec2_t *unitDirection,
extern vec2_t G_ScreenText(int32_t font, int32_t x, int32_t y, int32_t z, int32_t blockangle, int32_t charangle, const char *str, int32_t shade, int32_t pal, int32_t o, int32_t alpha, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2);
extern vec2_t G_ScreenTextShadow(int32_t sx, int32_t sy, int32_t font, int32_t x, int32_t y, int32_t z, int32_t blockangle, int32_t charangle, const char *str, int32_t shade, int32_t pal, int32_t o, int32_t alpha, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2);
END_RR_NS

View file

@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "duke3d.h"
#include "input.h"
BEGIN_RR_NS
// PRIMITIVE
static int g_haltSoundHack = 0;
@ -5297,3 +5299,4 @@ void G_Thunder(void)
}
}
END_RR_NS

View file

@ -29,6 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "namesdyn.h" // for G_GetForcefieldPicnum()
#include "player.h" // playerspawn_t
BEGIN_RR_NS
#define MAXCYCLERS 1024
#define MAXANIMATES 1024
#define MAXANIMWALLS 512
@ -178,4 +180,6 @@ EXTERN_INLINE int32_t G_CheckPlayerInSector(int32_t sect)
#endif
END_RR_NS
#endif

View file

@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "renderlayer.h" // for win_gethwnd()
#include <atomic>
BEGIN_RR_NS
#define DQSIZE 128
int32_t g_numEnvSoundsPlaying, g_highestSoundIdx = 0;
@ -977,3 +979,5 @@ bool S_CheckSoundPlaying(int spriteNum, int soundNum)
if (EDUKE32_PREDICT_FALSE((unsigned)soundNum > (unsigned)g_highestSoundIdx)) return 0;
return (spriteNum == -1) ? (g_soundlocks[soundNum] > 200) : (g_sounds[soundNum].num != 0);
}
END_RR_NS

View file

@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sounds_common.h"
BEGIN_RR_NS
// KEEPINSYNC lunatic/con_lang.lua
#define MAXSOUNDS 4096
#define MAXSOUNDINSTANCES 8
@ -98,4 +100,6 @@ static inline bool S_IsAmbientSFX(int spriteNum)
return (sprite[spriteNum].picnum == MUSICANDSFX && sprite[spriteNum].lotag < 999);
}
END_RR_NS
#endif

View file

@ -29,6 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "soundsdyn.h"
#include "global.h"
BEGIN_RR_NS
#ifdef DYNSOUNDREMAP_ENABLE
# define DVPTR(x) &x
#else
@ -381,3 +383,4 @@ void G_InitDynamicSounds(void)
#endif
}
END_RR_NS

View file

@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//-------------------------------------------------------------------------
BEGIN_RR_NS
#define DYNSOUNDREMAP_ENABLE
@ -326,3 +328,5 @@ extern int32_t BIGBANG;
#define DYNAMICSOUNDMAP(Soundnum) (Soundnum)
#endif
END_RR_NS

View file

@ -32,6 +32,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "grpscan.h"
#include "gtkpixdata.h"
BEGIN_RR_NS
enum
{
NONE,
@ -883,3 +885,4 @@ int32_t startwin_run(void)
return retval;
}
END_RR_NS

View file

@ -48,6 +48,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "startwin.game.h"
#include "windows_inc.h"
BEGIN_RR_NS
#define TAB_CONFIG 0
#define TAB_MESSAGES 1
@ -711,4 +713,7 @@ int32_t startwin_run(void)
return done;
}
END_RR_NS
#endif // STARTUP_SETUP_WINDOW