Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jones3D/Display/JonesHud.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include <Jones3D/Display/jonesConfig.h>
#include <Jones3D/Display/JonesReticle.h>
#include <Jones3D/Main/jonesLevel.h>
#include <Jones3D/Main/jonesMain.h>
#include <Jones3D/Main/JonesLevel.h>
#include <Jones3D/Main/JonesMain.h>
#include <Jones3D/Main/jonesString.h>
#include <Jones3D/Play/jonesCog.h>
#include <Jones3D/Play/jonesInventory.h>
Expand Down
6 changes: 3 additions & 3 deletions Jones3D/Display/JonesReticle.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ JonesAimReticle JonesReticle_reticle = { 0 };


// Add to stdColor.h or a utility header
inline rdVector4 JonesReticle_ColorToVector4(tStdColor color)
static inline rdVector4 JonesReticle_ColorToVector4(tStdColor color)
{
rdVector4 result;
result.red = STD_GETRED(color) / 255.0f;
Expand All @@ -133,7 +133,7 @@ inline rdVector4 JonesReticle_ColorToVector4(tStdColor color)
return result;
}

inline tStdColor JonesReticle_ColorFromVector4(const rdVector4* pVector)
static inline tStdColor JonesReticle_ColorFromVector4(const rdVector4* pVector)
{
return STD_RGBA(
(uint8_t)(pVector->red * 255.0f),
Expand Down Expand Up @@ -275,7 +275,7 @@ bool JonesReticle_IsEnabled(void)
/**
* Calculate easing function for smooth animation(ease - out)
*/
inline float J3DAPI JonesReticle_EaseOut(float t)
static inline float J3DAPI JonesReticle_EaseOut(float t)
{
// Ease out cubic: 1 - (1-t)^3
float oneMinusT = 1.0f - t;
Expand Down
2 changes: 1 addition & 1 deletion Jones3D/Display/jonesConfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <sith/Devices/sithControl.h>
#include <sith/Devices/sithSoundMixer.h>
#include <sith/DSS/sithGamesave.h>
#include <sith/Dss/sithGamesave.h>
#include <sith/Engine/sithRender.h>
#include <sith/Gameplay/sithOverlayMap.h>
#include <sith/Gameplay/sithPlayer.h>
Expand Down
2 changes: 1 addition & 1 deletion Jones3D/Main/JonesLevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static const JonesLevelInfo JonesMain_aNdyLevelLoadInfos[JONESLEVEL_NUMLEVELS] =
}
};

inline bool J3DAPI JonesLevel_IsValidLevelNum(size_t levelNum)
static inline bool J3DAPI JonesLevel_IsValidLevelNum(size_t levelNum)
{
if ( levelNum != JONESLEVEL_GENERICLEVELNUM && levelNum < JONESLEVEL_NUMLEVELS ) {
return true;
Expand Down
4 changes: 2 additions & 2 deletions Jones3D/Main/JonesMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <rdroid/Primitives/rdFont.h>
#include <rdroid/Raster/rdCache.h>

#include <sith/DSS/sithDSS.h>
#include <sith/DSS/sithGamesave.h>
#include <sith/Dss/sithDSS.h>
#include <sith/Dss/sithGamesave.h>
#include <sith/Devices/sithComm.h>
#include <sith/Devices/sithConsole.h>
#include <sith/Devices/sithSound.h>
Expand Down
2 changes: 1 addition & 1 deletion Jones3D/Play/JonesControl.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "JonesControl.h"
#include <j3dcore/j3dhook.h>

#include <Jones3D/Display/JonesConfig.h>
#include <Jones3D/Display/jonesConfig.h>
#include <Jones3D/Display/JonesConsole.h>
#include <Jones3D/Main/JonesMain.h>
#include <Jones3D/RTI/symbols.h>
Expand Down
4 changes: 2 additions & 2 deletions Jones3D/types.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef JONES3D_TYPES_H
#define JONES3D_TYPES_H
#define STRICT
#include <Windows.h>
#include <CommCtrl.h>
#include <windows.h>
#include <commctrl.h>
#include <stdint.h>

#include <j3dcore/j3d.h>
Expand Down
3 changes: 2 additions & 1 deletion Libs/j3dcore/j3d.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#ifndef J3DCORE_H
#define J3DCORE_H
#include <assert.h> // static_assert on GCC/MinGW
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
Expand Down Expand Up @@ -51,7 +52,7 @@
# define STRICT
# endif
# define WIN32_LEAN_AND_MEAN
# include <Windows.h>
# include <windows.h>
# define strcmpi _strcmpi
# define strncmpi _strnicmp
# define wstrcmpi _wcsicmp
Expand Down
4 changes: 2 additions & 2 deletions Libs/j3dcore/j3dhook.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ J3D_EXTERN_C_START
* @param endAddress The end address of the region to modify
* @return true if successful, false otherwise
*/
inline bool J3DStartHookContext(J3DHookContext* pCtx, uintptr_t startAddress, uintptr_t endAddress)
static inline bool J3DStartHookContext(J3DHookContext* pCtx, uintptr_t startAddress, uintptr_t endAddress)
{
if ( endAddress <= startAddress ) {
return false;
Expand All @@ -113,7 +113,7 @@ inline bool J3DStartHookContext(J3DHookContext* pCtx, uintptr_t startAddress, ui
* @param pCtx The pointer to a J3DHookContext structure
* @return true if successful, false otherwise
*/
inline bool J3DEndHookContext(J3DHookContext* pCtx)
static inline bool J3DEndHookContext(J3DHookContext* pCtx)
{
DWORD temp;
return VirtualProtect((LPVOID)pCtx->startAddress, pCtx->size, pCtx->oldProtect, &temp);
Expand Down
2 changes: 1 addition & 1 deletion Libs/rdroid/Engine/rdCamera.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void rdCamera_ResetGlobals(void)
memset(&rdCamera_g_camMatrix, 0, sizeof(rdCamera_g_camMatrix));
}

inline float rdCamera_ClampFOV(float fov)
static inline float rdCamera_ClampFOV(float fov)
{
return STDMATH_CLAMP(fov, RDCAMERA_FOVMIN, RDCAMERA_FOVMAX);
}
Expand Down
2 changes: 1 addition & 1 deletion Libs/rdroid/Engine/rdQClip.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <rdroid/Engine/rdClip.h>
#include <rdroid/Main/rdroid.h>
#include <rdroid/Math/rdvector.h>
#include <rdroid/Math/rdVector.h>
#include <rdroid/RTI/symbols.h>

#include <std/General/stdUtil.h>
Expand Down
1 change: 1 addition & 0 deletions Libs/rdroid/Raster/rdCache.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <std/General/stdUtil.h>
#include <std/Win95/std3D.h>

#include <float.h>
#include <math.h>
#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion Libs/sith/Cog/sithCogFunctionSector.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <rdroid/Math/rdVector.h>

#include <sith/Cog/sithCog.h>
#include <sith/Cog/sithCogexec.h>
#include <sith/Cog/sithCogExec.h>
#include <sith/Engine/sithAnimate.h>
#include <sith/World/sithSector.h>
#include <sith/World/sithSurface.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/sith/Cog/sithCogFunctionSound.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <sith/RTI/symbols.h>

#include <sith/Cog/sithCog.h>
#include <sith/Cog/sithCogexec.h>
#include <sith/Cog/sithCogExec.h>
#include <sith/Devices/sithComm.h>
#include <sith/Devices/sithSound.h>
#include <sith/Devices/sithSoundMixer.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/sith/Cog/sithCogFunctionSurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <rdroid/Math/rdVector.h>

#include <sith/Cog/sithCog.h>
#include <sith/Cog/sithCogexec.h>
#include <sith/Cog/sithCogExec.h>
#include <sith/Engine/sithAnimate.h>
#include <sith/World/sithSector.h>
#include <sith/World/sithSurface.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/sith/Dss/sithDSSCog.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <j3dcore/j3dhook.h>

#include <sith/Cog/sithCog.h>
#include <sith/Dss/sithDss.h>
#include <sith/Dss/sithDSS.h>
#include <sith/Dss/sithMulti.h>
#include <sith/RTI/symbols.h>
#include <sith/World/sithThing.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/sith/Main/sithCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ J3D_EXTERN_C_START
void sithCommand_RegisterCommands(void);


inline bool sithCommand_ParseBool(const char* pStr, bool* pOut) // Added
static inline bool sithCommand_ParseBool(const char* pStr, bool* pOut) // Added
{
if ( !pStr || !pOut ) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions Libs/smush/Tests/SmushSoundTest.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include <string.h>

#include <j3dcore/j3d.h>
#include <Windows.h>
#include <windows.h>
#include <mmsystem.h>
#include <Mmreg.h>
#include <mmreg.h>
#if defined (J3D_DIRECTX6)
#include <DirectX6/dsound.h>
#elif defined (J3D_DIRECTX9)
Expand Down
4 changes: 2 additions & 2 deletions Libs/smush/insane/Sound/Dsnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <stddef.h>
#include <string.h>

#include <Windows.h>
#include <windows.h>
#include <mmsystem.h>
#include <Mmreg.h>
#include <mmreg.h>
#include <sound/Driver.h>

#include <smush/insane/Sound/Engine.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/sound/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define SOUND_TYPES_H
#include <stddef.h>
#include <stdint.h>
#include <Mmreg.h>
#include <mmreg.h>
#include <j3dcore/j3d.h>
#include <rdroid/types.h>

Expand Down
4 changes: 2 additions & 2 deletions Libs/std/General/Tests/stdPlatformTest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Windows.h>
#include <DbgHelp.h>
#include <windows.h>
#include <dbghelp.h>
#include <unity_fixture.h>

#include <stdint.h>
Expand Down
4 changes: 4 additions & 0 deletions Libs/std/General/std.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ void J3DAPI stdStartup(tHostServices* pHS)
// TODO: Remove when all round and rand float functions are replaced && updated
// TODO: consider setting FE_DOWNWARD for round functions (lrintf); i.e.: fesetround(FE_DOWNWARD) to mimic same behavior as OG
short tmp = 0;
#ifdef _MSC_VER
__asm fnstcw word ptr[tmp];
#else
__asm__ __volatile__("fnstcw %0" : "=m"(tmp)); // Altered: GCC/MinGW inline assembler syntax for the same instruction
#endif
word_183962C = tmp;

// The following flags control in binary (Indy3D.exe) FPU rounding control flags for frndint (floorf, ceilf) and fistp (lrintf)
Expand Down
2 changes: 1 addition & 1 deletion Libs/std/General/stdColor.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void stdColor_DecodeRGBA(uint32_t encoded, const ColorInfo* ci, uint8_t* r, uint
uint32_t stdColor_Recode(uint32_t encoded, const ColorInfo* pSrcCI, const ColorInfo* pDestCI); // Added

// Added
inline void stdColor_CalcColorBits(uint32_t bitmask, uint32_t* cbpp, int32_t* posShift, int32_t* posShiftRight)
static inline void stdColor_CalcColorBits(uint32_t bitmask, uint32_t* cbpp, int32_t* posShift, int32_t* posShiftRight)
{
if ( !cbpp || !posShift || !posShiftRight )
{
Expand Down
4 changes: 2 additions & 2 deletions Libs/std/General/stdConffile.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int J3DAPI stdConffile_Read(void* pData, size_t size);
int J3DAPI stdConffile_ReadArgsFromStr(char* pStr);
int stdConffile_ReadArgs(void);
int stdConffile_ReadLine(void);
int stdConffile_ScanLine(const char* pFormat, ...); // Added
static inline int stdConffile_ScanLine(const char* pFormat, ...); // Added

tFileHandle stdConffile_GetFileHandle(void);
tFileHandle stdConffile_GetWriteFileHandle(void); // Added
Expand Down Expand Up @@ -79,7 +79,7 @@ void stdConffile_ResetGlobals(void);
* a pointer to the data and the size of the receiving buffer (as an `rsize_t` type),
* where the size may be 1 when using `%c` to read a single character.
*/
inline int stdConffile_ScanLine(const char* pFormat, ...)
static inline int stdConffile_ScanLine(const char* pFormat, ...)
{
if ( !stdConffile_ReadLine() )
{
Expand Down
2 changes: 1 addition & 1 deletion Libs/std/General/stdHashtbl.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "std.h"
#include "stdHashtbl.h"
#include "stdLinklist.h"
#include "stdLinkList.h"
#include "stdMemory.h"
#include "stdUtil.h"

Expand Down
2 changes: 1 addition & 1 deletion Libs/std/General/stdPlatform.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define STRICT
#include <Windows.h> // timeGetTime, include first to avoid undefined warning due to WIN32_LEAN_AND_MEAN
#include <windows.h> // timeGetTime, include first to avoid undefined warning due to WIN32_LEAN_AND_MEAN
#include <dbghelp.h>
#include <wchar.h>

Expand Down
12 changes: 6 additions & 6 deletions Libs/std/General/stdUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ uint32_t J3DAPI stdUtil_CalcChecksum(const uint8_t* pData, size_t dataSize, uint
*
* @return `true` on success, otherwise `false`.
*/
inline bool J3DAPI stdUtil_StringCopy(char* pDest, size_t destSize, const char* pSrc)
static inline bool J3DAPI stdUtil_StringCopy(char* pDest, size_t destSize, const char* pSrc)
{
// Added: Release-build guard before calculating destSize - 1.
STD_GUARD(pDest && pSrc && destSize, false);
Expand All @@ -282,7 +282,7 @@ inline bool J3DAPI stdUtil_StringCopy(char* pDest, size_t destSize, const char*
*
* @return `true` on success, otherwise `false`.
*/
inline bool J3DAPI stdUtil_WStringCopy(wchar_t* pDest, size_t destSize, const wchar_t* pSrc)
static inline bool J3DAPI stdUtil_WStringCopy(wchar_t* pDest, size_t destSize, const wchar_t* pSrc)
{
// Added: Release-build guard before calculating destSize - 1.
STD_GUARD(pDest && pSrc && destSize, false);
Expand All @@ -304,7 +304,7 @@ inline bool J3DAPI stdUtil_WStringCopy(wchar_t* pDest, size_t destSize, const wc
*
* @return `true` on success, otherwise `false`.
*/
inline bool J3DAPI stdUtil_StringNumCopy(char* pDest, size_t destSize, const char* pSrc, size_t num)
static inline bool J3DAPI stdUtil_StringNumCopy(char* pDest, size_t destSize, const char* pSrc, size_t num)
{
// Added: Release-build guard before calculating destSize - 1.
STD_GUARD(pDest && pSrc && destSize, false);
Expand All @@ -327,7 +327,7 @@ inline bool J3DAPI stdUtil_StringNumCopy(char* pDest, size_t destSize, const cha
*
* @return `true` on success, otherwise `false`.
*/
inline bool J3DAPI stdUtil_WStringNumCopy(wchar_t* pDest, size_t destSize, const wchar_t* pSrc, size_t num)
static inline bool J3DAPI stdUtil_WStringNumCopy(wchar_t* pDest, size_t destSize, const wchar_t* pSrc, size_t num)
{
// Added: Release-build guard before calculating destSize - 1.
STD_GUARD(pDest && pSrc && destSize, false);
Expand All @@ -348,7 +348,7 @@ inline bool J3DAPI stdUtil_WStringNumCopy(wchar_t* pDest, size_t destSize, const
*
* @return `true` on success, otherwise `false`.
*/
inline bool J3DAPI stdUtil_StringCat(char* pDst, size_t destSize, const char* pSrc)
static inline bool J3DAPI stdUtil_StringCat(char* pDst, size_t destSize, const char* pSrc)
{
// Added: Release-build guard before calculating remaining capacity.
STD_GUARD(pDst && pSrc && destSize, false);
Expand All @@ -375,7 +375,7 @@ inline bool J3DAPI stdUtil_StringCat(char* pDst, size_t destSize, const char* pS
*
* @return `true` on success, otherwise `false`.
*/
inline bool J3DAPI stdUtil_StringNumCat(char* pDst, size_t destSize, const char* pSrc, size_t num)
static inline bool J3DAPI stdUtil_StringNumCat(char* pDst, size_t destSize, const char* pSrc, size_t num)
{
// Added: Release-build guard before calculating remaining capacity.
STD_GUARD(pDst && pSrc && destSize, false);
Expand Down
3 changes: 2 additions & 1 deletion Libs/std/Win95/DX9/Shaders/common.hlsli
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef J3D_COMMON_HLSL
#define J3D_COMMON_HLSL

#define MERGE_TOKENS(a, b) a##b
#define MERGE_TOKENS_(a, b) a##b
#define MERGE_TOKENS(a, b) MERGE_TOKENS_(a, b)

// ===== VERTEX SHADER CONSTANTS (c24-c255) =====
#define VS_VIEWPORT_REGISTER c0
Expand Down
2 changes: 1 addition & 1 deletion Libs/std/Win95/DX9/stdControlDX9.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <std/General/stdUtil.h>
#include <std/RTI/symbols.h>

#include <Xinput.h>
#include <xinput.h>
#pragma comment(lib,"Xinput.lib")

#include <wbemidl.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/std/Win95/DX9/stdShaderDX9.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <std/Win95/std3D.h>

#include <d3d9.h>
#include <D3Dcommon.h>
#include <d3dcommon.h>
#include <d3dcompiler.h>
#pragma comment(lib,"d3dcompiler.lib")

Expand Down
2 changes: 1 addition & 1 deletion Libs/std/Win95/stdControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# endif
#include <dinput.h>
# if defined(J3D_TEST)
# include <Xinput.h>
# include <xinput.h>
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion Libs/std/Win95/stdGob.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "stdGob.h"
#include <j3dcore/j3dhook.h>
#include <std/General/std.h>
#include <std/General/stdHashTbl.h>
#include <std/General/stdHashtbl.h>
#include <std/General/stdMemory.h>
#include <std/General/stdUtil.h>
#include <std/RTI/symbols.h>
Expand Down
2 changes: 1 addition & 1 deletion Libs/w32util/wuRegistry.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef W32UTIL_WUREGISTRY_H
#define W32UTIL_WUREGISTRY_H
#define STRICT
#include <Windows.h>
#include <windows.h>
#include <j3dcore/j3d.h>
#include <w32util/RTI/addresses.h>

Expand Down
Loading
Loading