diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-05-25 22:37:57 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-05-25 22:37:57 -0300 |
| commit | ad8213f35523cbb07f418ae275af448a47cc0288 (patch) | |
| tree | 4d77b8ff2b44461734b5a2cbaad5402b4a94736f /src/objects.cc | |
| parent | 5f883a80175a4cc9abda9d647a6a0d73bda84878 (diff) | |
| download | game-ad8213f35523cbb07f418ae275af448a47cc0288.tar.gz game-ad8213f35523cbb07f418ae275af448a47cc0288.zip | |
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.
Diffstat (limited to 'src/objects.cc')
| -rw-r--r-- | src/objects.cc | 42 |
1 files changed, 24 insertions, 18 deletions
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<TObjectType> 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){ |
