mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
remove inline functions that were only used once
Turns out the web client doesn't actually inline inline functions
This commit is contained in:
parent
abd3e2853b
commit
59b4125a03
@ -360,7 +360,7 @@ static void EnvRenderer_UpdateSkybox(void) {
|
|||||||
int16_t* Weather_Heightmap;
|
int16_t* Weather_Heightmap;
|
||||||
static GfxResourceID rain_tex, snow_tex, weather_vb;
|
static GfxResourceID rain_tex, snow_tex, weather_vb;
|
||||||
static double weather_accumulator;
|
static double weather_accumulator;
|
||||||
static IVec3 weather_lastPos;
|
static IVec3 lastPos;
|
||||||
|
|
||||||
#define WEATHER_EXTENT 4
|
#define WEATHER_EXTENT 4
|
||||||
#define WEATHER_VERTS_COUNT 8 * (WEATHER_EXTENT * 2 + 1) * (WEATHER_EXTENT * 2 + 1)
|
#define WEATHER_VERTS_COUNT 8 * (WEATHER_EXTENT * 2 + 1) * (WEATHER_EXTENT * 2 + 1)
|
||||||
@ -463,8 +463,8 @@ void EnvRenderer_RenderWeather(double deltaTime) {
|
|||||||
Gfx_BindTexture(weather == WEATHER_RAINY ? rain_tex : snow_tex);
|
Gfx_BindTexture(weather == WEATHER_RAINY ? rain_tex : snow_tex);
|
||||||
|
|
||||||
IVec3_Floor(&pos, &Camera.CurrentPos);
|
IVec3_Floor(&pos, &Camera.CurrentPos);
|
||||||
moved = IVec3_NotEquals(&pos, &weather_lastPos);
|
moved = pos.X != lastPos.X || pos.Y != lastPos.Y || pos.Z != lastPos.Z;
|
||||||
weather_lastPos = pos;
|
lastPos = pos;
|
||||||
|
|
||||||
/* Rain should extend up by 64 blocks, or to the top of the world. */
|
/* Rain should extend up by 64 blocks, or to the top of the world. */
|
||||||
pos.Y += 64;
|
pos.Y += 64;
|
||||||
@ -947,7 +947,7 @@ static void EnvRenderer_Reset(void) {
|
|||||||
|
|
||||||
Mem_Free(Weather_Heightmap);
|
Mem_Free(Weather_Heightmap);
|
||||||
Weather_Heightmap = NULL;
|
Weather_Heightmap = NULL;
|
||||||
weather_lastPos = IVec3_MaxValue();
|
lastPos = IVec3_MaxValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EnvRenderer_OnNewMapLoaded(void) {
|
static void EnvRenderer_OnNewMapLoaded(void) {
|
||||||
|
@ -581,7 +581,7 @@ static void MapRenderer_UpdateSortOrder(void) {
|
|||||||
pos.Z = (pos.Z & ~CHUNK_MASK) + HALF_CHUNK_SIZE;
|
pos.Z = (pos.Z & ~CHUNK_MASK) + HALF_CHUNK_SIZE;
|
||||||
|
|
||||||
/* If in same chunk, don't need to recalculate sort order */
|
/* If in same chunk, don't need to recalculate sort order */
|
||||||
if (IVec3_Equals(&pos, &chunkPos)) return;
|
if (pos.X == chunkPos.X && pos.Y == chunkPos.Y && pos.Z == chunkPos.Z) return;
|
||||||
chunkPos = pos;
|
chunkPos = pos;
|
||||||
if (!MapRenderer_ChunksCount) return;
|
if (!MapRenderer_ChunksCount) return;
|
||||||
|
|
||||||
|
@ -99,18 +99,6 @@ Vec3 Vec3_RotateZ(Vec3 v, float angle);
|
|||||||
static CC_INLINE bool Vec3_Equals(const Vec3* a, const Vec3* b) {
|
static CC_INLINE bool Vec3_Equals(const Vec3* a, const Vec3* b) {
|
||||||
return a->X == b->X && a->Y == b->Y && a->Z == b->Z;
|
return a->X == b->X && a->Y == b->Y && a->Z == b->Z;
|
||||||
}
|
}
|
||||||
/* Whether any of the components of the two vectors differ. */
|
|
||||||
static CC_INLINE bool Vec3_NotEquals(const Vec3* a, const Vec3* b) {
|
|
||||||
return a->X != b->X || a->Y != b->Y || a->Z != b->Z;
|
|
||||||
}
|
|
||||||
/* Whether all of the components of the two vectors are equal. */
|
|
||||||
static CC_INLINE bool IVec3_Equals(const IVec3* a, const IVec3* b) {
|
|
||||||
return a->X == b->X && a->Y == b->Y && a->Z == b->Z;
|
|
||||||
}
|
|
||||||
/* Whether any of the components of the two vectors differ. */
|
|
||||||
static CC_INLINE bool IVec3_NotEquals(const IVec3* a, const IVec3* b) {
|
|
||||||
return a->X != b->X || a->Y != b->Y || a->Z != b->Z;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IVec3_Floor(IVec3* result, const Vec3* a);
|
void IVec3_Floor(IVec3* result, const Vec3* a);
|
||||||
void IVec3_ToVec3(Vec3* result, const IVec3* a);
|
void IVec3_ToVec3(Vec3* result, const IVec3* a);
|
||||||
|
@ -2328,8 +2328,8 @@ static void TextGroupWidget_Output(struct Portion bit, int lineBeg, int lineEnd,
|
|||||||
|
|
||||||
static int TextGroupWidget_Reduce(struct TextGroupWidget* w, char* chars, int target, struct Portion* portions) {
|
static int TextGroupWidget_Reduce(struct TextGroupWidget* w, char* chars, int target, struct Portion* portions) {
|
||||||
struct Portion* start = portions;
|
struct Portion* start = portions;
|
||||||
int32_t begs[TEXTGROUPWIDGET_MAX_LINES];
|
int begs[TEXTGROUPWIDGET_MAX_LINES];
|
||||||
int32_t ends[TEXTGROUPWIDGET_MAX_LINES];
|
int ends[TEXTGROUPWIDGET_MAX_LINES];
|
||||||
struct Portion bit;
|
struct Portion bit;
|
||||||
String line;
|
String line;
|
||||||
int nextStart, i, total = 0, end;
|
int nextStart, i, total = 0, end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user