Reconstruction layout: generated-src/ (generated) and src/ (curated), CMake, the first takeover: RNG
The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body. src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT, from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra). structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2ff2d5d87f
commit
3ce74c6e2d
331 files changed
+485
-7835
No files matched your search
@@ -0,0 +1,509 @@
|
||||
#include "classes.h"
|
||||
|
||||
// 007537a0
|
||||
void * TemporaryEffects::GetEffectsList()
|
||||
{
|
||||
return &this->_effects;
|
||||
}
|
||||
|
||||
// 00930220
|
||||
void TemporaryEffects::AddEffect(void *Effect, byte addcostume, int count)
|
||||
{
|
||||
int *effectIt;
|
||||
int effectCooldown;
|
||||
int effectCount;
|
||||
int effectExtra;
|
||||
void *effectsBegin;
|
||||
int *effectsEnd;
|
||||
void **effectsEndField;
|
||||
|
||||
if ((this->_disabled == 0) && (count != 0)) {
|
||||
effectsEnd = (this->_effects)._end;
|
||||
effectIt = (this->_effects)._begin;
|
||||
if (effectIt != effectsEnd) {
|
||||
do {
|
||||
if (*effectIt == *GHIDRA_CAST<int *>(Effect)) {
|
||||
if (effectIt != effectsEnd) {
|
||||
effectIt[1] = effectIt[1] + count;
|
||||
effectIt[2] = effectIt[2] + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(Effect) + 8));
|
||||
this->_cacheFlags = this->_cacheFlags | *GHIDRA_CAST<uint *>((*GHIDRA_CAST<int *>(Effect) + 0x54));
|
||||
this->_shouldEvaluateCache = 1;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
effectIt = effectIt + 4;
|
||||
} while (effectIt != effectsEnd);
|
||||
}
|
||||
if (effectsEnd == (this->_effects)._capacity) {
|
||||
std::vector<Vec16>::_Emplace_reallocate(effectsEnd,Effect);
|
||||
}
|
||||
else {
|
||||
effectCount = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(Effect) + 4));
|
||||
effectCooldown = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(Effect) + 8));
|
||||
effectExtra = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(Effect) + 0xc));
|
||||
*effectsEnd = *GHIDRA_CAST<int *>(Effect);
|
||||
effectsEnd[1] = effectCount;
|
||||
effectsEnd[2] = effectCooldown;
|
||||
effectsEnd[3] = effectExtra;
|
||||
effectsEndField = &(this->_effects)._end;
|
||||
*effectsEndField = (void *)(GHIDRA_INT(*effectsEndField) + 0x10);
|
||||
}
|
||||
effectsBegin = (this->_effects)._begin;
|
||||
*GHIDRA_CAST<int *>((((GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(effectsBegin) & 0xfffffff0U) - 0xc) +
|
||||
GHIDRA_INT(effectsBegin))) = count;
|
||||
if ((this->_player != GHIDRA_CAST<Entity_Player *>(0x0)) && (addcostume != 0)) {
|
||||
(GHIDRA_CAST<Entity_Player *>((this->_player)))->Entity_Player::AddCostume(*GHIDRA_CAST<ItemConfig_Item **>(Effect),0);
|
||||
}
|
||||
this->_cacheFlags = this->_cacheFlags | *GHIDRA_CAST<uint *>((*GHIDRA_CAST<int *>(Effect) + 0x54));
|
||||
this->_shouldEvaluateCache = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 009302e0
|
||||
void TemporaryEffects::AddCollectibleEffect(int coltype, byte addcostume, int count)
|
||||
{
|
||||
ItemConfig_Item *effectItem;
|
||||
undefined4 local_14;
|
||||
int effectCooldown;
|
||||
undefined4 local_c;
|
||||
|
||||
effectItem = (GHIDRA_CAST<ItemConfig *>((&g_manager->_itemConfig)))->ItemConfig::GetCollectible(coltype);
|
||||
if (effectItem != GHIDRA_CAST<ItemConfig_Item *>(0x0)) {
|
||||
effectCooldown = effectItem->maxCooldown;
|
||||
local_14 = 0;
|
||||
local_c = 0;
|
||||
AddEffect(this,&effectItem,addcostume,count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 00930330
|
||||
void TemporaryEffects::AddTrinketEffect(int trinkettype, byte addcostume, int count)
|
||||
{
|
||||
int effect [3];
|
||||
undefined4 local_c;
|
||||
void *trinkets;
|
||||
|
||||
trinkets = (g_manager->_itemConfig)._trinkets._begin;
|
||||
if ((GHIDRA_INT((trinkettype & 0x7fffU)) <
|
||||
GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinkets) >> 2) &&
|
||||
(effect[0] = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(trinkets) + (trinkettype & 0x7fffU) * 4)), effect[0] != 0)) {
|
||||
effect[2] = *GHIDRA_CAST<undefined4 *>((effect[0] + 0x78));
|
||||
effect[1] = 0;
|
||||
local_c = 0;
|
||||
AddEffect(this,effect,addcostume,count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 00930390
|
||||
void TemporaryEffects::AddNullEffect(int nulleffectid, byte addcostume, int count)
|
||||
{
|
||||
int effect [3];
|
||||
undefined4 local_c;
|
||||
void *nullItems;
|
||||
|
||||
if (((-1 < nulleffectid) &&
|
||||
(nullItems = (g_manager->_itemConfig)._nullItems._begin,
|
||||
nulleffectid < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) >> 2)) &&
|
||||
(effect[0] = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(nullItems) + nulleffectid * 4)), effect[0] != 0)) {
|
||||
effect[2] = *GHIDRA_CAST<undefined4 *>((effect[0] + 0x78));
|
||||
effect[1] = 0;
|
||||
local_c = 0;
|
||||
AddEffect(this,effect,addcostume,count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 009303f0
|
||||
void TemporaryEffects::RemoveEffect(void *effect, int count)
|
||||
{
|
||||
void **ppvVar1;
|
||||
ItemConfig_Item *item;
|
||||
int *entry;
|
||||
uint removedCount;
|
||||
int *effectsEnd;
|
||||
uint entryCount;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
effectsEnd = (this->_effects)._end;
|
||||
entry = (this->_effects)._begin;
|
||||
if (entry != effectsEnd) {
|
||||
while (*entry != *GHIDRA_CAST<int *>(effect)) {
|
||||
entry = entry + 4;
|
||||
if (entry == effectsEnd) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (entry != effectsEnd) {
|
||||
entryCount = entry[1];
|
||||
item = GHIDRA_CAST<ItemConfig_Item *>(*entry);
|
||||
removedCount = entryCount;
|
||||
if (GHIDRA_UINT(count) < entryCount) {
|
||||
removedCount = count;
|
||||
}
|
||||
entry[1] = entryCount - removedCount;
|
||||
if (GHIDRA_INT((entryCount - removedCount)) < 1) {
|
||||
memmove(entry,entry + 4,GHIDRA_INT((this->_effects)._end) - GHIDRA_INT((entry + 4)));
|
||||
ppvVar1 = &(this->_effects)._end;
|
||||
*ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0x10);
|
||||
}
|
||||
if (this->_player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
||||
(GHIDRA_CAST<Room *>((g_game->_room)))->Room::TriggerEffectRemoved(item,0);
|
||||
}
|
||||
else {
|
||||
Entity_Player::trigger_collectible_effect_removed(this->_player,item,removedCount);
|
||||
}
|
||||
this->_cacheFlags = this->_cacheFlags | *GHIDRA_CAST<uint *>((*GHIDRA_CAST<int *>(effect) + 0x54));
|
||||
this->_shouldEvaluateCache = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 009304a0
|
||||
void TemporaryEffects::RemoveCollectibleEffect(int coltype, int count)
|
||||
{
|
||||
ItemConfig_Item *effectItem;
|
||||
undefined4 local_10;
|
||||
int effectCooldown;
|
||||
undefined4 local_8;
|
||||
|
||||
effectItem = (GHIDRA_CAST<ItemConfig *>((&g_manager->_itemConfig)))->ItemConfig::GetCollectible(coltype);
|
||||
if (effectItem != GHIDRA_CAST<ItemConfig_Item *>(0x0)) {
|
||||
effectCooldown = effectItem->maxCooldown;
|
||||
local_10 = 0;
|
||||
local_8 = 0;
|
||||
RemoveEffect(this,&effectItem,count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 009304f0
|
||||
void TemporaryEffects::RemoveTrinketEffect(int trinkettype, int count)
|
||||
{
|
||||
int effectKey [3];
|
||||
undefined4 local_8;
|
||||
void *trinkets;
|
||||
|
||||
trinkets = (g_manager->_itemConfig)._trinkets._begin;
|
||||
if ((GHIDRA_INT((trinkettype & 0x7fffU)) <
|
||||
GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(trinkets) >> 2) &&
|
||||
(effectKey[0] = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(trinkets) + (trinkettype & 0x7fffU) * 4)), effectKey[0] != 0)) {
|
||||
effectKey[2] = *GHIDRA_CAST<undefined4 *>((effectKey[0] + 0x78));
|
||||
effectKey[1] = 0;
|
||||
local_8 = 0;
|
||||
RemoveEffect(this,effectKey,count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 00930550
|
||||
void TemporaryEffects::RemoveNullEffect(int nulleffectid, int count)
|
||||
{
|
||||
int effect [3];
|
||||
undefined4 local_c;
|
||||
void *nullItems;
|
||||
|
||||
if (((-1 < nulleffectid) &&
|
||||
(nullItems = (g_manager->_itemConfig)._nullItems._begin,
|
||||
nulleffectid < GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(nullItems) >> 2)) &&
|
||||
(effect[0] = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(nullItems) + nulleffectid * 4)), effect[0] != 0)) {
|
||||
effect[2] = *GHIDRA_CAST<undefined4 *>((effect[0] + 0x78));
|
||||
effect[1] = 0;
|
||||
local_c = 0;
|
||||
RemoveEffect(this,effect,count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 009305c0
|
||||
byte TemporaryEffects::has_item_effect(TemporaryEffects *effects, ItemConfig_Item *item)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (effects->_disabled == 0) {
|
||||
for (effect = (effects->_effects)._begin; effect != (effects->_effects)._end;
|
||||
effect = effect + 4) {
|
||||
if (GHIDRA_CAST<ItemConfig_Item *>(*effect) == item) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 009305f0
|
||||
byte TemporaryEffects::HasCollectibleEffect(int coltype)
|
||||
{
|
||||
int *effect;
|
||||
int effectType;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
effectType = *GHIDRA_CAST<int *>(*effect);
|
||||
if ((((effectType == 1) || (effectType == 3)) || (effectType == 4)) &&
|
||||
((GHIDRA_CAST<int *>(*effect))[1] == coltype)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 00930640
|
||||
byte TemporaryEffects::HasTrinketEffect(int trinkettype)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
if ((*GHIDRA_CAST<int *>(*effect) == 2) && ((GHIDRA_CAST<int *>(*effect))[1] == trinkettype)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 00930680
|
||||
byte TemporaryEffects::HasNullEffect(int nulleffectid)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
if ((*GHIDRA_CAST<int *>(*effect) == 0) && ((GHIDRA_CAST<int *>(*effect))[1] == nulleffectid)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 009306c0
|
||||
void TemporaryEffects::ClearEffects(byte isClearPersistent)
|
||||
{
|
||||
void **ppvVar1;
|
||||
ItemConfig_Item *item;
|
||||
void *pvVar2;
|
||||
uint effectCount;
|
||||
int iVar3;
|
||||
int effectOffset;
|
||||
uint i;
|
||||
void *effectsBegin;
|
||||
bool isAnyRemoved;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
pvVar2 = (this->_effects)._end;
|
||||
do {
|
||||
effectsBegin = (this->_effects)._begin;
|
||||
isAnyRemoved = false;
|
||||
effectCount = GHIDRA_INT(pvVar2) - GHIDRA_INT(effectsBegin) >> 4;
|
||||
i = effectCount - 1;
|
||||
if (effectCount <= i) {
|
||||
return;
|
||||
}
|
||||
effectOffset = i * 0x10;
|
||||
do {
|
||||
item = *GHIDRA_CAST<ItemConfig_Item **>((effectOffset + GHIDRA_INT(effectsBegin)));
|
||||
if ((isClearPersistent != 0) || (item->persistentEffect == 0)) {
|
||||
iVar3 = item->type;
|
||||
if ((((iVar3 == 1) || ((iVar3 == 3 || (iVar3 == 4)))) && (item->id == 0x75)) &&
|
||||
(pvVar2 = this->_player, *GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(pvVar2) + 0x20a9)) == '\0')) {
|
||||
iVar3 = 0;
|
||||
if (0 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x1340))) {
|
||||
iVar3 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x1344));
|
||||
}
|
||||
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x1d88)) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x134c)) + iVar3 <=
|
||||
GHIDRA_INT(((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x13c0)) == 5) + 1))) goto LAB_009307de;
|
||||
}
|
||||
this->_cacheFlags = this->_cacheFlags | item->cacheFlags;
|
||||
iVar3 = (GHIDRA_CAST<undefined4 *>((effectOffset + GHIDRA_INT(effectsBegin))))[1];
|
||||
pvVar2 = (void *)(GHIDRA_INT(effectsBegin) + effectOffset + 0x10);
|
||||
memmove((void *)(GHIDRA_INT(effectsBegin) + effectOffset),pvVar2,
|
||||
GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar2));
|
||||
ppvVar1 = &(this->_effects)._end;
|
||||
*ppvVar1 = (void *)(GHIDRA_INT(*ppvVar1) + -0x10);
|
||||
if (this->_player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
||||
(GHIDRA_CAST<Room *>((g_game->_room)))->Room::TriggerEffectRemoved(item,0);
|
||||
}
|
||||
else {
|
||||
Entity_Player::trigger_collectible_effect_removed(this->_player,item,iVar3);
|
||||
}
|
||||
this->_shouldEvaluateCache = 1;
|
||||
isAnyRemoved = true;
|
||||
}
|
||||
LAB_009307de:
|
||||
pvVar2 = (this->_effects)._end;
|
||||
effectOffset = effectOffset + -0x10;
|
||||
effectsBegin = (this->_effects)._begin;
|
||||
i = i - 1;
|
||||
} while (i < GHIDRA_UINT((GHIDRA_INT(pvVar2) - GHIDRA_INT(effectsBegin) >> 4)));
|
||||
} while (isAnyRemoved);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 00930820
|
||||
void TemporaryEffects::Update()
|
||||
{
|
||||
uint effectCount;
|
||||
int iVar1;
|
||||
int *piVar2;
|
||||
void *_Dst;
|
||||
void *pvVar3;
|
||||
int effectOffset;
|
||||
ItemConfig_Item *local_14;
|
||||
uint effectIndex;
|
||||
TemporaryEffects *local_c;
|
||||
void **effectsEnd;
|
||||
Manager *manager;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
this->_cacheFlags = 0;
|
||||
pvVar3 = (this->_effects)._begin;
|
||||
effectCount = GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar3) >> 4;
|
||||
effectIndex = effectCount - 1;
|
||||
if (effectIndex < effectCount) {
|
||||
effectOffset = effectIndex * 0x10;
|
||||
local_c = this;
|
||||
do {
|
||||
iVar1 = *GHIDRA_CAST<int *>((effectOffset + 8 + GHIDRA_INT(pvVar3)));
|
||||
if ((0 < iVar1) &&
|
||||
(iVar1 = iVar1 + -1, *GHIDRA_CAST<int *>((effectOffset + 8 + GHIDRA_INT(pvVar3))) = iVar1,
|
||||
manager = g_manager, iVar1 == 0)) {
|
||||
piVar2 = *GHIDRA_CAST<int **>((effectOffset + GHIDRA_INT(pvVar3)));
|
||||
if (piVar2 != GHIDRA_CAST<int *>(0x0)) {
|
||||
iVar1 = *piVar2;
|
||||
if (((iVar1 == 1) || (iVar1 == 3)) || (iVar1 == 4)) {
|
||||
if ((piVar2[1] == 0x3a) && (*GHIDRA_CAST<int *>((effectOffset + 0xc + GHIDRA_INT(pvVar3))) == 0)) {
|
||||
local_14 = GHIDRA_CAST<ItemConfig_Item *>(0x403);
|
||||
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_14));
|
||||
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_14),1.0,2,0,1.0,0.0);
|
||||
piVar2 = *GHIDRA_CAST<int **>((effectOffset + GHIDRA_INT(pvVar3)));
|
||||
this = local_c;
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
}
|
||||
this->_cacheFlags = this->_cacheFlags | piVar2[0x15];
|
||||
local_14 = *GHIDRA_CAST<ItemConfig_Item **>((effectOffset + GHIDRA_INT(pvVar3)));
|
||||
_Dst = (void *)(GHIDRA_INT((this->_effects)._begin) + effectOffset);
|
||||
iVar1 = *GHIDRA_CAST<int *>((effectOffset + 4 + GHIDRA_INT(pvVar3)));
|
||||
pvVar3 = (void *)(GHIDRA_INT(_Dst) + 0x10);
|
||||
memmove(_Dst,pvVar3,GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar3));
|
||||
effectsEnd = &(this->_effects)._end;
|
||||
*effectsEnd = (void *)(GHIDRA_INT(*effectsEnd) + -0x10);
|
||||
if (this->_player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
||||
(GHIDRA_CAST<Room *>((g_game->_room)))->Room::TriggerEffectRemoved(local_14,0);
|
||||
}
|
||||
else {
|
||||
Entity_Player::trigger_collectible_effect_removed(this->_player,local_14,iVar1);
|
||||
}
|
||||
this->_shouldEvaluateCache = 1;
|
||||
}
|
||||
effectIndex = effectIndex - 1;
|
||||
pvVar3 = (this->_effects)._begin;
|
||||
effectOffset = effectOffset + -0x10;
|
||||
} while (effectIndex < GHIDRA_UINT((GHIDRA_INT((this->_effects)._end) - GHIDRA_INT(pvVar3) >> 4)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 00930980
|
||||
void * TemporaryEffects::GetCollectibleEffect(int coltype)
|
||||
{
|
||||
int *effect;
|
||||
int effectType;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
effectType = *GHIDRA_CAST<int *>(*effect);
|
||||
if ((((effectType == 1) || (effectType == 3)) || (effectType == 4)) &&
|
||||
((GHIDRA_CAST<int *>(*effect))[1] == coltype)) {
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (void *)0x0;
|
||||
}
|
||||
|
||||
// 009309c0
|
||||
void * TemporaryEffects::GetTrinketEffect(int trinkettype)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
if ((*GHIDRA_CAST<int *>(*effect) == 2) && ((GHIDRA_CAST<int *>(*effect))[1] == trinkettype)) {
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (void *)0x0;
|
||||
}
|
||||
|
||||
// 00930a30
|
||||
void * TemporaryEffects::GetNullEffect(int nulleffectid)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
if ((*GHIDRA_CAST<int *>(*effect) == 0) && ((GHIDRA_CAST<int *>(*effect))[1] == nulleffectid)) {
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (void *)0x0;
|
||||
}
|
||||
|
||||
// 00930a70
|
||||
int TemporaryEffects::GetCollectibleEffectNum(int coltype)
|
||||
{
|
||||
void *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
effect = GetCollectibleEffect(this,coltype);
|
||||
if (effect != (void *)0x0) {
|
||||
return *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(effect) + 4));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 00930aa0
|
||||
int TemporaryEffects::GetTrinketEffectNum(int trinkettype)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
if ((*GHIDRA_CAST<int *>(*effect) == 2) && ((GHIDRA_CAST<int *>(*effect))[1] == trinkettype)) {
|
||||
return effect[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 00930ae0
|
||||
int TemporaryEffects::GetNullEffectNum(int nulleffectid)
|
||||
{
|
||||
int *effect;
|
||||
|
||||
if (this->_disabled == 0) {
|
||||
for (effect = (this->_effects)._begin; effect != (this->_effects)._end; effect = effect + 4) {
|
||||
if ((*GHIDRA_CAST<int *>(*effect) == 0) && ((GHIDRA_CAST<int *>(*effect))[1] == nulleffectid)) {
|
||||
return effect[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user