mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
dSv_info_c::isItem OK
This commit is contained in:
@@ -722,6 +722,7 @@ public:
|
|||||||
dSv_memory_c(void); // the assembly for this is in d_com_inf_game.s
|
dSv_memory_c(void); // the assembly for this is in d_com_inf_game.s
|
||||||
void init(void);
|
void init(void);
|
||||||
dSv_memBit_c& getTempFlags() { return temp_flags; }
|
dSv_memBit_c& getTempFlags() { return temp_flags; }
|
||||||
|
const dSv_memBit_c& getTempFlagsConst() const { return temp_flags; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
dSv_memBit_c temp_flags;
|
dSv_memBit_c temp_flags;
|
||||||
@@ -803,6 +804,7 @@ public:
|
|||||||
dSv_zone_c(void); // the assembly for this is in d_com_inf_game.s
|
dSv_zone_c(void); // the assembly for this is in d_com_inf_game.s
|
||||||
void init(int);
|
void init(int);
|
||||||
dSv_zoneBit_c& getZoneBit() { return zone_bit; }
|
dSv_zoneBit_c& getZoneBit() { return zone_bit; }
|
||||||
|
const dSv_zoneBit_c& getZoneBitConst() const { return zone_bit; }
|
||||||
dSv_zoneActor_c& getZoneActor() { return zone_actor; }
|
dSv_zoneActor_c& getZoneActor() { return zone_actor; }
|
||||||
const dSv_zoneActor_c& getZoneActorConst() const { return zone_actor; }
|
const dSv_zoneActor_c& getZoneActorConst() const { return zone_actor; }
|
||||||
|
|
||||||
|
|||||||
+20
-3
@@ -1429,9 +1429,26 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
asm BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const {
|
BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const {
|
||||||
nofralloc
|
int value;
|
||||||
#include "d/d_save/d_save/asm/func_80035590.s"
|
if ((i_no == -1) || (i_no == 0xFF)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i_no < 0x80) {
|
||||||
|
value = this->dungeon_bit.isItem(i_no);
|
||||||
|
} else if (i_no < 0xA0) {
|
||||||
|
value = this->memory.getTempFlagsConst().isItem(i_no - 0x80);
|
||||||
|
} else {
|
||||||
|
int zoneNo = dStage_roomControl_c_NS_getZoneNo(i_roomNo, i_no);
|
||||||
|
if (i_no < 0xC0) {
|
||||||
|
value = this->zones[zoneNo].getZoneBitConst().isItem(i_no - 0xA0);
|
||||||
|
} else {
|
||||||
|
value = this->zones[zoneNo].getZoneBitConst().isOneItem(i_no - 0xC0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dSv_info_c::onActor(int i_id, int i_roomNo) {
|
void dSv_info_c::onActor(int i_id, int i_roomNo) {
|
||||||
|
|||||||
Reference in New Issue
Block a user