[Position independence] [th02/th03/th04/th05] Color palettes

Part of P0060, funded by Touhou Patch Center.
This commit is contained in:
nmlgc 2019-11-26 22:47:07 +01:00
parent b6e0330ff6
commit 619203a1c9
10 changed files with 238 additions and 226 deletions

12
ReC98.h
View File

@ -11,6 +11,18 @@
#define palette_entry_rgb_show(fn) \
palette_entry_rgb(fn); \
palette_show();
// RGB color triple, used for the Palettes structure
typedef union {
struct {
unsigned char r, g, b;
} c;
unsigned char v[3];
} rgb_t;
typedef struct {
rgb_t colors[16];
} palette_t;
// ---------------------
// Macros

View File

@ -65,6 +65,19 @@ twobyte_t ends
; ---------------------
; super_roll_put_1plane() plane_put constants
PLANE_PUT = 0FF00h or GC_RMW
; RGB color triple, used for the Palettes structure
rgb_t struc
r db ?
g db ?
b db ?
rgb_t ends
PALETTE_COLORS = 16
palette_t struc
colors rgb_t PALETTE_COLORS dup(<?>)
palette_t ends
; ---------------------
RES_X = 640

View File

@ -53,7 +53,6 @@ MRETURN macro
y1 = (RETSIZE+4)*2
x2 = (RETSIZE+3)*2
y2 = (RETSIZE+2)*2
r = (RETSIZE+1)*2
retfunc GC_RBOXF_BOXFILL
push word ptr [BP+x1]
@ -71,8 +70,9 @@ func GRCG_ROUND_BOXFILL ; {
push DI
; 変数
s = -2
@@r = (RETSIZE+1)*2
mov AX,[BP+r]
mov AX,[BP+@@r]
mov BX,[BP+x1]
mov SI,[BP+x2]

View File

@ -7808,7 +7808,7 @@ sub_E5B5 endp
sub_E618 proc near
var_2 = word ptr -2
@@component = word ptr -2
push bp
mov bp, sp
@ -7817,24 +7817,24 @@ var_2 = word ptr -2
call grcg_setcolor pascal, (GC_RMW shl 16) + 0
cmp word_218B6, 1
jnz short loc_E668
mov [bp+var_2], 0
mov [bp+@@component], 0
jmp short loc_E64E
; ---------------------------------------------------------------------------
loc_E638:
mov bx, [bp+var_2]
mov al, [bx+1A98h]
mov [bx+3FDDh], al
mov al, [bx+1AA1h]
mov [bx+3FE0h], al
inc [bp+var_2]
mov bx, [bp+@@component]
mov al, Palettes[0 * size rgb_t][bx]
mov byte ptr rgb_21A4D[bx], al
mov al, Palettes[3 * size rgb_t][bx]
mov byte ptr rgb_21A50[bx], al
inc [bp+@@component]
loc_E64E:
cmp [bp+var_2], 3
cmp [bp+@@component], size rgb_t
jl short loc_E638
mov Palettes+9, 40h
mov Palettes+10, 10h
mov Palettes+11, 40h
mov Palettes[3 * size rgb_t].r, 40h
mov Palettes[3 * size rgb_t].g, 10h
mov Palettes[3 * size rgb_t].b, 40h
call far ptr palette_show
loc_E668:
@ -7848,11 +7848,11 @@ loc_E668:
loc_E680:
cmp word_218B6, 20h ; ' '
jnz short loc_E6CC
mov al, byte_21A50
mov al, rgb_21A50.r
mov Palettes+9, al
mov al, byte_21A51
mov al, rgb_21A50.g
mov Palettes+10, al
mov al, byte_21A52
mov al, rgb_21A50.b
mov Palettes+11, al
mov Palettes, 80h
mov Palettes+1, 0
@ -7979,11 +7979,11 @@ loc_E80E:
loc_E821:
cmp word_218B6, 88h
jnz short loc_E867
mov al, byte_21A4D
mov al, rgb_21A4D.r
mov Palettes, al
mov al, byte_21A4E
mov al, rgb_21A4D.g
mov Palettes+1, al
mov al, byte_21A4F
mov al, rgb_21A4D.b
mov Palettes+2, al
call far ptr palette_show
call _snd_se_play c, 16
@ -36932,12 +36932,8 @@ fp_219CA dw ?
dd ? ;
dd ? ;
byte_21A4C db ?
byte_21A4D db ?
byte_21A4E db ?
byte_21A4F db ?
byte_21A50 db ?
byte_21A51 db ?
byte_21A52 db ?
rgb_21A4D rgb_t <?>
rgb_21A50 rgb_t <?>
byte_21A53 db ?
byte_21A54 db ?
byte_21A55 db ?

View File

@ -1538,9 +1538,9 @@ sub_A378 proc far
mov ax, ds
mov es, ax
assume es:_DATA
mov di, 1D94h
mov si, 11BAh
mov cx, 0Ch
mov di, offset palette_1F2F4
mov si, offset Palettes
mov cx, size palette_t / 4
rep movsd
pop di
pop si
@ -1558,9 +1558,9 @@ sub_A38E proc far
push di
mov ax, ds
mov es, ax
mov di, 11BAh
mov si, 1D94h
mov cx, 0Ch
mov di, offset Palettes
mov si, offset palette_1F2F4
mov cx, size palette_t / 4
rep movsd
call far ptr palette_show
pop di
@ -1587,11 +1587,11 @@ arg_0 = byte ptr 6
mov al, [bp+arg_0]
or al, al
jz short loc_A3BC
mov bl, 3
mov bl, 1 * size rgb_t
loc_A3BC:
lea di, [bx+11BAh]
lea si, [bx+1D94h]
lea di, Palettes[bx]
lea si, palette_1F2F4[bx]
movsw
movsb
mov _palette_changed, 1
@ -1616,15 +1616,15 @@ arg_2 = byte ptr 8
push bp
mov bp, sp
push di
mov cx, 3
mov cx, size rgb_t
xor bx, bx
mov al, [bp+arg_0]
or al, al
jz short loc_A3E4
mov bl, 3
mov bl, 1 * size rgb_t
loc_A3E4:
lea di, [bx+11BAh]
lea di, Palettes[bx]
mov al, [bp+arg_2]
loc_A3EB:
@ -5574,25 +5574,25 @@ loc_CC4D:
jnz short loc_CC89
mov al, byte ptr [bp+var_3]
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BAh], 78h ; 'x'
mov Palettes[bx].r, 78h
loc_CC78:
mov al, byte ptr [bp+var_3]
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BCh], 78h ; 'x'
mov Palettes[bx].b, 78h
jmp short loc_CC98
; ---------------------------------------------------------------------------
loc_CC89:
mov al, byte ptr [bp+var_3]
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BAh], 78h ; 'x'
mov Palettes[bx].r, 78h
loc_CC98:
mov _palette_changed, 1
@ -5708,7 +5708,7 @@ loc_CD99:
mov dh, 0
imul dx, 3
mov bx, dx
mov [bx+11BAh], al
mov Palettes[bx].r, al
mov _palette_changed, 1
loc_CDB7:
@ -19634,19 +19634,19 @@ loc_149E8:
mov [bp+var_2], dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_14A1C:
@ -20667,27 +20667,27 @@ loc_1522B:
loc_1527D:
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_1]
shl dl, 2
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, [bp+var_1]
mov ah, 0
imul ax, 3
mov dl, byte ptr word_1FE88
mov dh, 0
imul dx, 3
imul dx, size rgb_t
mov bx, dx
mov [bx+11BBh], al
mov Palettes[bx].g, al
mov al, [bp+var_1]
mov ah, 0
imul ax, 3
mov dl, byte ptr word_1FE88
mov dh, 0
imul dx, 3
imul dx, size rgb_t
mov bx, dx
mov [bx+11BCh], al
mov Palettes[bx].b, al
jmp loc_153A6
; ---------------------------------------------------------------------------
@ -20771,19 +20771,19 @@ loc_15360:
mov [bp+var_2], dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
loc_153A6:
mov _palette_changed, 1
@ -21822,20 +21822,20 @@ loc_15C57:
loc_15C7E:
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_10]
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_15CB0:
@ -24505,19 +24505,19 @@ loc_17202:
mov [bp+var_2], dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
call egc_on
call sub_1714F
@ -24532,30 +24532,30 @@ loc_17255:
call snd_se_play pascal, 16
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BAh], 64h ; 'd'
mov Palettes[bx].r, 64h
jmp short loc_1728A
; ---------------------------------------------------------------------------
loc_1727B:
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BAh], 0
mov Palettes[bx].r, 0
loc_1728A:
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BBh], 0
mov Palettes[bx].g, 0
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
mov bx, ax
mov byte ptr [bx+11BCh], 0
mov Palettes[bx].b, 0
mov _palette_changed, 1
mov al, [bp+var_1]
mov ah, 0
@ -24628,19 +24628,19 @@ loc_17332:
mov [bp+var_2], dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_1737D:
@ -26907,21 +26907,21 @@ loc_1853F:
mov [bp+var_2], al
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_1]
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_185A3:
@ -27174,22 +27174,22 @@ loc_187AF:
mov [bp+var_4], al
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_4]
add dl, dl
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_4]
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
mov word_1FB3C, 0
jmp loc_18964
@ -27203,38 +27203,38 @@ loc_18801:
call snd_se_play pascal, 10
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BAh], 0FFh
mov Palettes[bx].r, 0FFh
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BBh], 80h
mov Palettes[bx].g, 80h
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BCh], 80h
mov Palettes[bx].b, 80h
jmp short loc_18872
; ---------------------------------------------------------------------------
loc_18845:
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BAh], 0
mov Palettes[bx].r, 0
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BBh], 0
mov Palettes[bx].g, 0
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov byte ptr [bx+11BCh], 20h ; ' '
mov Palettes[bx].b, 20h
loc_18872:
mov _palette_changed, 1
@ -27314,22 +27314,22 @@ loc_18911:
mov [bp+var_4], dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
add dl, dl
and dl, 0FFh
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_4]
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_18964:
@ -27555,21 +27555,21 @@ loc_18B77:
mov [bp+var_2], al
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_1]
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_18BB4:
@ -27624,24 +27624,24 @@ loc_18C04:
mov [bp+var_2], al
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
add dl, 40h
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
add dl, 20h ; ' '
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
mov al, [bp+var_1]
mov ah, 0
@ -27774,21 +27774,21 @@ loc_18D5B:
mov [bp+var_2], al
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_1]
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_18DBF:
@ -27991,21 +27991,21 @@ loc_18F89:
mov [bp+var_2], al
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_2]
mov bx, ax
mov [bx+11BAh], dl
mov Palettes[bx].r, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov bx, ax
mov [bx+11BBh], dl
mov Palettes[bx].g, dl
mov al, byte ptr word_1FE88
mov ah, 0
imul ax, 3
imul ax, size rgb_t
mov dl, [bp+var_1]
mov bx, ax
mov [bx+11BCh], dl
mov Palettes[bx].b, dl
mov _palette_changed, 1
loc_18FE2:
@ -36929,18 +36929,7 @@ word_1F2EC dw ?
word_1F2EE dw ?
public _yumeconfig
_yumeconfig dd ?
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
dd ? ;
palette_1F2F4 palette_t <?>
byte_1F324 db ?
db ?
word_1F326 dw ?

View File

@ -1,7 +1,3 @@
; Spawns [n] new explosions at [origin].
; [origin] uses screen pixels, *not* the 1/16th-pixel units of the structure.
; void pascal zunsoft_pyro_new(Point origin, int n, char patnum_base)
_zunsoft_pyro_new proc pascal near
local @@pyros_created:word, @@i:word
arg @@origin:Point, @@n:word, @@patnum_base:byte
@ -60,7 +56,6 @@ loc_B694:
_zunsoft_pyro_new endp
; void pascal zunsoft_update_and_render(void)
_zunsoft_update_and_render proc pascal near
local @@patnum:word, @@draw_y:word, @@draw_x:word, @@anim_sprite:word
@ -192,7 +187,6 @@ loc_B7B9:
_zunsoft_update_and_render endp
; void pascal zunsoft_palette_update_and_show(int tone)
_zunsoft_palette_update_and_show proc near
arg @@tone:word
@ -209,7 +203,7 @@ loc_B7CE:
loc_B7D2:
mov bx, si
imul bx, 3
imul bx, size rgb_t
mov al, _zunsoft_palette[bx+di]
mov ah, 0
imul @@tone
@ -217,12 +211,12 @@ loc_B7D2:
cwd
idiv bx
mov bx, si
imul bx, 3
imul bx, size rgb_t
mov Palettes[bx+di], al
inc di
loc_B7F0:
cmp di, 3
cmp di, size rgb_t
jl short loc_B7D2
inc si

10
th04/zunsoft.h Normal file
View File

@ -0,0 +1,10 @@
// Copy of the palette used during the logo, to allow non-blocking fades in
// contrast to master.lib's blocking palette_black_in() and palette_black_out()
// functions. (Then again, master.lib has the PaletteTone global for that...)
extern rgb_t zunsoft_palette[16];
// Spawns [n] new explosions at the given screen-coordinate [origin] position.
void pascal zunsoft_pyro_new(Point screen_origin, int n, char patnum_base);
void pascal zunsoft_update_and_render(void);
void pascal zunsoft_palette_update_and_show(int tone);

View File

@ -1,6 +1,4 @@
; Copy of the palette used during the logo, to allow non-blocking fades in
; contrast to master.lib's blocking palette_black_in() and palette_black_out()
; functions. (Then again, master.lib has the PaletteTone global for that...)
public _zunsoft_palette
_zunsoft_palette db 48 dup(?)
; ZUN Soft logo explosion structure.

View File

@ -2354,36 +2354,36 @@ var_2 = byte ptr -2
loc_BCA8:
mov bx, si
imul bx, 3
mov al, [bx+1A96h]
imul bx, size rgb_t
mov al, Palettes[bx].r
mov bx, si
imul bx, 3
mov [bx+2B4Ch], al
imul bx, size rgb_t
mov _zunsoft_palette[bx].r, al
mov bx, si
imul bx, 3
mov al, [bx+1A97h]
imul bx, size rgb_t
mov al, Palettes[bx].g
mov bx, si
imul bx, 3
mov [bx+2B4Dh], al
imul bx, size rgb_t
mov _zunsoft_palette[bx].g, al
mov bx, si
imul bx, 3
mov al, [bx+1A98h]
imul bx, size rgb_t
mov al, Palettes[bx].b
mov bx, si
imul bx, 3
mov [bx+2B4Eh], al
imul bx, size rgb_t
mov _zunsoft_palette[bx].b, al
mov bx, si
imul bx, 3
mov byte ptr [bx+1A96h], 0
imul bx, size rgb_t
mov Palettes[bx].r, 0
mov bx, si
imul bx, 3
mov byte ptr [bx+1A97h], 0
imul bx, size rgb_t
mov Palettes[bx].g, 0
mov bx, si
imul bx, 3
mov byte ptr [bx+1A98h], 0
imul bx, size rgb_t
mov Palettes[bx].b, 0
inc si
loc_BCFD:
cmp si, 0Fh
cmp si, 15
jl short loc_BCA8
call snd_load pascal, ds, offset aLogo, SND_LOAD_SONG
kajacall KAJA_SONG_PLAY
@ -3954,7 +3954,7 @@ sub_CCD2 proc near
@@page = byte ptr -4
var_3 = byte ptr -3
var_2 = word ptr -2
@@component = word ptr -2
enter 4, 0
push si
@ -4047,18 +4047,18 @@ loc_CE50:
loc_CE8B:
mov bx, si
imul bx, 3
mov byte ptr [bx+1A96h], 0FFh
imul bx, size rgb_t
mov Palettes[bx].r, 0FFh
mov bx, si
imul bx, 3
mov byte ptr [bx+1A97h], 0FFh
imul bx, size rgb_t
mov Palettes[bx].g, 0FFh
mov bx, si
imul bx, 3
mov byte ptr [bx+1A98h], 0FFh
imul bx, size rgb_t
mov Palettes[bx].b, 0FFh
inc si
loc_CEAA:
cmp si, 10h
cmp si, PALETTE_COLORS
jl short loc_CE8B
call far ptr palette_show
mov PaletteTone, 64h ; 'd'
@ -4070,9 +4070,9 @@ loc_CEAA:
loc_CEC7:
mov al, [bp+var_3]
mov Palettes, al
mov Palettes+1, al
mov Palettes+2, al
mov Palettes[0 * size rgb_t].r, al
mov Palettes[0 * size rgb_t].g, al
mov Palettes[0 * size rgb_t].b, al
call far ptr palette_show
push 1
call frame_delay
@ -4095,36 +4095,36 @@ loc_CEF5:
; ---------------------------------------------------------------------------
loc_CEFA:
mov [bp+var_2], 0
mov [bp+@@component], 0
jmp short loc_CF2D
; ---------------------------------------------------------------------------
loc_CF01:
mov bx, di
imul bx, 3
add bx, [bp+var_2]
imul bx, size rgb_t
add bx, [bp+@@component]
mov al, [bx+23A0h]
mov bx, di
imul bx, 3
add bx, [bp+var_2]
cmp al, [bx+1A96h]
imul bx, size rgb_t
add bx, [bp+@@component]
cmp al, Palettes[bx].r
jnb short loc_CF2A
mov bx, di
imul bx, 3
add bx, [bp+var_2]
imul bx, size rgb_t
add bx, [bp+@@component]
mov al, [bp+var_3]
mov [bx+1A96h], al
mov Palettes[bx].r, al
loc_CF2A:
inc [bp+var_2]
inc [bp+@@component]
loc_CF2D:
cmp [bp+var_2], 3
cmp [bp+@@component], size rgb_t
jl short loc_CF01
inc di
loc_CF34:
cmp di, 10h
cmp di, PALETTE_COLORS
jl short loc_CEFA
call far ptr palette_show
push 1

View File

@ -2295,32 +2295,32 @@ opening_key_pressed = byte ptr -2
;fps hack?
loc_B872:
mov bx, si
imul bx, 3
mov al, [bx+2E1Eh]
imul bx, size rgb_t
mov al, Palettes[bx].r
mov bx, si
imul bx, 3
mov [bx+3F54h], al
imul bx, size rgb_t
mov _zunsoft_palette[bx].r, al
mov bx, si
imul bx, 3
mov al, [bx+2E1Fh]
imul bx, size rgb_t
mov al, Palettes[bx].g
mov bx, si
imul bx, 3
mov [bx+3F55h], al
imul bx, size rgb_t
mov _zunsoft_palette[bx].g, al
mov bx, si
imul bx, 3
mov al, [bx+2E20h]
imul bx, size rgb_t
mov al, Palettes[bx].b
mov bx, si
imul bx, 3
mov [bx+3F56h], al
imul bx, size rgb_t
mov _zunsoft_palette[bx].b, al
mov bx, si
imul bx, 3
mov byte ptr [bx+2E1Eh], 0
imul bx, size rgb_t
mov Palettes[bx].r, 0
mov bx, si
imul bx, 3
mov byte ptr [bx+2E1Fh], 0
imul bx, size rgb_t
mov Palettes[bx].g, 0
mov bx, si
imul bx, 3
mov byte ptr [bx+2E20h], 0
imul bx, size rgb_t
mov Palettes[bx].b, 0
inc si
loc_B8C7: