Ticket #1055: processActors.txt

File processActors.txt, 4.1 KB (added by Kirben, 16 years ago)

DOTT disasm.

Line 
1XREF: main+31DP
2 ; o_kernelSetFunctions+76P
3
4var_24= byte ptr -24h
5var_A= word ptr -0Ah
6var_8= word ptr -8
7var_6= word ptr -6
8var_4= word ptr -4
9var_2= word ptr -2
10
11 enter 24h, 0
12
13loc_AF6_1FA:
14 push di
15 push si
16
17loc_AF6_1FC:
18 sub cx, cx
19 mov si, 1
20 lea di, [bp+var_24]
21
22loc_AF6_204: ; CODE XREF: processActors+21j
23 mov al, _currentRoom
24
25loc_AF6_207:
26 cmp actor_room[si], al
27 jnz loc_AF6_213
28 inc di
29 inc di
30 mov [di-2], si
31
32loc_AF6_212:
33 inc cx
34
35loc_AF6_213: ; CODE XREF: processActors+15j
36 inc si
37 cmp si, 13
38
39loc_AF6_217:
40 jb loc_AF6_204
41 or cx, cx
42 jnz loc_AF6_220
43 jmp return
44; ---------------------------------------------------------------------------
45
46loc_AF6_220: ; CODE XREF: processActors+25j
47 mov [bp+var_6], 0
48 or cx, cx
49 jz loc_AF6_277
50 lea ax, [bp+var_24]
51
52loc_AF6_22C:
53 mov [bp+var_4], ax
54 mov [bp+var_A], cx
55
56loc_AF6_232: ; CODE XREF: processActors+7Fj
57 mov [bp+var_2], 0
58 or cx, cx
59 jnz loc_AF6_240
60 mov di, [bp+var_4]
61 jmp short loc_AF6_26D
62; ---------------------------------------------------------------------------
63
64loc_AF6_240: ; CODE XREF: processActors+43j
65 lea bx, [bp+var_24]
66 mov dx, cx
67 mov di, [bp+var_4]
68 mov [bp+var_8], cx
69
70loc_AF6_24B: ; CODE XREF: processActors+72j
71 mov si, [di]
72 shl si, 1
73 mov ax, actor_y[si]
74 mov si, [bx]
75 shl si, 1
76 cmp actor_y[si], ax
77 jle loc_AF6_265
78 mov cx, [di]
79 mov ax, [bx]
80 mov [di], ax
81 mov [bx], cx
82
83loc_AF6_265: ; CODE XREF: processActors+65j
84 inc bx
85 inc bx
86 dec dx
87 jnz loc_AF6_24B
88 mov cx, [bp+var_8]
89
90loc_AF6_26D: ; CODE XREF: processActors+48j
91 inc di
92 inc di
93 mov [bp+var_4], di
94 dec [bp+var_A]
95 jnz loc_AF6_232
96
97loc_AF6_277: ; CODE XREF: processActors+31j
98 mov [bp+var_6], 0
99 or cx, cx
100 jnz loc_AF6_283
101 jmp return
102; ---------------------------------------------------------------------------
103
104loc_AF6_283: ; CODE XREF: processActors+88j
105 lea di, [bp+var_24]
106 mov [bp+var_2], cx
107 mov [bp+var_8], cx
108
109draw_actors: ; CODE XREF: processActors+123j
110 mov si, [di]
111 mov bx, si
112 shl bx, 1
113 cmp actor_costume[bx], 0
114 jz loc_AF6_312
115 mov bx, si
116 shl bx, 1
117 mov ax, actor_x[bx]
118 sub ax, virtScreenData.xtart
119 mov cost_actorX, ax
120 mov ax, actor_y[bx]
121 mov cost_actorY, ax
122 mov al, actor_mask[si]
123 mov cost_zbuf, al
124 sub ah, ah
125 cmp ax, _numZBuffer
126 jbe loc_AF6_2C4
127 mov al, byte ptr _numZBuffer
128 mov cost_zbuf, al
129
130loc_AF6_2C4: ; CODE XREF: processActors+C6j
131 cmp actor_forceClip[si], 0
132 jz loc_AF6_2D2
133 mov al, actor_forceClip[si]
134 mov cost_zbuf, al
135
136loc_AF6_2D2: ; CODE XREF: processActors+D3j
137 push si
138 push cs
139 call near ptr setupActorScale
140 add sp, 2
141 mov al, actor_scaleX[si]
142 sub ah, ah
143 mov cost_scaleX, ax
144 mov al, actor_scaleY[si]
145 mov cost_scaleY, ax
146 mov ax, si
147 shl si, 1
148 mov cx, actorElevation[si]
149 sub cost_actorY, cx
150 push ax
151 mov si, ax
152 push cs
153
154loc_AF6_2FA:
155 call near ptr setActorCostPalette
156 add sp, 2
157 push si
158 call drawActorCostume
159 add sp, 2
160 push si
161 call actorAnimate
162 add sp, 2
163
164loc_AF6_312: ; CODE XREF: processActors+A1j
165 inc di
166 inc di
167 dec [bp+var_2]
168 jz return
169 jmp draw_actors
170; ---------------------------------------------------------------------------
171
172return: ; CODE XREF: processActors+27j
173 ; processActors+8Aj processActors+121j
174 pop si
175 pop di
176 leave
177 retf
178processActors endp
179