We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce4bb53 commit e7a0982Copy full SHA for e7a0982
1 file changed
library-asm/bright.asm
@@ -6,22 +6,38 @@
6
BRIGHT:
7
ld de, ATTR_P
8
9
+ PROC
10
+ LOCAL IS_TR
11
+ LOCAL IS_ZERO
12
+
13
__SET_BRIGHT:
14
; Another entry. This will set the bright flag at location pointer by DE
- and 1 ; # Convert to 0/1
15
+ cp 8
16
+ jr z, IS_TR
17
18
+ ; # Convert to 0/1
19
+ or a
20
+ jr z, IS_ZERO
21
+ ld a, 0x40
22
- rrca
23
+IS_ZERO:
24
ld b, a ; Saves the color
25
ld a, (de)
26
and 0BFh ; Clears previous value
27
or b
28
ld (de), a
29
ret
30
31
+IS_TR: ; transparent
32
+ inc de ; Points DE to MASK_T or MASK_P
33
+ ld a, (de)
34
+ or 0x40; Set bit 6 to enable transparency
35
+ ld (de), a
36
+ ret
37
38
39
; Sets the BRIGHT flag passed in A register in the ATTR_T variable
40
BRIGHT_TMP:
41
ld de, ATTR_T
42
jr __SET_BRIGHT
-
43
+ ENDP
0 commit comments