From ad8213f35523cbb07f418ae275af448a47cc0288 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Sun, 25 May 2025 22:37:57 -0300 Subject: linux Makefile + fix most compilation problems I wanted to see if the compiler had any problems with the code so far and added a few stub definitions so that each file would properly compile. We still fail when linking but we're able to to find and fix compile time errors. --- src/objects.cc | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'src/objects.cc') diff --git a/src/objects.cc b/src/objects.cc index 0119088..de62aca 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -1,4 +1,5 @@ #include "objects.hh" +#include "containers.hh" static vector ObjectTypes(0, 5000, 1000); static ObjectType SpecialObjects[49]; @@ -69,24 +70,24 @@ static FLAG TypeAttributeFlags[62] = { }; static FLAG InstanceAttributeFlags[18] = { - CONTAINER // CONTENT - CHEST // CHESTQUESTNUMBER - CUMULATIVE // AMOUNT - KEY // KEYNUMBER - KEYDOOR // KEYHOLENUMBER - LEVELDOOR // DOORLEVEL - QUESTDOOR // DOORQUESTNUMBER - QUESTDOOR // DOORQUESTVALUE - RUNE // CHARGES - TEXT // TEXTSTRING - TEXT // EDITOR - LIQUIDCONTAINER // CONTAINERLIQUIDTYPE - LIQUIDPOOL // POOLLIQUIDTYPE - TELEPORTABSOLUTE // ABSTELEPORTDESTINATION - MAGICFIELD // RESPONSIBLE - EXPIRE // REMAININGEXPIRETIME - EXPIRESTOP // SAVEDEXPIRETIME - WEAROUT // REMAININGUSES + CONTAINER, // CONTENT + CHEST, // CHESTQUESTNUMBER + CUMULATIVE, // AMOUNT + KEY, // KEYNUMBER + KEYDOOR, // KEYHOLENUMBER + LEVELDOOR, // DOORLEVEL + QUESTDOOR, // DOORQUESTNUMBER + QUESTDOOR, // DOORQUESTVALUE + RUNE, // CHARGES + TEXT, // TEXTSTRING + TEXT, // EDITOR + LIQUIDCONTAINER, // CONTAINERLIQUIDTYPE + LIQUIDPOOL, // POOLLIQUIDTYPE + TELEPORTABSOLUTE, // ABSTELEPORTDESTINATION + MAGICFIELD, // RESPONSIBLE + EXPIRE, // REMAININGEXPIRETIME + EXPIRESTOP, // SAVEDEXPIRETIME + WEAROUT, // REMAININGUSES }; static const char InstanceAttributeNames[18][30] = { @@ -180,6 +181,11 @@ const char *ObjectType::getDescription(void){ // Object Type Related Functions // ============================================================================= +const char *GetInstanceAttributeName(int Attribute){ + ASSERT(Attribute >= 0 && Attribute <= 17); + return InstanceAttributeNames[Attribute]; +} + int GetInstanceAttributeByName(const char *Name){ int Result = -1; for(int i = 0; i < NARRAY(InstanceAttributeNames); i += 1){ -- cgit v1.2.3