summaryrefslogtreecommitdiff
path: root/src/memory_mid.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-06-09 22:54:21 -0500
committerGitHub <noreply@github.com>2021-06-09 22:54:21 -0500
commit377bd14ea67d6177250fb401e12d7dfcf44e2cf6 (patch)
tree5440970e02a7890791b234aa233e91e5c1d65b40 /src/memory_mid.c
parenteaa141c612dd1689936a21bd57018a55ff686b69 (diff)
Dungeon pokemon/Floor ID JSON Part 1 (#39)
* move Thunderwave and Tiny Woods pokemon to json * rule tweaking to actually build tool before parsing JSON * delete .inc pokemon for tiny Woods and Thunderwave * silence git complaining about br_ips and ips_patch * use defines for species and pass the header file for species * convert sinister woods * convert MtThunderPeak * convert silent chasm * add trial floor_id w/ tiny woods * change make rule name to fix compile * MtSteel converted and bugfix * convert few floor headers and great canyon pokemon * code cleanup * unify unkData into UnkTextStruct2 * more code cleanup and some text decomp * doc more funcs and decomp/split some stuff * document more save stuff * more save work and move some data * pika sniped UpdateNatureTotal * decomp a litle and convert a few more dungeons * better scanning for json files * mt freeze and peak
Diffstat (limited to 'src/memory_mid.c')
-rw-r--r--src/memory_mid.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/memory_mid.c b/src/memory_mid.c
index 32628cb..1eb707c 100644
--- a/src/memory_mid.c
+++ b/src/memory_mid.c
@@ -15,32 +15,32 @@ void *DoAlloc(struct HeapDescriptor *, s32, u32);
void FatalError(u32 *, u32 *, ...) __attribute__((noreturn));
-s32 _LocateSet(struct HeapDescriptor *heap, s32 size, s32 param_3)
+s32 _LocateSet(struct HeapDescriptor *heap, s32 size, s32 group)
{
s32 index;
struct HeapDescriptor * uVar2;
- s32 uVar3;
+ s32 atb;
if (heap == NULL) {
heap = &gMainHeapDescriptor;
}
// Set some sort flag/attr?
- uVar3 = param_3 >> 8 | 1;
+ atb = group >> 8 | 1;
// Reset it?
- param_3 = param_3 & 0xff;
+ group = group & 0xff;
- if ((uVar3 & 2) != 0) {
- index = MemorySearchFromFront(heap,uVar3,size);
+ if ((atb & 2) != 0) {
+ index = MemorySearchFromFront(heap,atb,size);
if (index < 0) goto error;
- uVar2 = _LocateSetFront(heap,index,uVar3,size,param_3);
+ uVar2 = _LocateSetFront(heap,index,atb,size,group);
return uVar2->freeCount;
}
else {
- index = MemorySearchFromBack(heap,uVar3,size);
+ index = MemorySearchFromBack(heap,atb,size);
if (index < 0) goto error;
- uVar2 = _LocateSetBack(heap,index,uVar3,size,param_3);
+ uVar2 = _LocateSetBack(heap,index,atb,size,group);
return uVar2->freeCount;
}
@@ -49,7 +49,7 @@ error:
// atb %02x grp %3d
FatalError(&gUnknown_80B7F14,
&gUnknown_80B7F20,
- heap,size,uVar3,param_3);
+ heap,size,atb,group);
}
void *MemoryAlloc(s32 size, s32 b)