Merge pull request #218 from notyourav/co

object6a
This commit is contained in:
notyourav 2021-12-22 22:19:16 -08:00 committed by GitHub
commit c6b88dafea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 1417 additions and 3419 deletions

View File

@ -0,0 +1,70 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sl
mov r6, sb
mov r5, r8
push {r5, r6, r7}
mov sb, r0
adds r4, r1, #0
movs r0, #0x6a
movs r1, #0x1e
movs r2, #1
bl CreateObject
adds r5, r0, #0
cmp r5, #0
beq _08095F2A
ldr r0, [r4, #4]
cmp r0, #0
bne _08095EE0
movs r7, #0x10
movs r6, #0x1f
movs r0, #0x80
lsls r0, r0, #7
mov sl, r0
movs r2, #0
mov r8, r2
b _08095F02
_08095EE0:
movs r7, #8
movs r6, #0xf
movs r0, #0x80
lsls r0, r0, #0xb
mov sl, r0
ldr r4, _08095F34 @ =gUnk_08122B0E
bl Random
movs r1, #7
ands r1, r0
lsls r1, r1, #1
adds r1, r1, r4
movs r0, #0
ldrsh r2, [r1, r0]
mov r8, r2
movs r0, #0xff
strb r0, [r5, #0xb]
_08095F02:
bl Random
adds r4, r0, #0
ands r4, r6
subs r4, r7, r4
bl Random
ands r6, r0
subs r3, r7, r6
lsls r4, r4, #0x10
lsls r3, r3, #0x10
mov r0, sb
adds r1, r5, #0
adds r2, r4, #0
bl PositionRelative
mov r2, sl
str r2, [r5, #0x20]
mov r0, r8
strh r0, [r5, #0x24]
_08095F2A:
pop {r3, r4, r5}
mov r8, r3
mov sb, r4
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08095F34: .4byte gUnk_08122B0E
.syntax divided

File diff suppressed because it is too large Load Diff

View File

@ -4,51 +4,6 @@
.section .rodata
.align 2
gUnk_08122A34:: @ 08122A34
.4byte sub_08094A5C
.4byte sub_08094A90
.4byte sub_08094C30
.4byte sub_08094C88
.4byte sub_08094D94
.4byte sub_08094E30
.4byte sub_08094FA8
.4byte sub_08095088
.4byte sub_08095120
.4byte sub_08095188
.4byte sub_080951C4
.4byte sub_08095288
.4byte sub_080953A4
.4byte sub_080953A4
.4byte sub_080954DC
.4byte sub_080956B4
.4byte sub_0809577C
.4byte sub_080957DC
.4byte sub_0809584C
.4byte sub_080958D8
.4byte sub_08095918
.4byte sub_08094C88
.4byte sub_080959CC
.4byte sub_08095A8C
.4byte sub_08095B48
.4byte sub_08095C00
.4byte sub_080953A4
.4byte sub_08095C68
.4byte sub_08095CE0
.4byte sub_08095CE0
.4byte sub_08095DBC
.4byte sub_08095F38
.4byte sub_08096058
.4byte sub_08096058
.4byte sub_08094A90
.4byte sub_08096084
.4byte sub_08096084
.4byte sub_08096168
.4byte sub_080961F4
.4byte sub_080961F4
.4byte sub_080961F4
.4byte sub_08096284
.4byte sub_08096290
gUnk_08122AE0:: @ 08122AE0
.incbin "object6A/gUnk_08122AE0.bin"

View File

@ -1,10 +0,0 @@
#ifndef CREATEOBJECT_H
#define CREATEOBJECT_H
#include "entity.h"
// maybe a dedicated (create)Effect.h/c
void CreateDust(Entity* parent);
void CreateDustSmall(Entity* parent);
#endif // CREATEOBJECT_H

View File

@ -21,6 +21,9 @@ extern void sub_0808C650(Entity*, u32);
extern u32 sub_0808C67C(void);
extern void sub_0808C688(void);
void CreateDust(Entity* parent);
void CreateDustSmall(Entity* parent);
typedef enum {
GROUND_ITEM,
DEATH_FX,

View File

@ -19,6 +19,15 @@ typedef struct ScriptExecutionContext {
union SplitWord y;
} ScriptExecutionContext;
typedef struct {
u32 unk_00;
u16 commandIndex;
u8 commandSize;
u8 flags;
u8 unk_08;
} struct_02033280;
extern struct_02033280 gActiveScriptInfo;
void ExecuteScript(Entity* entity, ScriptExecutionContext* context);
extern u32 GetNextScriptCommandHalfword(u16*);

View File

@ -94,15 +94,6 @@ typedef struct {
} struct_02024490;
extern struct_02024490 gGFXSlots;
typedef struct {
u32 unk_00;
u16 commandIndex;
u8 commandSize;
u8 flags;
u8 unk_08;
} struct_02033280;
extern struct_02033280 gActiveScriptInfo;
typedef struct {
u16 unk_00;
u8 unk_02[0xE];

View File

@ -805,7 +805,7 @@ SECTIONS {
asm/object67.o(.text);
asm/object68.o(.text);
asm/object69.o(.text);
asm/object6A.o(.text);
src/object/object6A.o(.text);
asm/crenalBeanSprout.o(.text);
asm/minecartDoor.o(.text);
asm/objectOnPillar.o(.text);
@ -1543,6 +1543,7 @@ SECTIONS {
data/const/object/ladderHoleInBookshelf.o(.rodata);
data/const/object/object67.o(.rodata);
data/const/object/object68.o(.rodata);
src/object/object6A.o(.rodata);
data/const/object/object6A.o(.rodata);
data/animations/object/object6A.o(.rodata);
data/const/object/crenalBeanSprout.o(.rodata);

View File

@ -1,7 +1,6 @@
#include "asm.h"
#include "audio.h"
#include "enemy.h"
#include "createObject.h"
#include "object.h"
#include "functions.h"

View File

@ -1,7 +1,7 @@
#include "enemy.h"
#include "textbox.h"
#include "save.h"
#include "createObject.h"
#include "object.h"
#include "functions.h"
extern bool32 ItemIsShield(u32);

View File

@ -1,5 +1,5 @@
#include "enemy.h"
#include "createObject.h"
#include "object.h"
#include "overworld.h"
#include "functions.h"
#include "save.h"

View File

@ -6,7 +6,7 @@
#include "npc.h"
#include "player.h"
#include "save.h"
#include "createObject.h"
#include "object.h"
#include "functions.h"
extern void sub_080293DC(Entity*);

View File

@ -2,7 +2,7 @@
#include "enemy.h"
#include "player.h"
#include "screen.h"
#include "createObject.h"
#include "object.h"
#include "audio.h"
#include "functions.h"

View File

@ -1,6 +1,6 @@
#include "enemy.h"
#include "save.h"
#include "createObject.h"
#include "object.h"
#include "functions.h"
extern void (*const gUnk_080CEB74[])(Entity*);

View File

@ -1,5 +1,5 @@
#include "npc.h"
#include "createObject.h"
#include "object.h"
#include "structures.h"
#include "functions.h"

View File

@ -2,7 +2,7 @@
#include "functions.h"
#include "npc.h"
#include "textbox.h"
#include "createObject.h"
#include "object.h"
#include "flags.h"
#include "script.h"

1323
src/object/object6A.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
#include "entity.h"
#include "room.h"
#include "flags.h"
#include "createObject.h"
#include "object.h"
#include "functions.h"
#include "overworld.h"

View File

@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
#include "flags.h"
#include "createObject.h"
#include "object.h"
extern u32 ReadBit(u32*, u32);

View File

@ -2,7 +2,6 @@
#include "entity.h"
#include "coord.h"
#include "room.h"
#include "createObject.h"
#include "object.h"
#include "effects.h"
#include "functions.h"

View File

@ -2,7 +2,7 @@
#include "enemy.h"
#include "functions.h"
#include "audio.h"
#include "createObject.h"
#include "object.h"
extern s32 sub_080AF090(Entity*);