mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-24 23:17:03 -05:00
Decomp sub_804FED0
This commit is contained in:
parent
70db368a34
commit
cac5877f76
|
|
@ -5,37 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_804FED0
|
||||
sub_804FED0:
|
||||
push {r4-r7,lr}
|
||||
adds r7, r0, 0
|
||||
adds r5, r1, 0
|
||||
movs r6, 0
|
||||
b _0804FEFA
|
||||
_0804FEDA:
|
||||
adds r0, r5, 0
|
||||
bl DungeonRandInt
|
||||
adds r4, r0, 0
|
||||
adds r0, r5, 0
|
||||
bl DungeonRandInt
|
||||
lsls r4, 2
|
||||
adds r4, r7
|
||||
ldr r2, [r4]
|
||||
lsls r0, 2
|
||||
adds r0, r7
|
||||
ldr r1, [r0]
|
||||
str r1, [r4]
|
||||
str r2, [r0]
|
||||
adds r6, 0x1
|
||||
_0804FEFA:
|
||||
lsls r0, r5, 1
|
||||
cmp r6, r0
|
||||
blt _0804FEDA
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_804FED0
|
||||
|
||||
thumb_func_start sub_804FF08
|
||||
sub_804FF08:
|
||||
push {r4-r7,lr}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "structs/map.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
void sub_804FBE8(void)
|
||||
|
|
@ -138,7 +138,7 @@ void sub_804FD30(void)
|
|||
gDungeon->unk1371C[x]->type = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
NAKED
|
||||
void sub_804FD30(void)
|
||||
{
|
||||
|
|
@ -373,5 +373,21 @@ void sub_804FD30(void)
|
|||
"_0804FEC4: .4byte 0x0000e27c\n"
|
||||
"_0804FEC8: .4byte 0x00003904\n"
|
||||
"_0804FECC: .4byte 0x0001371c\n");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_804FED0(s32 *param_1, s32 param_2)
|
||||
{
|
||||
int idx1;
|
||||
int idx2;
|
||||
s32 temp;
|
||||
int counter;
|
||||
|
||||
for (counter = 0; counter < param_2 << 1; counter++) {
|
||||
idx1 = DungeonRandInt(param_2);
|
||||
idx2 = DungeonRandInt(param_2);
|
||||
temp = param_1[idx1];
|
||||
param_1[idx1] = param_1[idx2];
|
||||
param_1[idx2] = temp;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user