File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
CEdev/lib/src/graphics/graphx Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -2511,16 +2511,20 @@ _TilePtrMapped:
2511
2511
; arg2 : Y Map Offset
2512
2512
; Returns:
2513
2513
; A pointer to the indexed tile in the tilemap (so it can be looked at or changed)
2514
- pop hl ; return vector
2515
- pop iy ; tilemap struct
2516
- pop de ; x offset
2517
- ex ( sp ) , hl ; y offset
2518
- ld h , (iy + 13 ) ; tilemap width
2514
+ push ix
2515
+ ld ix , 0 ; setup frame
2516
+ add ix , sp
2517
+ ld iy , (ix + 6 ) ; tilemap struct pointer
2518
+ ld h , (ix + 12 ) ; y offset
2519
+ ld l , (iy + 13 ) ; height
2519
2520
mlt hl
2520
- ld d , 0
2521
- add .s hl , de
2522
- ld de , (iy + 0 ) ; tilemap data
2521
+ ex de , hl
2522
+ sbc hl , hl
2523
+ ld l , (ix + 9 ) ; x offset
2524
+ ld bc , (iy + 0 ) ; pointer to map
2523
2525
add hl , de
2526
+ add hl , bc
2527
+ pop ix ; end frame
2524
2528
ret
2525
2529
2526
2530
;-------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments