mirror of
https://github.com/FireEmblemUniverse/fireemblem8u.git
synced 2024-11-27 07:00:21 +00:00
(minfx) complete
This commit is contained in:
parent
b67ca593bb
commit
f7ebd8c098
83
asm/minefx.s
83
asm/minefx.s
@ -1,83 +0,0 @@
|
|||||||
.INCLUDE "macro.inc"
|
|
||||||
|
|
||||||
.SYNTAX UNIFIED
|
|
||||||
|
|
||||||
@ Map effect happening when a mine is being set
|
|
||||||
|
|
||||||
THUMB_FUNC_START sub_80222E0
|
|
||||||
sub_80222E0: @ 0x080222E0
|
|
||||||
push {lr}
|
|
||||||
ldr r0, _080222F8 @ gRAMChapterData
|
|
||||||
adds r0, #0x41
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, r0, #0x1e
|
|
||||||
cmp r0, #0
|
|
||||||
blt _080222F4
|
|
||||||
ldr r0, _080222FC @ 0x000002F9
|
|
||||||
bl m4aSongNumStart
|
|
||||||
_080222F4:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_080222F8: .4byte gRAMChapterData
|
|
||||||
_080222FC: .4byte 0x000002F9
|
|
||||||
|
|
||||||
THUMB_FUNC_END sub_80222E0
|
|
||||||
|
|
||||||
THUMB_FUNC_START sub_8022300
|
|
||||||
sub_8022300: @ 0x08022300
|
|
||||||
push {r4, r5, r6, lr}
|
|
||||||
sub sp, #8
|
|
||||||
adds r4, r0, #0
|
|
||||||
adds r5, r1, #0
|
|
||||||
adds r6, r2, #0
|
|
||||||
lsls r0, r5, #4
|
|
||||||
ldr r2, _08022364 @ gGameState
|
|
||||||
movs r3, #0xc
|
|
||||||
ldrsh r1, [r2, r3]
|
|
||||||
subs r0, r0, r1
|
|
||||||
adds r5, r0, #0
|
|
||||||
adds r5, #8
|
|
||||||
lsls r0, r6, #4
|
|
||||||
movs r3, #0xe
|
|
||||||
ldrsh r1, [r2, r3]
|
|
||||||
subs r0, r0, r1
|
|
||||||
adds r6, r0, #4
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0x20
|
|
||||||
bl NewBlockingTimer
|
|
||||||
ldr r0, _08022368 @ gUnknown_085A7CC0
|
|
||||||
ldr r1, _0802236C @ 0x06013000
|
|
||||||
bl CopyDataWithPossibleUncomp
|
|
||||||
ldr r0, _08022370 @ gUnknown_085A7EC8
|
|
||||||
movs r1, #0xa8
|
|
||||||
lsls r1, r1, #2
|
|
||||||
movs r2, #0x20
|
|
||||||
bl CopyToPaletteBuffer
|
|
||||||
ldr r0, _08022374 @ gUnknown_085A7E34
|
|
||||||
movs r3, #0xa3
|
|
||||||
lsls r3, r3, #7
|
|
||||||
movs r1, #0
|
|
||||||
str r1, [sp]
|
|
||||||
str r1, [sp, #4]
|
|
||||||
adds r1, r5, #0
|
|
||||||
adds r2, r6, #0
|
|
||||||
bl APProc_Create
|
|
||||||
ldr r0, _08022378 @ gUnknown_0859B560
|
|
||||||
adds r1, r4, #0
|
|
||||||
bl Proc_Start
|
|
||||||
add sp, #8
|
|
||||||
pop {r4, r5, r6}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08022364: .4byte gGameState
|
|
||||||
_08022368: .4byte gUnknown_085A7CC0
|
|
||||||
_0802236C: .4byte 0x06013000
|
|
||||||
_08022370: .4byte gUnknown_085A7EC8
|
|
||||||
_08022374: .4byte gUnknown_085A7E34
|
|
||||||
_08022378: .4byte gUnknown_0859B560
|
|
||||||
|
|
||||||
THUMB_FUNC_END sub_8022300
|
|
||||||
|
|
||||||
.align 2, 0
|
|
@ -1,17 +1,5 @@
|
|||||||
.section .data
|
.section .data
|
||||||
|
|
||||||
.global gUnknown_0859B560
|
|
||||||
gUnknown_0859B560: @ 0x0859B560
|
|
||||||
@ PROC_SLEEP
|
|
||||||
.short 0xe, 0x18
|
|
||||||
.word 0x0
|
|
||||||
@ PROC_CALL
|
|
||||||
.short 0x2, 0x0
|
|
||||||
.word sub_80222E0
|
|
||||||
@ PROC_END
|
|
||||||
.short 0x0, 0x0
|
|
||||||
.word 0x0
|
|
||||||
|
|
||||||
|
|
||||||
.global gUnknown_0859B578
|
.global gUnknown_0859B578
|
||||||
gUnknown_0859B578: @ 0x0859B578
|
gUnknown_0859B578: @ 0x0859B578
|
||||||
|
@ -272,16 +272,16 @@ Tsa_DanceringFx: @ 0x085A7A64
|
|||||||
Pal_DanceringFx: @ 0x085A7CA0
|
Pal_DanceringFx: @ 0x085A7CA0
|
||||||
.incbin "baserom.gba", 0x5A7CA0, 0x20
|
.incbin "baserom.gba", 0x5A7CA0, 0x20
|
||||||
|
|
||||||
.global gUnknown_085A7CC0
|
.global Img_MineFx
|
||||||
gUnknown_085A7CC0: @ 0x085A7CC0
|
Img_MineFx: @ 0x085A7CC0
|
||||||
.incbin "baserom.gba", 0x5A7CC0, 0x174
|
.incbin "baserom.gba", 0x5A7CC0, 0x174
|
||||||
|
|
||||||
.global gUnknown_085A7E34
|
.global SpritAnim_MineFx
|
||||||
gUnknown_085A7E34: @ 0x085A7E34
|
SpritAnim_MineFx: @ 0x085A7E34
|
||||||
.incbin "baserom.gba", 0x5A7E34, 0x94
|
.incbin "baserom.gba", 0x5A7E34, 0x94
|
||||||
|
|
||||||
.global gUnknown_085A7EC8
|
.global Pal_MineFx
|
||||||
gUnknown_085A7EC8: @ 0x085A7EC8
|
Pal_MineFx: @ 0x085A7EC8
|
||||||
.incbin "baserom.gba", 0x5A7EC8, 0x20
|
.incbin "baserom.gba", 0x5A7EC8, 0x20
|
||||||
|
|
||||||
.global gUnknown_085A7EE8
|
.global gUnknown_085A7EE8
|
||||||
|
@ -107,6 +107,7 @@ enum
|
|||||||
OBJCHR_TRAPFX = 0x240,
|
OBJCHR_TRAPFX = 0x240,
|
||||||
|
|
||||||
OBJCHR_EMITSTARTS = 0x200,
|
OBJCHR_EMITSTARTS = 0x200,
|
||||||
|
OBJCHR_MINEFX = 0x180,
|
||||||
|
|
||||||
OBJCHR_TRADEMENU_240 = 0x240,
|
OBJCHR_TRADEMENU_240 = 0x240,
|
||||||
|
|
||||||
@ -131,6 +132,7 @@ enum
|
|||||||
OBJPAL_1 = 1,
|
OBJPAL_1 = 1,
|
||||||
|
|
||||||
OBJPAL_TRAPFX = 2,
|
OBJPAL_TRAPFX = 2,
|
||||||
|
OBJPAL_MINEFX = 0x15,
|
||||||
|
|
||||||
OBJPAL_STATUSHEAL_UNITSPRITE = 2,
|
OBJPAL_STATUSHEAL_UNITSPRITE = 2,
|
||||||
|
|
||||||
|
@ -940,8 +940,8 @@ void StartDanceringAnim(ProcPtr parent);
|
|||||||
// ??? StartEmitStarsAnim(???);
|
// ??? StartEmitStarsAnim(???);
|
||||||
// ??? ClearEmitedStars(???);
|
// ??? ClearEmitedStars(???);
|
||||||
// ??? EndEmitStars(???);
|
// ??? EndEmitStars(???);
|
||||||
// ??? sub_80222E0(???);
|
// ??? ProcMineFxFunc(???);
|
||||||
// ??? sub_8022300(???);
|
// ??? StartMineAnim(???);
|
||||||
// ??? sub_802237C(???);
|
// ??? sub_802237C(???);
|
||||||
// ??? sub_80224EC(???);
|
// ??? sub_80224EC(???);
|
||||||
// ??? sub_8022528(???);
|
// ??? sub_8022528(???);
|
||||||
|
@ -1449,7 +1449,7 @@ extern u16 CONST_DATA obj_0859AEC8[];
|
|||||||
// extern ??? ProcScr_EmitSingleStar
|
// extern ??? ProcScr_EmitSingleStar
|
||||||
// extern ??? ProcScr_EmitStars
|
// extern ??? ProcScr_EmitStars
|
||||||
// extern ??? Img_EmitedStar
|
// extern ??? Img_EmitedStar
|
||||||
// extern ??? gUnknown_0859B560
|
// extern ??? ProcScr_MineFx
|
||||||
// extern ??? gUnknown_0859B668
|
// extern ??? gUnknown_0859B668
|
||||||
// extern ??? gUnknown_0859B66C
|
// extern ??? gUnknown_0859B66C
|
||||||
// extern ??? gUnknown_0859B67C
|
// extern ??? gUnknown_0859B67C
|
||||||
@ -1589,9 +1589,10 @@ extern u16 CONST_DATA Img_DanceringFx[];
|
|||||||
extern u16 CONST_DATA Tsa_DanceringFx[];
|
extern u16 CONST_DATA Tsa_DanceringFx[];
|
||||||
extern u16 CONST_DATA Pal_DanceringFx[];
|
extern u16 CONST_DATA Pal_DanceringFx[];
|
||||||
|
|
||||||
// extern ??? gUnknown_085A7CC0
|
extern u16 CONST_DATA Img_MineFx[];
|
||||||
// extern ??? gUnknown_085A7E34
|
extern u16 CONST_DATA SpritAnim_MineFx[];
|
||||||
// extern ??? gUnknown_085A7EC8
|
extern u16 CONST_DATA Pal_MineFx[];
|
||||||
|
|
||||||
// extern ??? gUnknown_085A7EE8
|
// extern ??? gUnknown_085A7EE8
|
||||||
// extern ??? gProcScr_CpPhase
|
// extern ??? gProcScr_CpPhase
|
||||||
// extern ??? gProcScr_BerserkCpPhase
|
// extern ??? gProcScr_BerserkCpPhase
|
||||||
|
@ -81,7 +81,7 @@ SECTIONS
|
|||||||
src/eventwarpfx.o(.text);
|
src/eventwarpfx.o(.text);
|
||||||
src/whitecircularfadefx.o(.text);
|
src/whitecircularfadefx.o(.text);
|
||||||
src/emitstarfx.o(.text);
|
src/emitstarfx.o(.text);
|
||||||
asm/minefx.o(.text);
|
src/minefx.o(.text);
|
||||||
asm/chapterintrofx_title.o(.text);
|
asm/chapterintrofx_title.o(.text);
|
||||||
src/bmmenu.o(.text);
|
src/bmmenu.o(.text);
|
||||||
src/bmphase.o(.text);
|
src/bmphase.o(.text);
|
||||||
@ -306,6 +306,7 @@ SECTIONS
|
|||||||
. = ALIGN(4); src/eventwarpfx.o(.data);
|
. = ALIGN(4); src/eventwarpfx.o(.data);
|
||||||
. = ALIGN(4); src/whitecircularfadefx.o(.data);
|
. = ALIGN(4); src/whitecircularfadefx.o(.data);
|
||||||
. = ALIGN(4); src/emitstarfx.o(.data);
|
. = ALIGN(4); src/emitstarfx.o(.data);
|
||||||
|
. = ALIGN(4); src/minefx.o(.data);
|
||||||
. = ALIGN(4); data/data_59B358.o(.data);
|
. = ALIGN(4); data/data_59B358.o(.data);
|
||||||
. = ALIGN(4); src/bmmenu.o(.data);
|
. = ALIGN(4); src/bmmenu.o(.data);
|
||||||
. = ALIGN(4); data/data_59B668.o(.data);
|
. = ALIGN(4); data/data_59B668.o(.data);
|
||||||
|
@ -60,7 +60,7 @@ void StartLightRuneAnim(ProcPtr, int, int);
|
|||||||
void StartLightRuneAnim2(ProcPtr, int, int);
|
void StartLightRuneAnim2(ProcPtr, int, int);
|
||||||
|
|
||||||
// minefx.s
|
// minefx.s
|
||||||
void sub_8022300(ProcPtr, int, int);
|
void StartMineAnim(ProcPtr, int, int);
|
||||||
|
|
||||||
// ev_triggercheck.s
|
// ev_triggercheck.s
|
||||||
void sub_80831C8(s8, s8);
|
void sub_80831C8(s8, s8);
|
||||||
@ -818,7 +818,7 @@ void ExecMine(ProcPtr proc) {
|
|||||||
|
|
||||||
gBattleTarget.statusOut = -1;
|
gBattleTarget.statusOut = -1;
|
||||||
|
|
||||||
sub_8022300(proc, gActionData.xOther, gActionData.yOther);
|
StartMineAnim(proc, gActionData.xOther, gActionData.yOther);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
48
src/minefx.c
Normal file
48
src/minefx.c
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "functions.h"
|
||||||
|
#include "variables.h"
|
||||||
|
#include "hardware.h"
|
||||||
|
#include "proc.h"
|
||||||
|
#include "hardware.h"
|
||||||
|
#include "constants/video-global.h"
|
||||||
|
#include "bmfx.h"
|
||||||
|
#include "ap.h"
|
||||||
|
#include "soundwrapper.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map effect happening when a mine is being set
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct ProcMineFx {
|
||||||
|
PROC_HEADER;
|
||||||
|
|
||||||
|
/* 29 */ u8 _pad_29[0x41 - 0x29];
|
||||||
|
|
||||||
|
/* 41 */ s16 counter;
|
||||||
|
};
|
||||||
|
|
||||||
|
void ProcMineFxFunc(struct ProcMineFx *proc);
|
||||||
|
|
||||||
|
struct ProcCmd CONST_DATA ProcScr_MineFx[] = {
|
||||||
|
PROC_SLEEP(0x18),
|
||||||
|
PROC_CALL(ProcMineFxFunc),
|
||||||
|
PROC_END
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void ProcMineFxFunc(struct ProcMineFx *proc)
|
||||||
|
{
|
||||||
|
PlaySoundEffect(0x2F9);
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartMineAnim(ProcPtr parent, int x, int y)
|
||||||
|
{
|
||||||
|
x = x * 0x10 - gGameState.camera.x + 8;
|
||||||
|
y = y * 0x10 - gGameState.camera.y + 4;
|
||||||
|
|
||||||
|
NewBlockingTimer(parent, 0x20);
|
||||||
|
CopyDataWithPossibleUncomp(Img_MineFx, OBJ_CHR_ADDR(OBJCHR_MINEFX));
|
||||||
|
ApplyPalette(Pal_MineFx, OBJPAL_MINEFX);
|
||||||
|
APProc_Create(SpritAnim_MineFx, x, y, 0x5180, 0, 0);
|
||||||
|
Proc_Start(ProcScr_MineFx, parent);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user