mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 05:00:12 +00:00
split asm file and decomp a few tile stuff
This commit is contained in:
parent
f2a2f684fd
commit
f405238e0d
@ -299,29 +299,4 @@ _080140AC: .4byte 0x00003fff
|
||||
_080140B0: .4byte 0x00000fff
|
||||
thumb_func_end sub_8013F84
|
||||
|
||||
thumb_func_start sub_80140B4
|
||||
sub_80140B4:
|
||||
push {r4-r7,lr}
|
||||
ldr r4, _080140D8
|
||||
adds r2, r0, 0
|
||||
movs r3, 0x3
|
||||
_080140BC:
|
||||
adds r1, r2, 0
|
||||
adds r0, r4, 0
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
adds r4, 0x18
|
||||
adds r2, 0x18
|
||||
subs r3, 0x1
|
||||
cmp r3, 0
|
||||
bge _080140BC
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080140D8: .4byte gUnknown_80D47C8
|
||||
thumb_func_end sub_80140B4
|
||||
|
||||
.align 2,0
|
||||
|
5060
asm/code_804AFAC.s
5060
asm/code_804AFAC.s
File diff suppressed because it is too large
Load Diff
4885
asm/code_804FD30.s
Normal file
4885
asm/code_804FD30.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@ typedef struct Tile
|
||||
// Bitwise flags for whether Pokémon can move to an adjacent tile. Bits correspond to directions in direction.h.
|
||||
// Different sets of flags are used for Pokémon that can cross special terrain, corresponding to the CrossableTerrain enum.
|
||||
/* 0xA */ u8 walkableNeighborFlags[NUM_CROSSABLE_TERRAIN];
|
||||
u8 fillE[0x10 - 0xE];
|
||||
u8 unkE;
|
||||
/* 0x10 */ Entity *monster; // Pokémon on the tile.
|
||||
/* 0x14 */ Entity *object; // Item or trap on the tile.
|
||||
} Tile;
|
||||
@ -65,4 +65,4 @@ typedef struct RoomData
|
||||
u32 unk18; // top left y
|
||||
} RoomData;
|
||||
|
||||
#endif // GUARD_MAP_H
|
||||
#endif // GUARD_MAP_H
|
||||
|
@ -217,6 +217,8 @@ SECTIONS {
|
||||
src/dungeon_map_access_1.o(.text);
|
||||
src/tile_types.o(.text);
|
||||
asm/code_804AFAC.o(.text);
|
||||
src/code_804AFAC.o(.text);
|
||||
asm/code_804FD30.o(.text);
|
||||
src/code_80521D0.o(.text);
|
||||
asm/code_80521D0.o(.text);
|
||||
src/charge_move.o(.text);
|
||||
|
@ -13,6 +13,20 @@ extern s32 gUnknown_202E740;
|
||||
extern MenuItem gUnknown_80D485C[];
|
||||
extern MenuItem gUnknown_80D4880[];
|
||||
|
||||
extern UnkTextStruct2 gUnknown_80D47C8[4];
|
||||
|
||||
void sub_80140B4(UnkTextStruct2 *a0)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for(i = 0; i < 4; i++)
|
||||
{
|
||||
a0[i] = gUnknown_80D47C8[i];
|
||||
}
|
||||
}
|
||||
|
||||
// End of menu_input.c
|
||||
|
||||
void sub_80140DC(void)
|
||||
{
|
||||
Position pos;
|
||||
|
84
src/code_804AFAC.c
Normal file
84
src/code_804AFAC.c
Normal file
@ -0,0 +1,84 @@
|
||||
#include "global.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "structs/map.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
void sub_804FBE8(void)
|
||||
{
|
||||
Tile *tile;
|
||||
int y;
|
||||
int x;
|
||||
|
||||
for(x = 0; x < DUNGEON_MAX_SIZE_X; x++)
|
||||
{
|
||||
for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++)
|
||||
{
|
||||
tile = GetTileSafe(x,y);
|
||||
if ((tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) != TERRAIN_TYPE_NORMAL) {
|
||||
if ((tile->terrainType & (TERRAIN_TYPE_UNK_8 | TERRAIN_TYPE_IMPASSABLE_WALL)) != 0) {
|
||||
tile->unk4 &= 0xfffd;
|
||||
}
|
||||
tile->unk4 &= 0xfffb;
|
||||
}
|
||||
if ((tile->unk4 & 1) != 0) {
|
||||
tile->terrainType |= TERRAIN_TYPE_STAIRS;
|
||||
tile->unk4 &= 0xfffb;
|
||||
}
|
||||
if ((tile->unk4 & 2) != 0) {
|
||||
tile->unk4 &= 0xfffb;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_804FC74(void)
|
||||
{
|
||||
Tile *tile;
|
||||
int y;
|
||||
int x;
|
||||
|
||||
for(x = 0; x < DUNGEON_MAX_SIZE_X; x++)
|
||||
{
|
||||
for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++)
|
||||
{
|
||||
if ((GetTile(x, y)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == TERRAIN_TYPE_SECONDARY) {
|
||||
tile = GetTileSafe(x,y);
|
||||
tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
tile->terrainType |= (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_804FCCC(void)
|
||||
{
|
||||
Tile *tile;
|
||||
int y;
|
||||
int x;
|
||||
|
||||
for(x = 0; x < DUNGEON_MAX_SIZE_X; x++)
|
||||
{
|
||||
for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++)
|
||||
{
|
||||
if ((GetTile(x, y)->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) != 0) {
|
||||
tile = GetTileSafe(x,y);
|
||||
tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_804FD10(Tile *tile)
|
||||
{
|
||||
tile->terrainType = 0;
|
||||
tile->unk4 = 0;
|
||||
tile->room = -1;
|
||||
tile->unk8 = 0;
|
||||
tile->walkableNeighborFlags[CROSSABLE_TERRAIN_REGULAR] = 0;
|
||||
tile->walkableNeighborFlags[CROSSABLE_TERRAIN_LIQUID] = 0;
|
||||
tile->walkableNeighborFlags[CROSSABLE_TERRAIN_CREVICE] = 0;
|
||||
tile->walkableNeighborFlags[CROSSABLE_TERRAIN_WALL] = 0;
|
||||
tile->unkE = 0;
|
||||
tile->monster = NULL;
|
||||
tile->object = NULL;
|
||||
}
|
@ -34,7 +34,7 @@ bool8 sub_8083568(s32 inX, s32 inY, u8 index) {
|
||||
tmp &= SPRITEOAM_MASK_X;
|
||||
|
||||
x = sp->attrib2;
|
||||
tmp2 = (0xFE << 8);
|
||||
tmp2 = (0xFE00);
|
||||
tmp2 &= x;
|
||||
tmp2 |= tmp;
|
||||
sp->attrib2 = tmp2;
|
||||
|
@ -3,19 +3,14 @@
|
||||
#include "constants/bg_music.h"
|
||||
#include "dungeon.h"
|
||||
#include "music.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "text_util.h"
|
||||
|
||||
|
||||
struct unkStruct_202EE10
|
||||
{
|
||||
u8 fill0[0x1A];
|
||||
s16 unk1A;
|
||||
};
|
||||
|
||||
extern struct unkStruct_202EE10 gUnknown_202EE10;
|
||||
extern MenuInputStruct gUnknown_202EE10;
|
||||
|
||||
extern u8 *gUnknown_80FE6F4[];
|
||||
extern u8 gUnknown_810AC60; // 0xC
|
||||
|
Loading…
Reference in New Issue
Block a user