~z88dk-team/z88dk-pkg/trunk

« back to all changes in this revision

Viewing changes to libsrc/sprites/software/sp1/ts2068hr/tiles/sp1_PrintAtInv_callee.asm

  • Committer: Bazaar Package Importer
  • Author(s): Krystian Wlosek, Krystian Wlosek
  • Date: 2008-03-25 11:46:11 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080325114611-u89smn2ccknl8avt
Tags: 1.8.ds1-2
[ Krystian Wlosek ]
* Enable 64bit architecture.
* Added '-m32' switch to CFLAGS and LDFLAGS for 64bit machines.
* Changed Architecture: to `any' in z88dk and z88dk-bin package.
* Added gcc-multilib to Build-Depends: for 64bit
* Fixed problem with x11.lib
  - created symlink from include/x11 to include/X11
  - improved Makefile for x11.lib
    patch debian/patches/03_libsrc_graphics_x11_Makefile.diff
* Fixed library ozansi.lib
  - patch debian/patches/03_libsrc_oz_ozinput_Makefile.diff
* Changed Copyright notice.
* Fixed gcc warnings:
  - in src/appmake dir - debian/patches/04_src_appmake.diff
  - in src/zcc/zcc.c - debian/patches/04_src_zcc_zcc.c.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; void __CALLEE__ sp1_PrintAtInv_callee(uchar row, uchar col, uint tile)
 
2
; 01.2008 aralbrec, Sprite Pack v3.0
 
3
; ts2068 hi-res version
 
4
 
 
5
XLIB sp1_PrintAtInv_callee
 
6
XDEF ASMDISP_SP1_PRINTATINV_CALLEE
 
7
 
 
8
LIB sp1_GetUpdateStruct_callee, sp1_PrintAt_callee
 
9
XREF ASMDISP_SP1_GETUPDATESTRUCT_CALLEE, ASMDISP_SP1_PRINTAT_CALLEE
 
10
XREF SP1V_UPDATELISTT
 
11
 
 
12
.sp1_PrintAtInv_callee
 
13
 
 
14
   pop af
 
15
   pop bc
 
16
   pop de
 
17
   pop hl
 
18
   ld d,l
 
19
   push af
 
20
 
 
21
.asmentry
 
22
 
 
23
; Print tile and colour to given coordinate and invalidate
 
24
; the tile so that it is redrawn in the next update.
 
25
;
 
26
; enter :  d = row coord
 
27
;          e = col coord
 
28
;         bc = tile code
 
29
; uses  : af, bc, de, hl
 
30
 
 
31
.SP1PrintAtInv
 
32
 
 
33
   call sp1_GetUpdateStruct_callee + ASMDISP_SP1_GETUPDATESTRUCT_CALLEE
 
34
 
 
35
   ld a,(hl)
 
36
   xor $80
 
37
   jp p, sp1_PrintAt_callee + ASMDISP_SP1_PRINTAT_CALLEE + 3  ; if already marked for invalidation just do PrintAt
 
38
   ld (hl),a                        ; mark struct_sp1_update as invalidated
 
39
 
 
40
   ld e,l
 
41
   ld d,h                           ; de = & struct sp1_update
 
42
   inc hl
 
43
   ld (hl),c                        ; write tile
 
44
   inc hl
 
45
   ld (hl),b
 
46
   inc hl
 
47
   inc hl
 
48
   inc hl
 
49
   ld (hl),0                        ; mark no struct sp1_update following in invalidated list
 
50
 
 
51
   ld hl,(SP1V_UPDATELISTT)         ; current last sp1_update in invalidated list
 
52
   ld bc,5
 
53
   add hl,bc
 
54
   ld (hl),d                        ; store this new sp1_update into current tail
 
55
   inc hl
 
56
   ld (hl),e
 
57
   ld (SP1V_UPDATELISTT),de         ; this new struct sp1_update is now the tail in invalidated list
 
58
 
 
59
   ret
 
60
 
 
61
DEFC ASMDISP_SP1_PRINTATINV_CALLEE = asmentry - sp1_PrintAtInv_callee