move coconut data to c

This commit is contained in:
Alex Bates 2021-02-03 20:04:37 +00:00
parent bb4a0ab5bf
commit 8a1ba58aac
7 changed files with 167 additions and 54 deletions

View File

@ -1,45 +0,0 @@
.include "macro.inc"
.section .data
glabel D_802A1240_72F960
.word 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000002, UseCamPreset, 0x00000045, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000208D, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001001F, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0x00000012, 0x00000043, 0x00000003, SetActorSpeed, 0x00000000, 0xF24A8A80, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000002, PlayerRunToGoal, 0x00000000, 0x00000027, 0x00000002, 0xFE363C81, 0x0000002D, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C83, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C83, 0x00000002, 0x00000043, 0x0000000F, PlayEffect, 0x00000033, 0x00000001, 0xFE363C80, 0xFE363C83, 0xFE363C82, 0xF24A7E80, 0x0000001E, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000001, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000043, 0x00000001, func_802A1000_72F720, 0x00000008, 0x00000001, 0xFE363C80, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000001, func_802A11D4_72F8F4, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C8A, 0x00000012, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000208D, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001001F, 0x00000008, 0x00000001, 0x00000004, 0x00000027, 0x00000002, 0xFE363C81, 0x0000002D, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C83, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C83, 0x00000002, 0x00000043, 0x0000000F, PlayEffect, 0x00000033, 0x00000001, 0xFE363C80, 0xFE363C83, 0xFE363C82, 0xF24A7E80, 0x0000001E, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000001, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C8A, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
glabel D_802A1544_72FC5C
.word 0x00000043, 0x00000002, UseCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0xFFFFFFAB, 0x00000001, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000029, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F8, 0x00000043, 0x00000002, MoveBattleCamOver, 0x0000001E, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001001F, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C81, 0x0000002D, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000001, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C80, 0x00000043, 0x00000001, func_802A1000_72F720, 0x00000008, 0x00000001, 0xFE363C80, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000001, func_802A11D4_72F8F4, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C8E, 0x00000002, 0x00000000, 0x00000001, 0x00000000
glabel D_802A1670_72FFD0
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000002, SetGoalToHome, 0x00000000, 0x00000043, 0x00000003, SetActorSpeed, 0x00000000, 0xF24A9A80, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010005, 0x00000043, 0x00000002, PlayerRunToGoal, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010002, 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000000
glabel D_802A170C_73006C
.word 0x00000056, 0x00000000, 0x00000005, 0x00000001, 0x00000004, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002095, 0x00000008, 0x00000001, 0x0000000A, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001001C, 0x00000008, 0x00000001, 0x0000002D, 0x00000002, 0x00000000, 0x00000001, 0x00000000
glabel D_802A1784_7300E4
.word 0x00000056, 0x00000000, 0x00000005, 0x00000001, 0x00000004, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002095, 0x00000008, 0x00000001, 0x0000000A, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010025, 0x00000008, 0x00000001, 0x0000002D, 0x00000002, 0x00000000, 0x00000001, 0x00000000
# raster
glabel D_802A1800_730160
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000088, 0x88000000, 0x00000000, 0x00000000, 0x00008888, 0x88880000, 0x00000000, 0x00000000, 0x00088745, 0x25788000, 0x00000000, 0x00000000, 0x00887252, 0x22378800, 0x00000000, 0x00000000, 0x08872521, 0x25237880, 0x00000000, 0x00000000, 0x08823512, 0x12523880, 0x00000000, 0x00000000, 0x88725225, 0x22523788, 0x00000000, 0x00000000, 0x88325235, 0x22532388, 0x00000000, 0x00000008, 0x87322252, 0x22323378, D_80000000, 0x00000008, 0x85352252, 0x23237358, D_80000000, 0x00000008, 0x83522252, 0x22323738, D_80000000, 0x00000008, 0x82722255, 0x22523738, D_80000000, 0x00000008, 0x84732233, 0x32733738, D_80000000, 0x00000008, 0x85472733, 0x33734558, D_80000000, 0x00000008, 0x87433743, 0x43734478, D_80000000, 0x00000000, 0x88543744, 0x37444588, 0x00000000, 0x00000000, 0x88854474, 0x47445888, 0x00000000, 0x00000000, 0x08888757, 0x55788880, 0x00000000, 0x00000000, 0x00888888, 0x88888800, 0x00000000, 0x00000000, 0x00008888, 0x88880000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
# palette
glabel D_802A1A00_730360
.word 0x294AED8F, 0xD48BC409, 0xABC78B49, 0x83077A85, 0x39010001, 0x00010001, 0x00010001, 0x00010001
# vertex table
glabel D_802A1A20_730380
.word 0xFFF0FFF0, 0x00000000, 0x00000000, 0x000000FF, 0x000FFFF0, 0x00000000, 0x04000000, 0x000000FF, 0x000F000F, 0x00000000, 0x04000400, 0x000000FF, 0xFFF0000F, 0x00000000, 0x00000400, 0x000000FF
# display list
glabel D_802A1A60_7303C0
.word 0xE7000000, 0x00000000, 0xD7000002, 0xFFFFFFFF, 0xFCFFFFFF, 0xFFFCF279, 0xE3000C00, 0x00080000, 0xE3000D01, 0x00000000, 0xE3000F00, 0x00000000, 0xE3001001, 0x00000000, 0xE3001201, 0x00003000, 0xE3001402, 0x00000C00, 0xE3001001, 0x00008000, 0xFD100000, 0x802A1A00, 0xE8000000, 0x00000000, 0xF5000100, 0x07000000, 0xE6000000, 0x00000000, 0xF0000000, 0x0703C000, 0xE7000000, 0x00000000, 0xFD48000F, 0x802A1800, 0xF5480400, 0x07000000, 0xE6000000, 0x00000000, 0xF4000000, 0x0703E07C, 0xE7000000, 0x00000000, 0xF5400400, 0x00000000, 0xF2000000, 0x0007C07C, 0xD9FDFFFF, 0x00000000, 0xD9DFFFFF, 0x00000000, 0x01004008, 0x802A1A20, 0x05000204, 0x00000000, 0x05000406, 0x00000000, 0xE7000000, 0x00000000, 0xDF000000, 0x00000000
glabel D_802A1B50_7304B0
.word 0x00000004, 0x0000000D, 0x00000001, 0x0000003C, 0x802A1A60, 0x00000002, 0x00000000
# useitem
glabel D_802A1B6C_7304B0
.word 0x00000025, 0x00000002, 0xFE363C8A, 0x000000AC, 0x00000046, 0x00000001, D_802A1240_72F960, 0x00000043, 0x00000002, UseCamPreset, 0x00000003, 0x00000043, 0x00000002, MoveBattleCamOver, 0x0000000F, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010016, 0x00000043, 0x00000002, PlaySound, 0x000003FA, 0x00000008, 0x00000001, 0x00000003, 0x00000043, 0x00000003, func_802D3474, 0xFE363C8A, 0x802A1B50, 0x00000026, 0x00000002, 0xFE363C80, 0xF24A7E80, 0x00000043, 0x00000002, MultiplyByActorScale, 0xFE363C80, 0x00000043, 0x00000005, func_802D38EC, 0xFE363C8A, 0xFE363C80, 0xFE363C80, 0xFE363C80, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0x00000014, 0x00000024, 0x00000002, 0xFE363C84, 0x0000002A, 0x00000024, 0x00000002, 0xFE363C85, 0x00000005, 0x00000043, 0x00000004, MultiplyVec3ByActorScale, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000027, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000043, 0x00000005, func_802D36E0, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, InitTargetIterator, 0x00000043, 0x00000002, SetGoalToTarget, 0xFFFFFF81, 0x00000043, 0x00000005, GetGoalPos, 0xFFFFFF81, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000005, 0x00000001, 0x00000012, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFC4, 0x00000043, 0x00000005, func_802D3840, 0xFE363C8A, 0x00000000, 0x00000000, 0xFE363C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000043, 0x00000003, func_802D39FC, 0xFE363C8A, 0xF24A7DB4, 0x00000027, 0x00000002, 0xFE363C82, 0x00000005, 0x00000043, 0x00000006, func_802D3C58, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000012, 0x00000043, 0x00000004, GetItemPower, 0x000000AC, 0xFE363C83, 0xFE363C84, 0x00000043, 0x00000002, ApplyShrinkFromOwner, 0xFE363C83, 0x00000043, 0x00000006, ItemDamageEnemy, 0xFE363C89, 0x18000000, 0x00000000, 0xFE363C83, 0x00000020, 0x00000027, 0x00000002, 0xFE363C80, 0x0000003C, 0x00000027, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000006, func_802D3C58, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000010, 0x00000043, 0x00000002, func_802D3624, 0xFE363C8A, 0x00000046, 0x00000001, 0x802A1670, 0x00000002, 0x00000000, 0x00000001, 0x00000000
# padding
glabel D_802A1E78_730598
.word 0x00000000, 0x00000000

163
src/battle/item/coconut.c Normal file
View File

@ -0,0 +1,163 @@
#include "common.h"
#include "script_api/battle.h"
INCLUDE_ASM(s32, "battle/item/coconut", func_802A1000_72F720);
INCLUDE_ASM(s32, "battle/item/coconut", func_802A11D4_72F8F4);
Script D_802A1240_72F960 = SCRIPT({
if (SI_VAR(1) == 0) {
UseCamPreset(69);
sleep 10;
PlaySoundAtActor(0, 8333);
SetAnimation(0, 0, 0x1001F);
GetActorPos(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 18;
SetActorSpeed(0, 4.0);
SetGoalPos(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
PlayerRunToGoal(0);
SI_VAR(1) += 45;
SI_VAR(3) = SI_VAR(1);
SI_VAR(3) += 10;
SI_VAR(3) += 2;
PlayEffect(51, 1, SI_VAR(0), SI_VAR(3), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0);
MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(10) = SI_VAR(0);
func_802A1000_72F720();
sleep SI_VAR(0);
sleep 15;
func_802A11D4_72F8F4();
RemoveItemEntity(SI_VAR(10));
} else {
GetActorPos(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
PlaySoundAtActor(0, 8333);
SetAnimation(0, 0, 0x1001F);
sleep 4;
SI_VAR(1) += 45;
SI_VAR(3) = SI_VAR(1);
SI_VAR(3) += 10;
SI_VAR(3) += 2;
PlayEffect(51, 1, SI_VAR(0), SI_VAR(3), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0);
MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(10) = SI_VAR(0);
sleep 15;
RemoveItemEntity(SI_VAR(10));
}
});
Script D_802A1544_72FC64 = SCRIPT({
UseCamPreset(19);
SetBattleCamTarget(0xFFFFFFAB, 1, 0);
SetBattleCamOffsetZ(41);
SetBattleCamZoom(248);
MoveBattleCamOver(30);
sleep 10;
SetAnimation(0, 0, 0x1001F);
GetActorPos(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 45;
MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(14) = SI_VAR(0);
func_802A1000_72F720();
sleep SI_VAR(0);
sleep 15;
func_802A11D4_72F8F4();
RemoveItemEntity(SI_VAR(14));
});
Script D_802A1670_72FFD0 = SCRIPT({
UseIdleAnimation(0, 0);
SetGoalToHome(0);
SetActorSpeed(0, 8.0);
SetAnimation(0, 0, 0x10005);
PlayerRunToGoal(0);
SetAnimation(0, 0, 0x10002);
UseIdleAnimation(0, 1);
});
Script Script_802A170C = SCRIPT({
spawn {
loop 4 {
PlaySoundAtActor(0, 0x2095);
sleep 10;
}
}
SetAnimation(0, 0, 0x1001C);
sleep 45;
});
Script D_802A1784_7300E4 = SCRIPT({
spawn {
loop 4 {
PlaySoundAtActor(0, 0x2095);
sleep 10;
}
}
SetAnimation(0, 0, 0x10025);
sleep 45;
});
// TODO: coconut.png
s32 D_802A1800_730160[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000088, 0x88000000, 0x00000000, 0x00000000, 0x00008888, 0x88880000, 0x00000000, 0x00000000, 0x00088745, 0x25788000, 0x00000000, 0x00000000, 0x00887252, 0x22378800, 0x00000000, 0x00000000, 0x08872521, 0x25237880, 0x00000000, 0x00000000, 0x08823512, 0x12523880, 0x00000000, 0x00000000, 0x88725225, 0x22523788, 0x00000000, 0x00000000, 0x88325235, 0x22532388, 0x00000000, 0x00000008, 0x87322252, 0x22323378, 0x80000000, 0x00000008, 0x85352252, 0x23237358, 0x80000000, 0x00000008, 0x83522252, 0x22323738, 0x80000000, 0x00000008, 0x82722255, 0x22523738, 0x80000000, 0x00000008, 0x84732233, 0x32733738, 0x80000000, 0x00000008, 0x85472733, 0x33734558, 0x80000000, 0x00000008, 0x87433743, 0x43734478, 0x80000000, 0x00000000, 0x88543744, 0x37444588, 0x00000000, 0x00000000, 0x88854474, 0x47445888, 0x00000000, 0x00000000, 0x08888757, 0x55788880, 0x00000000, 0x00000000, 0x00888888, 0x88888800, 0x00000000, 0x00000000, 0x00008888, 0x88880000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
s32 D_802A1A00_730360[] = {
0x294AED8F, 0xD48BC409, 0xABC78B49, 0x83077A85, 0x39010001, 0x00010001, 0x00010001, 0x00010001,
};
s32 D_802A1A20_730380[] = {
0xFFF0FFF0, 0x00000000, 0x00000000, 0x000000FF, 0x000FFFF0, 0x00000000, 0x04000000, 0x000000FF, 0x000F000F, 0x00000000, 0x04000400, 0x000000FF, 0xFFF0000F, 0x00000000, 0x00000400, 0x000000FF,
};
s32 D_802A1A60_7303C0[] = {
0xE7000000, 0x00000000, 0xD7000002, 0xFFFFFFFF, 0xFCFFFFFF, 0xFFFCF279, 0xE3000C00, 0x00080000, 0xE3000D01, 0x00000000, 0xE3000F00, 0x00000000, 0xE3001001, 0x00000000, 0xE3001201, 0x00003000, 0xE3001402, 0x00000C00, 0xE3001001, 0x00008000, 0xFD100000, 0x802A1A00, 0xE8000000, 0x00000000, 0xF5000100, 0x07000000, 0xE6000000, 0x00000000, 0xF0000000, 0x0703C000, 0xE7000000, 0x00000000, 0xFD48000F, 0x802A1800, 0xF5480400, 0x07000000, 0xE6000000, 0x00000000, 0xF4000000, 0x0703E07C, 0xE7000000, 0x00000000, 0xF5400400, 0x00000000, 0xF2000000, 0x0007C07C, 0xD9FDFFFF, 0x00000000, 0xD9DFFFFF, 0x00000000, 0x01004008, 0x802A1A20, 0x05000204, 0x00000000, 0x05000406, 0x00000000, 0xE7000000, 0x00000000, 0xDF000000, 0x00000000,
};
s32 D_802A1B50_7304B0[] = {
0x00000004, 0x0000000D, 0x00000001, 0x0000003C, &D_802A1A60_7303C0, 0x00000002, 0x00000000,
};
Script D_802A1B6C_7304B0 = SCRIPT({
SI_VAR(10) =c ItemId_COCONUT;
await D_802A1240_72F960;
UseCamPreset(3);
MoveBattleCamOver(15);
SetAnimation(0, 0, 0x10016);
PlaySound(1018);
sleep 3;
0x802D3474(SI_VAR(10), D_802A1B50_7304B0);
SI_VAR(0) = 1.0;
MultiplyByActorScale(SI_VAR(0));
0x802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0));
GetActorPos(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20;
SI_VAR(4) = 42;
SI_VAR(5) = 5;
MultiplyVec3ByActorScale(SI_VAR(3), SI_VAR(4), SI_VAR(5));
SI_VAR(0) += SI_VAR(3);
SI_VAR(1) += SI_VAR(4);
SI_VAR(2) += SI_VAR(5);
0x802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator();
SetGoalToTarget(0xFFFFFF81);
GetGoalPos(0xFFFFFF81, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn {
SI_VAR(0) = 0;
loop 18 {
SI_VAR(0) += 0xFFFFFFC4;
0x802D3840(SI_VAR(10), 0, 0, SI_VAR(0));
sleep 1;
}
}
0x802D39FC(SI_VAR(10), 0.8);
SI_VAR(2) += 5;
0x802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
GetItemPower(ItemId_COCONUT, SI_VAR(3), SI_VAR(4));
ApplyShrinkFromOwner(SI_VAR(3));
ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32);
SI_VAR(0) += 60;
SI_VAR(1) += 0;
0x802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 16);
0x802D3624(SI_VAR(10));
await D_802A1670_72FFD0;
});

View File

@ -1,5 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "battle/item/coconut_72F720", func_802A1000_72F720);
INCLUDE_ASM(s32, "battle/item/coconut_72F720", func_802A11D4_72F8F4);

View File

@ -42,7 +42,7 @@ def script_lib():
s = [s.strip() for s in line.split("=", 1)]
name = s[0]
addr = s[1]
addr = s[1].split(";")[0].split(" ")[0]
_script_lib[int(addr, 16)] = name
return _script_lib
@ -67,7 +67,7 @@ class ScriptDisassembler:
argc = self.read_word()
if opcode > 0xFF or argc > 0xFF:
raise Exception(f"script '{script_name}' is malformed")
raise Exception(f"script '{self.script_name}' is malformed")
argv = []
for i in range(0, argc):

View File

@ -2344,8 +2344,8 @@ segments:
vram: 0x802A1000
overlay: True
files:
- [0x72F720, c]
- [0x72F960, data]
- [0x72F720, c, battle/item/coconut]
- [0x72F960, .data, battle/item/coconut]
- name: battle/item/electro_pop
type: code
start: 0x7305A0