mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-08-04 03:07:07 -04:00
Better c89 compatibility
This commit is contained in:
parent
b3d94e6abe
commit
9c9aa11d77
@ -307,6 +307,8 @@ static void OnHacksChanged(void* obj) {
|
||||
|
||||
void Camera_CycleActive(void) {
|
||||
struct LocalPlayer* p = &LocalPlayer_Instances[0];
|
||||
int cycle = 0;
|
||||
|
||||
if (Game_ClassicMode) return;
|
||||
Camera.Active = Camera.Active->next;
|
||||
|
||||
@ -315,7 +317,6 @@ void Camera_CycleActive(void) {
|
||||
}
|
||||
cam_isForwardThird = Camera.Active == &cam_ForwardThird;
|
||||
|
||||
int cycle = 0;
|
||||
if (Camera.Active == &cam_FirstPerson) cycle = 0;
|
||||
else if (Camera.Active == &cam_ThirdPerson) cycle = 1;
|
||||
else if (cam_isForwardThird) cycle = 2;
|
||||
|
@ -802,6 +802,7 @@ static void LocalPlayers_OnNewMap(void) {
|
||||
static cc_bool LocalPlayer_IsSolidCollide(BlockID b) { return Blocks.Collide[b] == COLLIDE_SOLID; }
|
||||
|
||||
static void LocalPlayer_DoRespawn(struct LocalPlayer* p) {
|
||||
struct EntityLocation* prev;
|
||||
struct LocationUpdate update;
|
||||
struct AABB bb;
|
||||
Vec3 spawn = p->Spawn;
|
||||
@ -830,7 +831,7 @@ static void LocalPlayer_DoRespawn(struct LocalPlayer* p) {
|
||||
}
|
||||
}
|
||||
|
||||
struct EntityLocation* prev = &p->Base.prev;
|
||||
prev = &p->Base.prev;
|
||||
CPE_SendNotifyPositionAction(3, prev->pos.x, prev->pos.y, prev->pos.z);
|
||||
|
||||
/* Adjust the position to be slightly above the ground, so that */
|
||||
|
@ -91,7 +91,7 @@ extern const struct UpdaterInfo {
|
||||
/* Number of compiled builds available for this platform */
|
||||
int numBuilds;
|
||||
/* Metadata for the compiled builds available for this platform */
|
||||
const struct UpdaterBuild builds[2]; // TODO name and path
|
||||
const struct UpdaterBuild builds[2]; /* TODO name and path */
|
||||
} Updater_Info;
|
||||
/* Whether updating is supported by the platform */
|
||||
extern cc_bool Updater_Supported;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "Core.h"
|
||||
#if defined PLAT_PS2
|
||||
|
||||
#define CC_XTEA_ENCRYPTION
|
||||
#define LIBCGLUE_SYS_SOCKET_ALIASES 0
|
||||
#define LIBCGLUE_SYS_SOCKET_NO_ALIASES
|
||||
#define LIBCGLUE_ARPA_INET_NO_ALIASES
|
||||
|
@ -1320,14 +1320,16 @@ cc_bool DynamicLib_DescribeError(cc_string* dst) {
|
||||
*#########################################################################################################################*/
|
||||
static void Platform_InitPosix(void) {
|
||||
struct sigaction sa = { 0 };
|
||||
cc_uintptr addr;
|
||||
sa.sa_handler = SIG_IGN;
|
||||
|
||||
sigaction(SIGCHLD, &sa, NULL);
|
||||
/* So writing to closed socket doesn't raise SIGPIPE */
|
||||
sigaction(SIGPIPE, &sa, NULL);
|
||||
|
||||
/* Log runtime address to ease investigating crashes */
|
||||
cc_uintptr addr = (cc_uintptr)Process_Exit;
|
||||
/* Log runtime address of a known function to ease investigating crashes */
|
||||
/* (on platforms with ASLR, function addresses change every time when run) */
|
||||
addr = (cc_uintptr)Process_Exit;
|
||||
Platform_Log1("Process_Exit addr: %x", &addr);
|
||||
}
|
||||
void Platform_Free(void) { }
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "Core.h"
|
||||
#if defined PLAT_SATURN
|
||||
|
||||
#define CC_XTEA_ENCRYPTION
|
||||
#include "_PlatformBase.h"
|
||||
#include "Stream.h"
|
||||
#include "ExtMath.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user