Ifdef fixes

This commit is contained in:
Fazana
2021-09-07 18:08:56 +01:00
parent d90d0c7d92
commit e368b33c0b
4 changed files with 6 additions and 5 deletions

View File

@@ -9,8 +9,6 @@ but it will not be affected by environmental tinting. If you wish for an object
simply set the object flag OBJ_FLAG_EMIT_LIGHT and set some values to o->puppylight.
**/
#ifdef PUPPYLIGHTS
#include <ultra64.h>
#include "types.h"
#include "puppylights.h"
@@ -26,6 +24,8 @@ simply set the object flag OBJ_FLAG_EMIT_LIGHT and set some values to o->puppyli
#include "object_list_processor.h"
#include "level_update.h"
#ifdef PUPPYLIGHTS
Lights1 gLevelLight; //Existing ambient light in the area. Will be set by the level script, though can always be changed afterwards if desired.
u8 levelAmbient = FALSE;
Lights1 *sLightBase; //The base value where lights are written to when worked with.

View File

@@ -1,8 +1,7 @@
#ifdef PUPPYLIGHTS
#ifndef PUPPYLIGHTS_H
#define PUPPYLIGHTS_H
#ifdef PUPPYLIGHTS
#include "types.h"
#include "command_macros_base.h"

View File

@@ -126,7 +126,7 @@ void puppyprint_calculate_ram_usage(void)
//These are a bit hacky, but what can ye do eh?
//gEffectsMemoryPool is 0x4000, gObjectsMemoryPool is 0x800. Epic C limitations mean I can't just sizeof their values :)
ramsizeSegment[5] = 0x4000 + 0x800;
ramsizeSegment[5] = 0x4000 + 0x800 + 0x4000 + 0x800;
ramsizeSegment[6] = (SURFACE_NODE_POOL_SIZE * sizeof(struct SurfaceNode)) + (SURFACE_POOL_SIZE * sizeof(struct Surface));
ramsizeSegment[7] = gAudioHeapSize + gAudioInitPoolSize;
ramsizeSegment[8] = audioPool[0] + audioPool[1] + audioPool[2] + audioPool[3] + audioPool[4] + audioPool[5] +

View File

@@ -285,7 +285,9 @@ struct Object *allocate_object(struct ObjectNode *objList) {
obj->header.gfx.pos[1] = -10000.0f;
obj->header.gfx.pos[2] = -10000.0f;
obj->header.gfx.throwMatrix = NULL;
#ifdef PUPPYLIGHTS
obj->oLightID = 0xFFFF;
#endif
return obj;
}