Less compile errors III

This commit is contained in:
UnknownShadow200 2017-04-29 16:22:46 +10:00
parent a265a28efc
commit 372e098ae2
4 changed files with 17 additions and 17 deletions

View File

@ -13,7 +13,7 @@ void Block_Init() {
for (Int32 i = 0; i < DefinedCustomBlocks.Length; i++) for (Int32 i = 0; i < DefinedCustomBlocks.Length; i++)
DefinedCustomBlocks[i] = 0; DefinedCustomBlocks[i] = 0;
for (Int32 block = 0; block < Block_Count; block++) for (Int32 block = 0; block < Block_Count; block++)
ResetBlockProps((BlockID)block); Block_ResetProps((BlockID)block);
UpdateCulling(); UpdateCulling();
} }
@ -58,7 +58,7 @@ void Block_ResetProps(BlockID block) {
FullBright[block] = DefaultSet_FullBright(block); FullBright[block] = DefaultSet_FullBright(block);
FogColour[block] = DefaultSet_FogColour(block); FogColour[block] = DefaultSet_FogColour(block);
FogDensity[block] = DefaultSet_FogDensity(block); FogDensity[block] = DefaultSet_FogDensity(block);
SetCollide(block, DefaultSet_Collide(block)); Block_SetCollide(block, DefaultSet_Collide(block));
DigSounds[block] = DefaultSet_DigSound(block); DigSounds[block] = DefaultSet_DigSound(block);
StepSounds[block] = DefaultSet_StepSound(block); StepSounds[block] = DefaultSet_StepSound(block);
SpeedMultiplier[block] = 1; SpeedMultiplier[block] = 1;
@ -76,7 +76,7 @@ void Block_ResetProps(BlockID block) {
MaxBB[block].Y = DefaultSet_Height(block); MaxBB[block].Y = DefaultSet_Height(block);
} }
SetBlockDraw(block, Draw[block]); Block_SetDrawType(block, Draw[block]);
CalcRenderBounds(block); CalcRenderBounds(block);
LightOffset[block] = CalcLightOffset(block); LightOffset[block] = CalcLightOffset(block);
@ -117,7 +117,7 @@ String Block_DefaultName(BlockID block) {
} }
String blockNames; String blockNames;
String_Constant(&blockNames, &Block_RawNames); String_Constant(&blockNames, Block_RawNames);
// Find start and end of this particular block name // Find start and end of this particular block name
Int32 start = 0; Int32 start = 0;
@ -129,7 +129,7 @@ String Block_DefaultName(BlockID block) {
String buffer; String buffer;
String_Empty(&buffer, Block_NamePtr(block), STRING_SIZE); String_Empty(&buffer, Block_NamePtr(block), STRING_SIZE);
SplitUppercase(&buffer, &blockNames, start, end); Block_SplitUppercase(&buffer, &blockNames, start, end);
return buffer; return buffer;
} }

View File

@ -54,14 +54,14 @@ UInt8 DefaultSet_MapOldCollide(BlockID b, UInt8 collide) {
bool DefaultSet_BlocksLight(BlockID b) { bool DefaultSet_BlocksLight(BlockID b) {
return !(b == BlockID_Glass || b == BlockID_Leaves return !(b == BlockID_Glass || b == BlockID_Leaves
|| b == BlockID_Air || Draw(b) == DrawType_Sprite); || b == BlockID_Air || DefaultSet_Draw(b) == DrawType_Sprite);
} }
UInt8 DefaultSet_StepSound(BlockID b) { UInt8 DefaultSet_StepSound(BlockID b) {
if (b == BlockID_Glass) return SoundType_Stone; if (b == BlockID_Glass) return SoundType_Stone;
if (b == BlockID_Rope) return SoundType_Cloth; if (b == BlockID_Rope) return SoundType_Cloth;
if (Draw(b) == DrawType_Sprite) return SoundType_None; if (DefaultSet_Draw(b) == DrawType_Sprite) return SoundType_None;
return DigSound(b); return DefaultSet_DigSound(b);
} }

View File

@ -32,23 +32,23 @@ void Vector3_Subtract(Vector3* a, Vector3* b, Vector3* result) {
result->Z = a->Z - b->Z; result->Z = a->Z - b->Z;
} }
void Vector3_Multiply(Vector3* a, Real32 scale, Vector3* result) { void Vector3_Multiply1(Vector3* a, Real32 scale, Vector3* result) {
result->X = a->X * scale; result->X = a->X * scale;
result->Y = a->Y * scale; result->Y = a->Y * scale;
result->Z = a->Z * scale; result->Z = a->Z * scale;
} }
void Vector3_Multiply(Vector3* a, Vector3* scale, Vector3* result) { void Vector3_Multiply3(Vector3* a, Vector3* scale, Vector3* result) {
result->X = a->X * scale->X; result->X = a->X * scale->X;
result->Y = a->Y * scale->Y; result->Y = a->Y * scale->Y;
result->Z = a->Z * scale->Z; result->Z = a->Z * scale->Z;
} }
void Vector3_Divide(Vector3* a, Real32 scale, Vector3* result) { void Vector3_Divide1(Vector3* a, Real32 scale, Vector3* result) {
Vector3_Multiply(a, 1.0f / scale, result); Vector3_Multiply1(a, 1.0f / scale, result);
} }
void Vector3_Divide(Vector3* a, Vector3* scale, Vector3* result) { void Vector3_Divide3(Vector3* a, Vector3* scale, Vector3* result) {
result->X = a->X / scale->X; result->X = a->X / scale->X;
result->Y = a->Y / scale->Y; result->Y = a->Y / scale->Y;
result->Z = a->Z / scale->Z; result->Z = a->Z / scale->Z;

View File

@ -43,16 +43,16 @@ void Vector3_Add(Vector3* a, Vector3* b, Vector3* result);
void Vector3_Subtract(Vector3* a, Vector3* b, Vector3* result); void Vector3_Subtract(Vector3* a, Vector3* b, Vector3* result);
/* Multiplies all components of a by scale. */ /* Multiplies all components of a by scale. */
void Vector3_Multiply(Vector3* a, Real32 scale, Vector3* result); void Vector3_Multiply1(Vector3* a, Real32 scale, Vector3* result);
/* Multiplies components of a by scale. */ /* Multiplies components of a by scale. */
void Vector3_Multiply(Vector3* a, Vector3* scale, Vector3* result); void Vector3_Multiply3(Vector3* a, Vector3* scale, Vector3* result);
/* Divides all components of a by scale. */ /* Divides all components of a by scale. */
void Vector3_Divide(Vector3* a, Real32 scale, Vector3* result); void Vector3_Divide1(Vector3* a, Real32 scale, Vector3* result);
/* Divides components of a by scale. */ /* Divides components of a by scale. */
void Vector3_Divide(Vector3* a, Vector3* scale, Vector3* result); void Vector3_Divide3(Vector3* a, Vector3* scale, Vector3* result);
/* Linearly interpolates between two vectors. */ /* Linearly interpolates between two vectors. */