mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-27 06:50:35 +00:00
Improve some equipment function matches based on saturn port (#340)
This commit is contained in:
parent
f7896127ac
commit
31715f6993
@ -264,8 +264,8 @@ func_800FD5BC = 0x800FD570;
|
||||
func_800FD664 = 0x800FD618;
|
||||
GetEquipItemCategory = 0x800FD63C;
|
||||
func_800FD6C4 = 0x800FD678;
|
||||
func_800FD744 = 0x800FD6F8;
|
||||
func_800FD760 = 0x800FD714;
|
||||
GetEquipOrder = 0x800FD6F8;
|
||||
GetEquipCount = 0x800FD714;
|
||||
GetEquipmentName = 0x800FD730;
|
||||
CheckEquipmentItemCount = 0x800FD774;
|
||||
AddToInventory = 0x800FD828;
|
||||
|
@ -954,6 +954,8 @@ DrawConsumableCount = 0x800F8E18;
|
||||
LoadWeaponPrg = 0x800FA8C4;
|
||||
func_800FD39C = 0x800FD39C;
|
||||
GetEquipItemCategory = 0x800FD688;
|
||||
GetEquipOrder = 0x800FD744;
|
||||
GetEquipCount = 0x800FD760;
|
||||
GetEquipmentName = 0x800FD77C;
|
||||
CheckEquipmentItemCount = 0x800FD7C0;
|
||||
AddToInventory = 0x800FD874;
|
||||
|
@ -1077,8 +1077,8 @@ void func_800F8990(MenuContext* ctx, s32 x, s32 y) {
|
||||
s32 idx;
|
||||
|
||||
new_var = &D_801375CC.equipTypeFilter;
|
||||
sp20 = func_800FD744(*new_var);
|
||||
equipsAmount = func_800FD760(*new_var);
|
||||
sp20 = GetEquipOrder(*new_var);
|
||||
equipsAmount = GetEquipCount(*new_var);
|
||||
totalItemCount = func_800FD6C4(*new_var);
|
||||
curX = 0;
|
||||
curY = 0;
|
||||
@ -1473,7 +1473,7 @@ void func_800FB160(s32 arg0, s32 arg1, s32 equipType) {
|
||||
u8 swap;
|
||||
u8* equipOrder;
|
||||
|
||||
equipOrder = func_800FD744(equipType);
|
||||
equipOrder = GetEquipOrder(equipType);
|
||||
swap = equipOrder[D_801375D8[arg0]];
|
||||
equipOrder[D_801375D8[arg0]] = equipOrder[D_801375D8[arg1]];
|
||||
equipOrder[D_801375D8[arg1]] = swap;
|
||||
|
@ -39,20 +39,18 @@ s32 func_800FD6C4(s32 equipTypeFilter) {
|
||||
|
||||
const u32 rodataPadding_jpt_800FD6E0 = 0;
|
||||
|
||||
u8* func_800FD744(s32 equipTypeFilter) {
|
||||
u8* begin = g_Status.equipHandOrder;
|
||||
if (equipTypeFilter != 0) {
|
||||
begin += sizeof(g_Status.equipHandOrder);
|
||||
u8* GetEquipOrder(s32 equipTypeFilter) {
|
||||
if (equipTypeFilter == 0) {
|
||||
return g_Status.equipHandOrder;
|
||||
}
|
||||
return begin;
|
||||
return g_Status.equipBodyOrder;
|
||||
}
|
||||
|
||||
u8* func_800FD760(s32 equipTypeFilter) {
|
||||
s8* begin = &g_Status.equipHandCount;
|
||||
if (equipTypeFilter != 0) {
|
||||
begin += sizeof(g_Status.equipHandCount);
|
||||
u8* GetEquipCount(s32 equipTypeFilter) {
|
||||
if (equipTypeFilter == 0) {
|
||||
return g_Status.equipHandCount;
|
||||
}
|
||||
return begin;
|
||||
return g_Status.equipBodyCount;
|
||||
}
|
||||
|
||||
const char* GetEquipmentName(s32 equipTypeFilter, s32 equipId) {
|
||||
@ -98,8 +96,8 @@ void AddToInventory(u16 itemId, s32 itemCategory) {
|
||||
long i;
|
||||
s32 phi_a1;
|
||||
s32 phi_a1_2;
|
||||
u8* cursorY = func_800FD744(itemCategory);
|
||||
u8* itemArray = func_800FD760(itemCategory);
|
||||
u8* cursorY = GetEquipOrder(itemCategory);
|
||||
u8* itemArray = GetEquipCount(itemCategory);
|
||||
if (itemArray[itemId] < 99) {
|
||||
temp_a1 = itemArray[itemId];
|
||||
itemArray[itemId]++;
|
||||
|
@ -709,8 +709,8 @@ void func_800FAF44(s32);
|
||||
s32 func_800FD4C0(s32 bossId, s32 action);
|
||||
s32 func_800FD664(s32 arg0);
|
||||
s32 func_800FD6C4(s32 equipTypeFilter);
|
||||
u8* func_800FD744(s32 equipTypeFilter);
|
||||
u8* func_800FD760(s32 equipTypeFilter);
|
||||
u8* GetEquipOrder(s32 equipTypeFilter);
|
||||
u8* GetEquipCount(s32 equipTypeFilter);
|
||||
const char* GetEquipmentName(s32 equipTypeFilter, s32 equipId);
|
||||
u32 CheckEquipmentItemCount(u32 itemId, u32 equipType);
|
||||
void AddToInventory(u16 itemId, s32 itemCategory);
|
||||
|
@ -149,8 +149,7 @@ s32 func_800FD6C4(s32 equipTypeFilter) {
|
||||
}
|
||||
|
||||
// SAT: func_0606F3D8
|
||||
// same as PSX but better match?
|
||||
u8* func_800FD744(s32 equipTypeFilter) {
|
||||
u8* GetEquipOrder(s32 equipTypeFilter) {
|
||||
if (equipTypeFilter == 0) {
|
||||
return g_Status.equipHandOrder;
|
||||
}
|
||||
@ -158,8 +157,7 @@ u8* func_800FD744(s32 equipTypeFilter) {
|
||||
}
|
||||
|
||||
// SAT: func_0606F3F8
|
||||
// better match like above?
|
||||
u8* func_800FD760(s32 equipTypeFilter) {
|
||||
u8* GetEquipCount(s32 equipTypeFilter) {
|
||||
if (equipTypeFilter == 0) {
|
||||
return g_Status.equipHandCount;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user