Reverted object flag names OBJECT_TEMPORARY and OBJECT_FLAG_0x400
This commit is contained in:
parent
984957c6a1
commit
25cd25be96
|
@ -1501,7 +1501,7 @@ int actionExplode(int tile, int elevation, int minDamage, int maxDamage, Object*
|
|||
}
|
||||
|
||||
objectHide(explosion, NULL);
|
||||
explosion->flags |= OBJECT_WALK_THRU;
|
||||
explosion->flags |= OBJECT_TEMPORARY;
|
||||
|
||||
objectSetLocation(explosion, tile, elevation, NULL);
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ int actionExplode(int tile, int elevation, int minDamage, int maxDamage, Object*
|
|||
}
|
||||
|
||||
objectHide(adjacentExplosions[rotation], NULL);
|
||||
adjacentExplosions[rotation]->flags |= OBJECT_WALK_THRU;
|
||||
adjacentExplosions[rotation]->flags |= OBJECT_TEMPORARY;
|
||||
|
||||
int adjacentTile = tileGetTileInDirection(tile, rotation, 1);
|
||||
objectSetLocation(adjacentExplosions[rotation], adjacentTile, elevation, NULL);
|
||||
|
@ -1807,7 +1807,7 @@ void _action_dmg(int tile, int elevation, int minDamage, int maxDamage, int dama
|
|||
|
||||
objectHide(obj, NULL);
|
||||
|
||||
obj->flags |= OBJECT_WALK_THRU;
|
||||
obj->flags |= OBJECT_TEMPORARY;
|
||||
|
||||
objectSetLocation(obj, tile, elevation, NULL);
|
||||
|
||||
|
|
|
@ -3036,7 +3036,7 @@ int _gdialog_barter_create_win()
|
|||
_barterer_table_obj->flags |= OBJECT_HIDDEN;
|
||||
|
||||
if (objectCreateWithFidPid(&_barterer_temp_obj, gGameDialogSpeaker->fid, -1) != -1) {
|
||||
_barterer_temp_obj->flags |= OBJECT_HIDDEN | OBJECT_WALK_THRU;
|
||||
_barterer_temp_obj->flags |= OBJECT_HIDDEN | OBJECT_TEMPORARY;
|
||||
_barterer_temp_obj->sid = -1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1928,13 +1928,13 @@ int gameMouseObjectsInit()
|
|||
}
|
||||
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_LIGHT_THRU;
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_WALK_THRU;
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_TEMP;
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_TEMPORARY;
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_FLAG_0x400;
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_SHOOT_THRU;
|
||||
gGameMouseBouncingCursor->flags |= OBJECT_NO_BLOCK;
|
||||
|
||||
gGameMouseHexCursor->flags |= OBJECT_TEMP;
|
||||
gGameMouseHexCursor->flags |= OBJECT_WALK_THRU;
|
||||
gGameMouseHexCursor->flags |= OBJECT_FLAG_0x400;
|
||||
gGameMouseHexCursor->flags |= OBJECT_TEMPORARY;
|
||||
gGameMouseHexCursor->flags |= OBJECT_LIGHT_THRU;
|
||||
gGameMouseHexCursor->flags |= OBJECT_SHOOT_THRU;
|
||||
gGameMouseHexCursor->flags |= OBJECT_NO_BLOCK;
|
||||
|
@ -1990,8 +1990,8 @@ void gameMouseObjectsFree()
|
|||
if (gGameMouseObjectsInitialized) {
|
||||
gameMouseActionMenuFree();
|
||||
|
||||
gGameMouseBouncingCursor->flags &= ~OBJECT_WALK_THRU;
|
||||
gGameMouseHexCursor->flags &= ~OBJECT_WALK_THRU;
|
||||
gGameMouseBouncingCursor->flags &= ~OBJECT_TEMPORARY;
|
||||
gGameMouseHexCursor->flags &= ~OBJECT_TEMPORARY;
|
||||
|
||||
objectDestroy(gGameMouseBouncingCursor, NULL);
|
||||
objectDestroy(gGameMouseHexCursor, NULL);
|
||||
|
|
|
@ -1003,7 +1003,7 @@ void opDestroyObject(Program* program)
|
|||
|
||||
if (isSelf) {
|
||||
object->sid = -1;
|
||||
object->flags |= (OBJECT_HIDDEN | OBJECT_WALK_THRU);
|
||||
object->flags |= (OBJECT_HIDDEN | OBJECT_TEMPORARY);
|
||||
} else {
|
||||
reg_anim_clear(object);
|
||||
objectDestroy(object, NULL);
|
||||
|
@ -6114,7 +6114,7 @@ void opDestroyMultipleObjects(Program* program)
|
|||
|
||||
if (isSelf) {
|
||||
object->sid = -1;
|
||||
object->flags |= (OBJECT_HIDDEN | OBJECT_WALK_THRU);
|
||||
object->flags |= (OBJECT_HIDDEN | OBJECT_TEMPORARY);
|
||||
} else {
|
||||
reg_anim_clear(object);
|
||||
objectDestroy(object, NULL);
|
||||
|
|
|
@ -903,7 +903,7 @@ int mapLoad(File* stream)
|
|||
Object* object;
|
||||
int fid = buildFid(5, 12, 0, 0, 0);
|
||||
objectCreateWithFidPid(&object, fid, -1);
|
||||
object->flags |= (OBJECT_LIGHT_THRU | OBJECT_WALK_THRU | OBJECT_HIDDEN);
|
||||
object->flags |= (OBJECT_LIGHT_THRU | OBJECT_TEMPORARY | OBJECT_HIDDEN);
|
||||
objectSetLocation(object, 1, 0, NULL);
|
||||
object->sid = gMapSid;
|
||||
scriptSetFixedParam(gMapSid, (gMapHeader.flags & 1) == 0);
|
||||
|
@ -1321,7 +1321,7 @@ int _map_save_file(File* stream)
|
|||
Object* object = objectFindFirstAtElevation(elevation);
|
||||
if (object != NULL) {
|
||||
// TODO: Implementation is slightly different, check in debugger.
|
||||
while (object != NULL && (object->flags & OBJECT_WALK_THRU)) {
|
||||
while (object != NULL && (object->flags & OBJECT_TEMPORARY)) {
|
||||
object = objectFindNextAtElevation();
|
||||
}
|
||||
|
||||
|
@ -1535,7 +1535,7 @@ void _map_place_dude_and_mouse()
|
|||
}
|
||||
|
||||
objectSetLight(gDude, 4, 0x10000, 0);
|
||||
gDude->flags |= OBJECT_WALK_THRU;
|
||||
gDude->flags |= OBJECT_TEMPORARY;
|
||||
|
||||
_dude_stand(gDude, gDude->rotation, gDude->fid);
|
||||
_partyMemberSyncPosition();
|
||||
|
|
|
@ -38,11 +38,11 @@ typedef enum OutlineType {
|
|||
|
||||
typedef enum ObjectFlags {
|
||||
OBJECT_HIDDEN = 0x01,
|
||||
OBJECT_WALK_THRU = 0x04,
|
||||
OBJECT_TEMPORARY = 0x04,
|
||||
OBJECT_FLAT = 0x08,
|
||||
OBJECT_NO_BLOCK = 0x10,
|
||||
OBJECT_LIGHTING = 0x20,
|
||||
OBJECT_TEMP = 0x400, // ???
|
||||
OBJECT_FLAG_0x400 = 0x400, // ???
|
||||
OBJECT_MULTIHEX = 0x800,
|
||||
OBJECT_NO_HIGHLIGHT = 0x1000,
|
||||
OBJECT_USED = 0x2000, // set if there was/is any event for the object
|
||||
|
|
|
@ -314,8 +314,8 @@ int objectsInit(unsigned char* buf, int width, int height, int pitch)
|
|||
dudeFid = buildFid(1, _art_vault_guy_num, 0, 0, 0);
|
||||
objectCreateWithFidPid(&gDude, dudeFid, 0x1000000);
|
||||
|
||||
gDude->flags |= OBJECT_TEMP;
|
||||
gDude->flags |= OBJECT_WALK_THRU;
|
||||
gDude->flags |= OBJECT_FLAG_0x400;
|
||||
gDude->flags |= OBJECT_TEMPORARY;
|
||||
gDude->flags |= OBJECT_HIDDEN;
|
||||
gDude->flags |= OBJECT_LIGHT_THRU;
|
||||
objectSetLight(gDude, 4, 0x10000, NULL);
|
||||
|
@ -327,8 +327,8 @@ int objectsInit(unsigned char* buf, int width, int height, int pitch)
|
|||
|
||||
eggFid = buildFid(6, 2, 0, 0, 0);
|
||||
objectCreateWithFidPid(&gEgg, eggFid, -1);
|
||||
gEgg->flags |= OBJECT_TEMP;
|
||||
gEgg->flags |= OBJECT_WALK_THRU;
|
||||
gEgg->flags |= OBJECT_FLAG_0x400;
|
||||
gEgg->flags |= OBJECT_TEMPORARY;
|
||||
gEgg->flags |= OBJECT_HIDDEN;
|
||||
gEgg->flags |= OBJECT_LIGHT_THRU;
|
||||
|
||||
|
@ -363,8 +363,8 @@ void objectsReset()
|
|||
void objectsExit()
|
||||
{
|
||||
if (gObjectsInitialized) {
|
||||
gDude->flags &= ~OBJECT_TEMP;
|
||||
gEgg->flags &= ~OBJECT_TEMP;
|
||||
gDude->flags &= ~OBJECT_FLAG_0x400;
|
||||
gEgg->flags &= ~OBJECT_FLAG_0x400;
|
||||
|
||||
_obj_remove_all();
|
||||
textObjectsFree();
|
||||
|
@ -523,8 +523,8 @@ int objectLoadAllInternal(File* stream)
|
|||
|
||||
_obj_insert(objectListNode);
|
||||
|
||||
if ((objectListNode->obj->flags & OBJECT_TEMP) && (objectListNode->obj->flags >> 24) == OBJ_TYPE_CRITTER && objectListNode->obj->pid != 18000) {
|
||||
objectListNode->obj->flags &= ~OBJECT_TEMP;
|
||||
if ((objectListNode->obj->flags & OBJECT_FLAG_0x400) && (objectListNode->obj->flags >> 24) == OBJ_TYPE_CRITTER && objectListNode->obj->pid != 18000) {
|
||||
objectListNode->obj->flags &= ~OBJECT_FLAG_0x400;
|
||||
}
|
||||
|
||||
Inventory* inventory = &(objectListNode->obj->data.inventory);
|
||||
|
@ -696,7 +696,7 @@ int objectSaveAll(File* stream)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((object->flags & OBJECT_WALK_THRU) != 0) {
|
||||
if ((object->flags & OBJECT_TEMPORARY) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2023,7 +2023,7 @@ int _obj_inven_free(Inventory* inventory)
|
|||
objectListNodeCreate(&node);
|
||||
|
||||
node->obj = inventoryItem->item;
|
||||
node->obj->flags &= ~OBJECT_TEMP;
|
||||
node->obj->flags &= ~OBJECT_FLAG_0x400;
|
||||
_obj_remove(node, node);
|
||||
|
||||
inventoryItem->item = NULL;
|
||||
|
@ -3490,7 +3490,7 @@ void _obj_blend_table_exit()
|
|||
// 0x48D348
|
||||
int _obj_save_obj(File* stream, Object* object)
|
||||
{
|
||||
if ((object->flags & OBJECT_WALK_THRU) != 0) {
|
||||
if ((object->flags & OBJECT_TEMPORARY) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3528,7 +3528,7 @@ int _obj_save_obj(File* stream, Object* object)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ((inventoryItem->item->flags & OBJECT_WALK_THRU) != 0) {
|
||||
if ((inventoryItem->item->flags & OBJECT_TEMPORARY) != 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -3612,13 +3612,13 @@ int _obj_save_dude(File* stream)
|
|||
{
|
||||
int field_78 = gDude->sid;
|
||||
|
||||
gDude->flags &= ~OBJECT_WALK_THRU;
|
||||
gDude->flags &= ~OBJECT_TEMPORARY;
|
||||
gDude->sid = -1;
|
||||
|
||||
int rc = _obj_save_obj(stream, gDude);
|
||||
|
||||
gDude->sid = field_78;
|
||||
gDude->flags |= OBJECT_WALK_THRU;
|
||||
gDude->flags |= OBJECT_TEMPORARY;
|
||||
|
||||
if (fileWriteInt32(stream, gCenterTile) == -1) {
|
||||
fileClose(stream);
|
||||
|
@ -3644,7 +3644,7 @@ int _obj_load_dude(File* stream)
|
|||
|
||||
memcpy(gDude, temp, sizeof(*gDude));
|
||||
|
||||
gDude->flags |= OBJECT_WALK_THRU;
|
||||
gDude->flags |= OBJECT_TEMPORARY;
|
||||
|
||||
scriptsClearDudeScript();
|
||||
|
||||
|
@ -3685,7 +3685,7 @@ int _obj_load_dude(File* stream)
|
|||
tempInventory->capacity = 0;
|
||||
tempInventory->items = NULL;
|
||||
|
||||
temp->flags &= ~OBJECT_TEMP;
|
||||
temp->flags &= ~OBJECT_FLAG_0x400;
|
||||
|
||||
if (objectDestroy(temp, NULL) == -1) {
|
||||
debugPrint("\nError: obj_load_dude: Can't destroy temp object!\n");
|
||||
|
@ -3900,7 +3900,7 @@ int _obj_remove(ObjectListNode* a1, ObjectListNode* a2)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ((a1->obj->flags & OBJECT_TEMP) != 0) {
|
||||
if ((a1->obj->flags & OBJECT_FLAG_0x400) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ int partyMemberAdd(Object* object)
|
|||
partyMember->vars = NULL;
|
||||
|
||||
object->id = (object->pid & 0xFFFFFF) + 18000;
|
||||
object->flags |= (OBJECT_TEMP | OBJECT_WALK_THRU);
|
||||
object->flags |= (OBJECT_FLAG_0x400 | OBJECT_TEMPORARY);
|
||||
|
||||
gPartyMembersLength++;
|
||||
|
||||
|
@ -400,7 +400,7 @@ int partyMemberRemove(Object* object)
|
|||
gPartyMembers[index].object = gPartyMembers[gPartyMembersLength - 1].object;
|
||||
}
|
||||
|
||||
object->flags &= ~(OBJECT_TEMP | OBJECT_WALK_THRU);
|
||||
object->flags &= ~(OBJECT_FLAG_0x400 | OBJECT_TEMPORARY);
|
||||
|
||||
gPartyMembersLength--;
|
||||
|
||||
|
@ -429,7 +429,7 @@ int _partyMemberPrepSave()
|
|||
STRUCT_519DA8* ptr = &(gPartyMembers[index]);
|
||||
|
||||
if (index > 0) {
|
||||
ptr->object->flags &= ~(OBJECT_TEMP | OBJECT_WALK_THRU);
|
||||
ptr->object->flags &= ~(OBJECT_FLAG_0x400 | OBJECT_TEMPORARY);
|
||||
}
|
||||
|
||||
Script* script;
|
||||
|
@ -448,7 +448,7 @@ int _partyMemberUnPrepSave()
|
|||
STRUCT_519DA8* ptr = &(gPartyMembers[index]);
|
||||
|
||||
if (index > 0) {
|
||||
ptr->object->flags |= (OBJECT_TEMP | OBJECT_WALK_THRU);
|
||||
ptr->object->flags |= (OBJECT_FLAG_0x400 | OBJECT_TEMPORARY);
|
||||
}
|
||||
|
||||
Script* script;
|
||||
|
|
Loading…
Reference in New Issue