finished fldeff_poison
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ sub_807F620: @ 807F620
|
||||
.align 2, 0
|
||||
_0807F640: .4byte gTasks+0x8
|
||||
_0807F644:
|
||||
bl c3_80A0DD8_is_running
|
||||
bl FldEffPoison_IsActive
|
||||
cmp r0, 0
|
||||
bne _0807F686
|
||||
bl sub_812B478
|
||||
|
||||
+1
-1
@@ -291,7 +291,7 @@ _080A0668:
|
||||
cmp r7, 0
|
||||
beq _080A067C
|
||||
_080A0678:
|
||||
bl overworld_poison_effect
|
||||
bl FldEffPoison_Start
|
||||
_080A067C:
|
||||
cmp r6, 0
|
||||
beq _080A0688
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start task50_overworld_poison_effect
|
||||
task50_overworld_poison_effect: @ 80A0DD8
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
lsls r0, r2, 2
|
||||
adds r0, r2
|
||||
lsls r0, 3
|
||||
ldr r1, _080A0DFC @ =gTasks+0x8
|
||||
adds r1, r0, r1
|
||||
movs r3, 0
|
||||
ldrsh r0, [r1, r3]
|
||||
cmp r0, 0x1
|
||||
beq _080A0E16
|
||||
cmp r0, 0x1
|
||||
bgt _080A0E00
|
||||
cmp r0, 0
|
||||
beq _080A0E06
|
||||
b _080A0E32
|
||||
.align 2, 0
|
||||
_080A0DFC: .4byte gTasks+0x8
|
||||
_080A0E00:
|
||||
cmp r0, 0x2
|
||||
beq _080A0E2A
|
||||
b _080A0E32
|
||||
_080A0E06:
|
||||
ldrh r0, [r1, 0x2]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x2]
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x4
|
||||
ble _080A0E32
|
||||
b _080A0E22
|
||||
_080A0E16:
|
||||
ldrh r0, [r1, 0x2]
|
||||
subs r0, 0x1
|
||||
strh r0, [r1, 0x2]
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
bne _080A0E32
|
||||
_080A0E22:
|
||||
ldrh r0, [r1]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1]
|
||||
b _080A0E32
|
||||
_080A0E2A:
|
||||
adds r0, r2, 0
|
||||
bl DestroyTask
|
||||
b _080A0E42
|
||||
_080A0E32:
|
||||
ldrb r1, [r1, 0x2]
|
||||
lsls r0, r1, 4
|
||||
orrs r0, r1
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0
|
||||
bl Unused_AdjustBgMosaic
|
||||
_080A0E42:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end task50_overworld_poison_effect
|
||||
|
||||
thumb_func_start overworld_poison_effect
|
||||
overworld_poison_effect: @ 80A0E48
|
||||
push {lr}
|
||||
movs r0, 0x48
|
||||
bl PlaySE
|
||||
ldr r0, _080A0E5C @ =task50_overworld_poison_effect
|
||||
movs r1, 0x50
|
||||
bl CreateTask
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A0E5C: .4byte task50_overworld_poison_effect
|
||||
thumb_func_end overworld_poison_effect
|
||||
|
||||
thumb_func_start c3_80A0DD8_is_running
|
||||
c3_80A0DD8_is_running: @ 80A0E60
|
||||
push {lr}
|
||||
ldr r0, _080A0E70 @ =task50_overworld_poison_effect
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_080A0E70: .4byte task50_overworld_poison_effect
|
||||
thumb_func_end c3_80A0DD8_is_running
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
||||
+1
-1
@@ -71,7 +71,7 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op);
|
||||
u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op);
|
||||
u32 GetBgY(u8 bg);
|
||||
void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
|
||||
u8 Unused_AdjustBgMosaic(u8 a1, u8 a2);
|
||||
u8 AdjustBgMosaic(u8 a1, u8 a2);
|
||||
void SetBgTilemapBuffer(u8 bg, void *tilemap);
|
||||
void UnsetBgTilemapBuffer(u8 bg);
|
||||
void* GetBgTilemapBuffer(u8 bg);
|
||||
|
||||
@@ -4,4 +4,8 @@
|
||||
// rock smash
|
||||
u8 oei_task_add(void);
|
||||
|
||||
// poison
|
||||
void FldEffPoison_Start(void);
|
||||
bool32 FldEffPoison_IsActive(void);
|
||||
|
||||
#endif // GUARD_FLDEFF_H
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
|
||||
void sub_80FA5E4(s16 id, s16 x, s16 y);
|
||||
void sub_80FA794(s16 x, s16 y);
|
||||
void overworld_poison_effect(void);
|
||||
void FldEffPoison_Start(void);
|
||||
|
||||
#endif //GUARD_FLDEFF_80F9BCC_H
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ SECTIONS {
|
||||
asm/field_poison.o(.text);
|
||||
asm/pokemon_size_record.o(.text);
|
||||
asm/pc_screen_effect.o(.text);
|
||||
asm/fldeff_poison.o(.text);
|
||||
src/fldeff_poison.o(.text);
|
||||
src/fldeff_berrytree.o(.text);
|
||||
src/field_special_scene.o(.text);
|
||||
asm/safari_zone.o(.text);
|
||||
|
||||
@@ -865,7 +865,7 @@ void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dis
|
||||
SetBgAffineInternal(bg, srcCenterX, srcCenterY, dispCenterX, dispCenterY, scaleX, scaleY, rotationAngle);
|
||||
}
|
||||
|
||||
u8 Unused_AdjustBgMosaic(u8 a1, u8 a2)
|
||||
u8 AdjustBgMosaic(u8 a1, u8 a2)
|
||||
{
|
||||
u16 result;
|
||||
s16 test1;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "global.h"
|
||||
#include "task.h"
|
||||
#include "bg.h"
|
||||
#include "sound.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
static void Task_FieldPoisonEffect(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
switch (data[0])
|
||||
{
|
||||
case 0:
|
||||
data[1] += 1;
|
||||
if (data[1] > 4)
|
||||
data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
data[1] -= 1;
|
||||
if (data[1] == 0)
|
||||
data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
DestroyTask(taskId);
|
||||
return;
|
||||
}
|
||||
AdjustBgMosaic((u8)(((u8)data[1] << 4) | (u8)data[1]), 0);
|
||||
}
|
||||
|
||||
void FldEffPoison_Start(void)
|
||||
{
|
||||
PlaySE(SE_DAUGI);
|
||||
CreateTask(Task_FieldPoisonEffect, 80);
|
||||
}
|
||||
|
||||
bool32 FldEffPoison_IsActive(void)
|
||||
{
|
||||
return FuncIsActiveTask(Task_FieldPoisonEffect);
|
||||
}
|
||||
Reference in New Issue
Block a user