Mark index 0 as TRANSPARENT. Let palette start from index 1
This commit is contained in:
parent
f8cdb2ab63
commit
4e406b744c
2 changed files with 19 additions and 23 deletions
|
@ -52,24 +52,25 @@
|
||||||
|
|
||||||
|
|
||||||
/* Color defines */
|
/* Color defines */
|
||||||
#define COLOR_BLACK 0x00
|
#define COLOR_TRANSPARENT 0x00
|
||||||
#define COLOR_RED 0x01
|
#define COLOR_BLACK 0x01
|
||||||
#define COLOR_PINK 0x02
|
#define COLOR_RED 0x02
|
||||||
#define COLOR_LIGHTGREY 0x03
|
#define COLOR_PINK 0x03
|
||||||
#define COLOR_GREY 0x04
|
#define COLOR_LIGHTGREY 0x04
|
||||||
#define COLOR_DARKGREY 0x05
|
#define COLOR_GREY 0x05
|
||||||
#define COLOR_BROWN 0x06
|
#define COLOR_DARKGREY 0x06
|
||||||
#define COLOR_PEACH 0x07
|
#define COLOR_BROWN 0x07
|
||||||
#define COLOR_YELLOW 0x08
|
#define COLOR_PEACH 0x08
|
||||||
#define COLOR_LIGHTGREEN 0x09
|
#define COLOR_YELLOW 0x09
|
||||||
#define COLOR_GREEN 0x0A
|
#define COLOR_LIGHTGREEN 0x0A
|
||||||
#define COLOR_DARKBROWN 0x0B
|
#define COLOR_GREEN 0x0B
|
||||||
#define COLOR_VIOLET 0x0C
|
#define COLOR_VIOLET 0x0C
|
||||||
#define COLOR_BLUE 0x0D
|
#define COLOR_BLUE 0x0D
|
||||||
#define COLOR_LIGHTBLUE 0x0E
|
#define COLOR_LIGHTBLUE 0x0E
|
||||||
#define COLOR_WHITE 0x0F
|
#define COLOR_WHITE 0x0F
|
||||||
|
|
||||||
/* TGI color defines (default palette) */
|
/* TGI color defines (default palette) */
|
||||||
|
#define TGI_COLOR_TRANSPARENT COLOR_TRANSPARENT
|
||||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||||
#define TGI_COLOR_RED COLOR_RED
|
#define TGI_COLOR_RED COLOR_RED
|
||||||
#define TGI_COLOR_PINK COLOR_PINK
|
#define TGI_COLOR_PINK COLOR_PINK
|
||||||
|
@ -81,7 +82,6 @@
|
||||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||||
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
||||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||||
#define TGI_COLOR_DARKBROWN COLOR_DARKBROWN
|
|
||||||
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
||||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||||
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
||||||
|
|
|
@ -113,7 +113,8 @@ text_bitmap: .res 8*(1+20+1)+1
|
||||||
|
|
||||||
.rodata
|
.rodata
|
||||||
|
|
||||||
DEFPALETTE: .byte >$011
|
DEFPALETTE: .byte >$223
|
||||||
|
.byte >$011
|
||||||
.byte >$34d
|
.byte >$34d
|
||||||
.byte >$9af
|
.byte >$9af
|
||||||
.byte >$9b8
|
.byte >$9b8
|
||||||
|
@ -124,11 +125,11 @@ DEFPALETTE: .byte >$011
|
||||||
.byte >$d5f
|
.byte >$d5f
|
||||||
.byte >$c53
|
.byte >$c53
|
||||||
.byte >$822
|
.byte >$822
|
||||||
.byte >$223
|
|
||||||
.byte >$484
|
.byte >$484
|
||||||
.byte >$8e5
|
.byte >$8e5
|
||||||
.byte >$cf5
|
.byte >$cf5
|
||||||
.byte >$fff
|
.byte >$fff
|
||||||
|
.byte <$223
|
||||||
.byte <$011
|
.byte <$011
|
||||||
.byte <$34d
|
.byte <$34d
|
||||||
.byte <$9af
|
.byte <$9af
|
||||||
|
@ -140,7 +141,6 @@ DEFPALETTE: .byte >$011
|
||||||
.byte <$d5f
|
.byte <$d5f
|
||||||
.byte <$c53
|
.byte <$c53
|
||||||
.byte <$822
|
.byte <$822
|
||||||
.byte <$223
|
|
||||||
.byte <$484
|
.byte <$484
|
||||||
.byte <$8e5
|
.byte <$8e5
|
||||||
.byte <$cf5
|
.byte <$cf5
|
||||||
|
@ -162,6 +162,7 @@ INSTALL:
|
||||||
lda #1
|
lda #1
|
||||||
sta TEXTMAGX
|
sta TEXTMAGX
|
||||||
sta TEXTMAGY
|
sta TEXTMAGY
|
||||||
|
sta DRAWINDEX
|
||||||
stz BGINDEX
|
stz BGINDEX
|
||||||
stz DRAWPAGE
|
stz DRAWPAGE
|
||||||
stz SWAPREQUEST
|
stz SWAPREQUEST
|
||||||
|
@ -418,7 +419,7 @@ cls_sprite:
|
||||||
.word 0
|
.word 0
|
||||||
.word $a000 ; 160
|
.word $a000 ; 160
|
||||||
.word $6600 ; 102
|
.word $6600 ; 102
|
||||||
.byte $00
|
.byte $11
|
||||||
|
|
||||||
.code
|
.code
|
||||||
CLEAR: lda #<cls_sprite
|
CLEAR: lda #<cls_sprite
|
||||||
|
@ -844,11 +845,6 @@ OUTTEXT:
|
||||||
lda TEXTMAGY
|
lda TEXTMAGY
|
||||||
sta text_sy+1
|
sta text_sy+1
|
||||||
|
|
||||||
lda BGINDEX
|
|
||||||
beq @L1 ; Choose opaque black sprite?
|
|
||||||
lda #$04 ; No, choose normal sprite
|
|
||||||
@L1:
|
|
||||||
sta text_sprite
|
|
||||||
lda DRAWINDEX ; Set color
|
lda DRAWINDEX ; Set color
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
|
@ -956,7 +952,7 @@ OUTTEXT:
|
||||||
text_coll:
|
text_coll:
|
||||||
.byte 0
|
.byte 0
|
||||||
text_sprite:
|
text_sprite:
|
||||||
.byte $00,$90,$20
|
.byte $04,$90,$20
|
||||||
.addr 0, text_bitmap
|
.addr 0, text_bitmap
|
||||||
text_x:
|
text_x:
|
||||||
.word 0
|
.word 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue