Skip to content

Commit

Permalink
Update CELS.S
Browse files Browse the repository at this point in the history
Allow using colors 253-254 in pictures.
  • Loading branch information
Kawa-oneechan committed Aug 14, 2020
1 parent 49e07bd commit 282a0bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EXT/CELS.S
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ REMAPOFFSETINC equ 0ffh

public kawaHax
kawaHax byte 0
kawaPicHax byte ?

.CODE

Expand Down Expand Up @@ -455,7 +456,7 @@ StandardLine proc near uses si es ds bx
invoke DoColorKawaHax

; check for priority and skip color to determine whether to draw it ( .- kawa added this bit)
.if (al != ss:skip) && (dh >= [di]) && ((al < REMAPCOLORSTART) || (al == 255))
.if (al != ss:skip) && (dh >= [di]) && ((al < ss:kawaPicHax) || (al == 255))
and byte ptr [di], ah
or byte ptr [di], dl

Expand Down Expand Up @@ -706,9 +707,12 @@ DrawCelZ proc


call DrawSetup ; setup the cel rectangle, priorities, etc.

mov kawaPicHax, REMAPCOLORSTART ; reset our hack 0fdh

.if theViewNum == -1 ; if it's a picture
mov skip, 0ffh
mov kawaPicHax, 0ffh ; allow the remap colors in pictures
.endif

mov cx, endX ; check to see if we are drawing the cel at all
Expand Down

0 comments on commit 282a0bb

Please sign in to comment.