mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
move moves
This commit is contained in:
parent
79262db253
commit
2ce8be9c67
|
|
@ -1,43 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "main_020139AC.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start GetMoveNbStrikes
|
||||
GetMoveNbStrikes: ; 0x020139AC
|
||||
ldr r1, _020139C8 ; =DUNGEON_MOVE_TABLES
|
||||
ldrh r2, [r0, #4]
|
||||
ldr r1, [r1, #8]
|
||||
mov r0, #0x1a
|
||||
mla r0, r2, r0, r1
|
||||
ldrb r0, [r0, #0xd]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_020139C8: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveNbStrikes
|
||||
|
||||
arm_func_start GetMoveBasePower
|
||||
GetMoveBasePower: ; 0x020139CC
|
||||
ldrh r2, [r0, #4]
|
||||
mov r0, #0x1a
|
||||
ldr r1, _020139E8 ; =DUNGEON_MOVE_TABLES
|
||||
mul r0, r2, r0
|
||||
ldr r1, [r1, #8]
|
||||
ldrsh r0, [r1, r0]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_020139E8: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveBasePower
|
||||
|
||||
arm_func_start GetMoveBasePowerGround
|
||||
GetMoveBasePowerGround: ; 0x020139EC
|
||||
ldrh r2, [r0, #2]
|
||||
mov r0, #0x1a
|
||||
ldr r1, _02013A08 ; =DUNGEON_MOVE_TABLES
|
||||
mul r0, r2, r0
|
||||
ldr r1, [r1, #8]
|
||||
ldrsh r0, [r1, r0]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_02013A08: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveBasePowerGround
|
||||
|
|
@ -2,7 +2,12 @@
|
|||
#define PMDSKY_MAIN_0201398C_H
|
||||
|
||||
#include "move.h"
|
||||
#include "common.h"
|
||||
|
||||
s16 GetMoveAiWeight(struct move *move);
|
||||
u8 GetMoveNbStrikes(struct move* move);
|
||||
s16 GetMoveBasePower(struct move* move);
|
||||
s16 GetMoveBasePowerGround(struct ground_move* move);
|
||||
|
||||
|
||||
#endif //PMDSKY_MAIN_0201398C_H
|
||||
|
|
|
|||
1
main.lsf
1
main.lsf
|
|
@ -53,7 +53,6 @@ Static main
|
|||
Object src/moves_2.o
|
||||
Object asm/main_02013884.o
|
||||
Object src/main_0201398C.o
|
||||
Object asm/main_020139AC.o
|
||||
Object src/moves_4.o
|
||||
Object src/moves.o
|
||||
Object src/moves_3.o
|
||||
|
|
|
|||
|
|
@ -7,3 +7,20 @@ s16 GetMoveAiWeight(struct move *move)
|
|||
{
|
||||
return DUNGEON_MOVE_TABLES.moves->moves[move->id].ai_weight;
|
||||
}
|
||||
|
||||
u8 GetMoveNbStrikes(struct move* move)
|
||||
{
|
||||
return DUNGEON_MOVE_TABLES.moves->moves[move->id].strikes;
|
||||
}
|
||||
|
||||
s16 GetMoveBasePower(struct move* move)
|
||||
{
|
||||
return DUNGEON_MOVE_TABLES.moves->moves[move->id].base_power;
|
||||
}
|
||||
|
||||
s16 GetMoveBasePowerGround(struct ground_move* move)
|
||||
{
|
||||
return DUNGEON_MOVE_TABLES.moves->moves[move->id].base_power;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user