hirom header !alphaList = $C2FAD0 ; -------- org $C353C1 ; Build Alphabetical Rage list C353C1: ; first 2 instructions are Square's. LDX #$9D89 ; will store list at 7E/9D89 STX $2181 LDY $00 ; set loop iterator to 0. 00/0000 holds zero in every ; trace i've seen... also, can move back after SEP. SEP #$10 ; 8-bit X and Y JMP BuildLoop ; to hell with your Orwellian, one-size-fits-all ; Skills generator! Gau is not a brick in the wall! NOP NOP ; Define Rage's text color rgcolor: JSR $C2F2 ; Color: User's AZhook: JSR extra_rgcol ; Rage in slot ; rest of function unchanged INC A ; Learned it? BNE .exit ; Lit if so LDA #$28 ; Palette 2 STA $29 ; Color: Gray TXA ; Enemy number CMP #$FF ; Pugs? BNE .skip ; Retain if not TDC ; Pugs's tbl value <- Table value is defined in "mark6x1" function above .skip CMP $7EAA8D,X ; Roams Veldt now? BNE .exit ; Gray out if not LDA #$24 ; Palette 1 <- Use #$2C for gray-and-blue palette from Magic menu STA $29 ; Color: Turquoise .exit RTS ; --------------- org ?????? extra_rgcol: JSR $50EC ; Rage in slot pha lda !alphaList,x tax pla rts ; --------------- org ?????? BuildLoop: TYX LDA !alphaList,X ; get monster # alphabetically from huge ass FF-block. ; may pick new location later, perhaps in 13 years. CLC ; don't want carry adding into X JSL $C2FBD0 ; call C2/5217 indirectly, since it expects a near call. ; X = A DIV 8, A = 1 SHL (A MOD 8) AND $1D2C,X ; compare to current known Rages byte - 32 bytes total, ; 8 rages per byte DEC ; if there's no rage, A becomes the FFh we want for ; indicating a null menu item. if there is one, any ; non-null value for A will suffice, including this ; (2 ^ n) - 1, as n = 0 to 7. STA $2180 ; store non-null rage placeholder or null in menu INY ; advance to next menu position BNE BuildLoop ; loop for all enemies, 0 to 255 REP #$10 ; restore 16-bit X and Y RTS ; ====================================================== ; (free space used = 11 + 23)