@@ -141,12 +141,12 @@ _SetClipRegion:
141
141
; None
142
142
call _SetFullScrnClip_ASM \.r ; clip against the actual LCD screen
143
143
ld iy , 0
144
+ lea bc , iy + 12
144
145
add iy , sp
145
146
call _ClipRectRegion_ASM \.r ; iy points to the start of the arguments
146
- lea hl , iy
147
147
ret c
148
+ lea hl , iy
148
149
ld de , _xmin \.r ; copy the variables in
149
- ld bc , 12
150
150
ldir ; copy in the new structure
151
151
ret
152
152
@@ -238,14 +238,22 @@ _FillScreen:
238
238
ld hl , 3
239
239
add hl , sp
240
240
ld a , (hl) ; get the color index to use
241
- ld bc , lcdSize - 1
242
241
ld de , (currDrawBuffer) ; de -> current buffer
242
+ or a , a
243
+ jr z , _FastFillScreen
243
244
sbc hl , hl
244
245
add hl , de
245
246
inc de
246
247
ld (hl) , a ; store the new color
248
+ ld bc , lcdSize - 1
247
249
ldir ; fill the screen with color
248
250
ret
251
+ _FastFillScreen:
252
+ ld hl , $ e40000
253
+ ld bc , lcdSize
254
+ ldir
255
+ ret
256
+
249
257
250
258
;-------------------------------------------------------------------------------
251
259
_SetPalette:
@@ -973,11 +981,11 @@ _FillCircle_NoClip:
973
981
; Returns:
974
982
; None
975
983
ld iy , 0
984
+ lea bc , iy + 0
976
985
add iy , sp
977
986
ld a , (iy + 9 ) ; radius
978
987
or a , a
979
988
ret z
980
- ld bc , 0
981
989
ld c , a
982
990
ld hl , (currDrawBuffer)
983
991
ld d , lcdWidth/ 2
@@ -1983,13 +1991,13 @@ _ClipDraw_ASM:
1983
1991
; DE : New X coordinate
1984
1992
; NC : If offscreen
1985
1993
ld ix , 6 ; get pointer to arguments
1994
+ ld iy , ix - 6
1986
1995
add ix , sp
1987
1996
ld hl , (ix + 3 )
1988
1997
ld a , (hl)
1989
1998
ld de , tmpWidth \.r
1990
1999
ld (de) , a ; save tmpWidth
1991
2000
ld (tmpSpriteWidth) , a \.r ; save tmpSpriteWidth
1992
- ld iy , 0
1993
2001
add iy , de
1994
2002
inc hl
1995
2003
ld a , (hl)
@@ -2171,9 +2179,9 @@ _: srl h
2171
2179
sbc hl , hl
2172
2180
ld l , (iy + 14 )
2173
2181
ld bc , (ix + 12 )
2182
+ ld (ix +- 3 ) , h
2174
2183
sbc hl , bc
2175
2184
ld (ix +- 12 ) , hl
2176
- ld (ix +- 3 ) , 0
2177
2185
jp _Y_Loop_ASM \.r
2178
2186
2179
2187
_X_Res_SMC =$ + 3
@@ -2630,10 +2638,9 @@ _PrintUInt_ASM:
2630
2638
ld a , 8
2631
2639
sub a , c
2632
2640
ret c ; make sure less than 8
2633
- ld c , a
2634
- ld b , 8
2635
- mlt bc
2636
- ld a , c
2641
+ rla
2642
+ rla
2643
+ rla
2637
2644
ld (Offset_SMC) , a \.r ; select the jump we need
2638
2645
Offset_SMC =$ + 1
2639
2646
jr $
@@ -3195,11 +3202,10 @@ _LZDecompress:
3195
3202
; None
3196
3203
push ix
3197
3204
ld ix , 0
3198
- lea bc , ix
3205
+ lea bc , ix + 1
3199
3206
add ix , sp
3200
3207
lea hl , ix +- 20
3201
3208
ld sp , hl
3202
- inc bc
3203
3209
ld hl , (ix + 12 )
3204
3210
or a , a
3205
3211
sbc hl , bc
0 commit comments