mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-27 04:38:15 -05:00
Sixth cleanup sweep. Four asm files and their includes removed: asm/overlay_29_02328A74.s DoMoveDamagePoison40 asm/overlay_29_02329FE0.s DoMoveMudSlap asm/overlay_29_0232B820.s DoMoveMistBall asm/main_0200F18C.s GetEquivItemIndex The three move effects share DoMoveBubble's shape: deal damage, and on a random outcome apply a secondary effect, returning whether damage landed rather than whether the effect did. The result variable doubles as an argument in two of them -- MistBall passes it as both the stage count and the checkProtected flag, MudSlap passes 0 as the chance. GetEquivItemIndex walks the 50 bag slots with a cursor, testing each item's exists flag as `(flags & 1) != 0` so the boolify emits tst/movne/moveq, and returns the index of the first equivalent item or -1. A fifth was prepared and not landed: GetNextIqSkill (asm/main_02058F24.s) sits at 30, the whole difference being that the target keeps its skill-list cursor in lr where the candidate uses r5. Four spellings tried -- hoisting the value local, moving the cursor declaration, a group temporary, and a while loop -- all 30 or worse. Authored by Claude (Opus 5) under human direction. All four verified at score 0. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK. None carries a region conditional, so US alone is sufficient. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
13 lines
216 B
C
13 lines
216 B
C
#ifndef PMDSKY_MAIN_0200F14C_H
|
|
#define PMDSKY_MAIN_0200F14C_H
|
|
|
|
#include "util.h"
|
|
|
|
#include "item.h"
|
|
|
|
u32 HasStorableItems(void);
|
|
s16 GetItemIndex(struct item* item);
|
|
s16 GetEquivItemIndex(struct item* item);
|
|
|
|
#endif
|