mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Merge pull request #1686 from karrika/lynxtext
Mark index 0 as TRANSPARENT. Let palette start from index 1
This commit is contained in:
commit
2d0bc67c41
@ -52,24 +52,25 @@
|
||||
|
||||
|
||||
/* Color defines */
|
||||
#define COLOR_BLACK 0x00
|
||||
#define COLOR_RED 0x01
|
||||
#define COLOR_PINK 0x02
|
||||
#define COLOR_LIGHTGREY 0x03
|
||||
#define COLOR_GREY 0x04
|
||||
#define COLOR_DARKGREY 0x05
|
||||
#define COLOR_BROWN 0x06
|
||||
#define COLOR_PEACH 0x07
|
||||
#define COLOR_YELLOW 0x08
|
||||
#define COLOR_LIGHTGREEN 0x09
|
||||
#define COLOR_GREEN 0x0A
|
||||
#define COLOR_DARKBROWN 0x0B
|
||||
#define COLOR_TRANSPARENT 0x00
|
||||
#define COLOR_BLACK 0x01
|
||||
#define COLOR_RED 0x02
|
||||
#define COLOR_PINK 0x03
|
||||
#define COLOR_LIGHTGREY 0x04
|
||||
#define COLOR_GREY 0x05
|
||||
#define COLOR_DARKGREY 0x06
|
||||
#define COLOR_BROWN 0x07
|
||||
#define COLOR_PEACH 0x08
|
||||
#define COLOR_YELLOW 0x09
|
||||
#define COLOR_LIGHTGREEN 0x0A
|
||||
#define COLOR_GREEN 0x0B
|
||||
#define COLOR_VIOLET 0x0C
|
||||
#define COLOR_BLUE 0x0D
|
||||
#define COLOR_LIGHTBLUE 0x0E
|
||||
#define COLOR_WHITE 0x0F
|
||||
|
||||
/* TGI color defines (default palette) */
|
||||
#define TGI_COLOR_TRANSPARENT COLOR_TRANSPARENT
|
||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||
#define TGI_COLOR_RED COLOR_RED
|
||||
#define TGI_COLOR_PINK COLOR_PINK
|
||||
@ -81,7 +82,6 @@
|
||||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||
#define TGI_COLOR_DARKBROWN COLOR_DARKBROWN
|
||||
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
||||
|
@ -113,7 +113,8 @@ text_bitmap: .res 8*(1+20+1)+1
|
||||
|
||||
.rodata
|
||||
|
||||
DEFPALETTE: .byte >$011
|
||||
DEFPALETTE: .byte >$223
|
||||
.byte >$011
|
||||
.byte >$34d
|
||||
.byte >$9af
|
||||
.byte >$9b8
|
||||
@ -124,11 +125,11 @@ DEFPALETTE: .byte >$011
|
||||
.byte >$d5f
|
||||
.byte >$c53
|
||||
.byte >$822
|
||||
.byte >$223
|
||||
.byte >$484
|
||||
.byte >$8e5
|
||||
.byte >$cf5
|
||||
.byte >$fff
|
||||
.byte <$223
|
||||
.byte <$011
|
||||
.byte <$34d
|
||||
.byte <$9af
|
||||
@ -140,7 +141,6 @@ DEFPALETTE: .byte >$011
|
||||
.byte <$d5f
|
||||
.byte <$c53
|
||||
.byte <$822
|
||||
.byte <$223
|
||||
.byte <$484
|
||||
.byte <$8e5
|
||||
.byte <$cf5
|
||||
@ -162,6 +162,7 @@ INSTALL:
|
||||
lda #1
|
||||
sta TEXTMAGX
|
||||
sta TEXTMAGY
|
||||
sta DRAWINDEX
|
||||
stz BGINDEX
|
||||
stz DRAWPAGE
|
||||
stz SWAPREQUEST
|
||||
@ -418,7 +419,7 @@ cls_sprite:
|
||||
.word 0
|
||||
.word $a000 ; 160
|
||||
.word $6600 ; 102
|
||||
.byte $00
|
||||
.byte $11
|
||||
|
||||
.code
|
||||
CLEAR: lda #<cls_sprite
|
||||
@ -844,11 +845,6 @@ OUTTEXT:
|
||||
lda TEXTMAGY
|
||||
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
|
||||
asl
|
||||
asl
|
||||
@ -956,7 +952,7 @@ OUTTEXT:
|
||||
text_coll:
|
||||
.byte 0
|
||||
text_sprite:
|
||||
.byte $00,$90,$20
|
||||
.byte $04,$90,$20
|
||||
.addr 0, text_bitmap
|
||||
text_x:
|
||||
.word 0
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
.include "tgi-kernel.inc"
|
||||
|
||||
.export tgi_color_black:zp = $00
|
||||
.export tgi_color_black:zp = $01
|
||||
.export tgi_color_white:zp = $0F
|
||||
|
Loading…
x
Reference in New Issue
Block a user