mirror of
https://github.com/pret/pokeyellow.git
synced 2026-09-09 11:05:28 -05:00
Translate CureVolatileStatuses, ResetStatMods: haze effects
SM83→x86 notes: - HL→ESI for battle status ptr, HL→ESI, B→BH, A→AL for stat mods - H flag not involved - straight translation; gb memory access via ebp+esi Co-Authored-By: Gemini <noreply@google.com>
This commit is contained in:
@@ -1694,3 +1694,27 @@ The pointer tables are computed at generation time and cannot be partially updat
|
||||
If you need to exclude RGBASM-conditional content, add a filter to the generator.
|
||||
|
||||
---
|
||||
|
||||
## CureVolatileStatuses
|
||||
|
||||
- **Source:** `engine/battle/move_effects/haze.asm:CureVolatileStatuses`
|
||||
- **Translated:** `dos_port/src/engine/battle/move_effects/haze.asm`
|
||||
- **Date:** 2026-06-23
|
||||
- **H-flag:** not involved
|
||||
- **Bug tags:** none
|
||||
- **Registers:** HL->ESI for battle status ptr, A->AL
|
||||
- **Notes:** none
|
||||
|
||||
---
|
||||
|
||||
## ResetStatMods
|
||||
|
||||
- **Source:** `engine/battle/move_effects/haze.asm:ResetStatMods`
|
||||
- **Translated:** `dos_port/src/engine/battle/move_effects/haze.asm`
|
||||
- **Date:** 2026-06-23
|
||||
- **H-flag:** not involved
|
||||
- **Bug tags:** none
|
||||
- **Registers:** HL→ESI, B→BH, A→AL
|
||||
- **Notes:** straight translation; gb memory access via ebp+esi
|
||||
|
||||
---
|
||||
|
||||
@@ -89,16 +89,33 @@ HazeEffect_:
|
||||
jmp PrintText
|
||||
|
||||
CureVolatileStatuses:
|
||||
and byte [ebp + esi], (~(1 << CONFUSED)) & 0xFF
|
||||
inc esi ; BATTSTATUS2
|
||||
mov al, byte [ebp + esi]
|
||||
; res CONFUSED, [hl]
|
||||
and byte [ebp + esi], ~((1 << 7)) & 0xFF ; CONFUSED = 7
|
||||
|
||||
; inc hl ; BATTSTATUS2
|
||||
inc esi
|
||||
|
||||
; ld a, [hl]
|
||||
mov al, [ebp + esi]
|
||||
|
||||
; clear USING_X_ACCURACY, PROTECTED_BY_MIST, GETTING_PUMPED, and SEEDED statuses
|
||||
and al, (~((1 << USING_X_ACCURACY) | (1 << PROTECTED_BY_MIST) | (1 << GETTING_PUMPED) | (1 << SEEDED))) & 0xFF
|
||||
mov byte [ebp + esi], al
|
||||
inc esi ; BATTSTATUS3
|
||||
mov al, byte [ebp + esi]
|
||||
and al, 11110000b | (1 << TRANSFORMED) ; clear Bad Poison, Reflect and Light Screen statuses
|
||||
mov byte [ebp + esi], al
|
||||
; and ~((1 << USING_X_ACCURACY) | (1 << PROTECTED_BY_MIST) | (1 << GETTING_PUMPED) | (1 << SEEDED))
|
||||
and al, ~((1 << 0) | (1 << 1) | (1 << 2) | (1 << 7)) & 0xFF
|
||||
|
||||
; ld [hli], a ; BATTSTATUS3
|
||||
mov [ebp + esi], al
|
||||
inc esi
|
||||
|
||||
; ld a, [hl]
|
||||
mov al, [ebp + esi]
|
||||
|
||||
; and %11110000 | (1 << TRANSFORMED) ; clear Bad Poison, Reflect and Light Screen statuses
|
||||
and al, 11110000b | (1 << 3) ; TRANSFORMED = 3
|
||||
|
||||
; ld [hl], a
|
||||
mov [ebp + esi], al
|
||||
|
||||
; ret
|
||||
ret
|
||||
|
||||
ResetStatMods:
|
||||
|
||||
Reference in New Issue
Block a user