Subversion Repositories Kolibri OS

Rev

Rev 485 | Rev 2677 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 485 Rev 552
1
;
1
;
2
;   Phenix Dynamic Game Created by Pavlushin Evgeni for ASCL
2
;   Phenix Dynamic Game Created by Pavlushin Evgeni for ASCL
3
;
3
;
4
;   100% Full relase!
4
;   100% Full relase!
5
;
5
;
6
;   www.waptap@mail.ru
6
;   www.waptap@mail.ru
7
;
7
;
8
 
8
 
9
 
9
 
10
;******************************************************************************
10
;******************************************************************************
11
    use32
11
    use32
12
    org    0x0
12
    org    0x0
13
    db     'MENUET01'              ; 8 byte id
13
    db     'MENUET01'              ; 8 byte id
14
    dd     0x01                    ; header version
14
    dd     0x01                    ; header version
15
    dd     START                   ; start of code
15
    dd     START                   ; start of code
16
    dd     IM_END                  ; size of image
16
    dd     IM_END                  ; size of image
17
    dd     I_END                   ; memory for app
17
    dd     I_END                   ; memory for app
18
    dd     I_END                   ; esp
18
    dd     I_END                   ; esp
19
    dd     0x0 , 0x0               ; I_Param , I_Icon
19
    dd     0x0 , 0x0               ; I_Param , I_Icon
20
 
20
 
21
;******************************************************************************
21
;******************************************************************************
22
 
22
 
23
 
23
 
24
include 'lang.inc'
24
include 'lang.inc'
25
include '..\..\..\macros.inc'
25
include '..\..\..\macros.inc'
26
include 'ascl.inc'
26
include 'ascl.inc'
27
include 'ascgl.inc'
27
include 'ascgl.inc'
28
include 'ascml.inc'
28
include 'ascml.inc'
29
 
29
 
30
 
30
 
31
showmas:
31
showmas:
32
    cmp [edi+8],dword 0
32
    cmp [edi+8],dword 0
33
    je  noshow
33
    je  noshow
34
    cmp [edi+8],dword 1
34
    cmp [edi+8],dword 1
35
    jne no_gun
35
    jne no_gun
36
    mov eax,shoot
36
    mov eax,shoot
37
    jmp outp
37
    jmp outp
38
no_gun:
38
no_gun:
39
    push edi
39
    push edi
40
    random 3,ebx
40
    random 3,ebx
41
    pop edi
41
    pop edi
42
    cmp ebx,0
42
    cmp ebx,0
43
    jne no_star
43
    jne no_star
44
    mov eax,star
44
    mov eax,star
45
    jmp outp
45
    jmp outp
46
no_star:
46
no_star:
47
    cmp ebx,1
47
    cmp ebx,1
48
    jne no_star2
48
    jne no_star2
49
    mov eax,star2
49
    mov eax,star2
50
    jmp outp
50
    jmp outp
51
no_star2:
51
no_star2:
52
    mov eax,star3
52
    mov eax,star3
53
outp:
53
outp:
54
    aimgtoimg eax,dword [edi],dword [edi+4],canvas,0x0
54
    aimgtoimg eax,dword [edi],dword [edi+4],canvas,0x0
55
noshow:
55
noshow:
56
    ret
56
    ret
57
 
57
 
58
showobjmas:
58
showobjmas:
59
    cmp [edi+8],dword 0
59
    cmp [edi+8],dword 0
60
    je  noshow1
60
    je  noshow1
61
    cmp [edi+4],dword 380
61
    cmp [edi+4],dword 380
62
    jg  noshow1
62
    jg  noshow1
63
    cmp [edi+4],dword 0
63
    cmp [edi+4],dword 0
64
    jl  noshow1
64
    jl  noshow1
65
    cmp [edi+8],dword 1
65
    cmp [edi+8],dword 1
66
    jne no_warship1
66
    jne no_warship1
67
    mov eax,warship1
67
    mov eax,warship1
68
    jmp outws
68
    jmp outws
69
no_warship1:
69
no_warship1:
70
    cmp [edi+8],dword 2
70
    cmp [edi+8],dword 2
71
    jne no_warship2
71
    jne no_warship2
72
    mov eax,warship2
72
    mov eax,warship2
73
    jmp outws
73
    jmp outws
74
no_warship2:
74
no_warship2:
75
    cmp [edi+8],dword 3
75
    cmp [edi+8],dword 3
76
    jne no_meteor
76
    jne no_meteor
77
    mov eax,meteor
77
    mov eax,meteor
78
    jmp outws
78
    jmp outws
79
no_meteor:
79
no_meteor:
80
    cmp [edi+8],dword 4
80
    cmp [edi+8],dword 4
81
    jne no_box
81
    jne no_box
82
    mov eax,box
82
    mov eax,box
83
    jmp outws
83
    jmp outws
84
no_box:
84
no_box:
85
outws:
85
outws:
86
    aimgtoimg eax,dword [edi],dword [edi+4],canvas,0x0
86
    aimgtoimg eax,dword [edi],dword [edi+4],canvas,0x0
87
noshow1:
87
noshow1:
88
    ret
88
    ret
89
 
89
 
90
 
90
 
91
moveobjmas:
91
moveobjmas:
92
    cmp [edi+8],dword 0
92
    cmp [edi+8],dword 0
93
    je  no_ws
93
    je  no_ws
94
    mov eax,[edi+12]
94
    mov eax,[edi+12]
95
    add [edi],eax
95
    add [edi],eax
96
    mov eax,[edi+16]
96
    mov eax,[edi+16]
97
    add [edi+4],eax
97
    add [edi+4],eax
98
 
98
 
99
    cmp dword [edi],600
99
    cmp dword [edi],600
100
    jng xok1
100
    jng xok1
101
    sub dword [edi],20
101
    sub dword [edi],20
102
    neg dword [edi+12]
102
    neg dword [edi+12]
103
    jmp xok2
103
    jmp xok2
104
xok1:
104
xok1:
105
    cmp dword [edi],0
105
    cmp dword [edi],0
106
    jnl xok2
106
    jnl xok2
107
    add dword [edi],20
107
    add dword [edi],20
108
    neg dword [edi+12]
108
    neg dword [edi+12]
109
xok2:
109
xok2:
110
    cmp dword [edi+4],400
110
    cmp dword [edi+4],400
111
    jng yok
111
    jng yok
112
    mov dword [edi+8],0
112
    mov dword [edi+8],0
113
    ret
113
    ret
114
yok:
114
yok:
115
    cmp dword [edi+8],2  ;green ship
115
    cmp dword [edi+8],2  ;green ship
116
    jne no_grs
116
    jne no_grs
117
    cmp dword [edi+4],100
117
    cmp dword [edi+4],100
118
    jna no_grs
118
    jna no_grs
119
    cmp dword [edi+4],103
119
    cmp dword [edi+4],103
120
    jna grs
120
    jna grs
121
    cmp dword [edi+4],200
121
    cmp dword [edi+4],200
122
    jna no_grs
122
    jna no_grs
123
    cmp dword [edi+4],203
123
    cmp dword [edi+4],203
124
    jna  grs
124
    jna  grs
125
    cmp dword [edi+4],300
125
    cmp dword [edi+4],300
126
    jna no_grs
126
    jna no_grs
127
    cmp dword [edi+4],303
127
    cmp dword [edi+4],303
128
    ja  no_grs
128
    ja  no_grs
129
grs:
129
grs:
130
    neg dword [edi+12]
130
    neg dword [edi+12]
131
    mov [temp],edi
131
    mov [temp],edi
132
    findmas massive,findzero
132
    findmas massive,findzero
133
;in edi off to free element
133
;in edi off to free element
134
    jc  close_app
134
    jc  close_app
135
    mov esi,edi
135
    mov esi,edi
136
    mov edi,[temp]
136
    mov edi,[temp]
137
    mov eax,[edi]
137
    mov eax,[edi]
138
    mov [esi],eax
138
    mov [esi],eax
139
    mov eax,[edi+4]
139
    mov eax,[edi+4]
140
    mov [esi+4],eax
140
    mov [esi+4],eax
141
    mov [esi+8],dword 1
141
    mov [esi+8],dword 1
142
    mov [esi+12],dword 0
142
    mov [esi+12],dword 0
143
    mov [esi+16],dword 10
143
    mov [esi+16],dword 10
144
no_grs:
144
no_grs:
145
 
145
 
146
    cmp dword [edi+8],1  ;blue ship
146
    cmp dword [edi+8],1  ;blue ship
147
    jne no_bls
147
    jne no_bls
148
    cmp dword [edi+4],50
148
    cmp dword [edi+4],50
149
    jna no_bls
149
    jna no_bls
150
    cmp dword [edi+4],64
150
    cmp dword [edi+4],64
151
    jna bls
151
    jna bls
152
    cmp dword [edi+4],100
152
    cmp dword [edi+4],100
153
    jna no_bls
153
    jna no_bls
154
    cmp dword [edi+4],114
154
    cmp dword [edi+4],114
155
    jna bls
155
    jna bls
156
    cmp dword [edi+4],150
156
    cmp dword [edi+4],150
157
    jna no_bls
157
    jna no_bls
158
    cmp dword [edi+4],164
158
    cmp dword [edi+4],164
159
    ja  no_bls
159
    ja  no_bls
160
bls:
160
bls:
161
    mov [temp],edi
161
    mov [temp],edi
162
    findmas massive,findzero
162
    findmas massive,findzero
163
    jc  close_app
163
    jc  close_app
164
    mov esi,edi
164
    mov esi,edi
165
    mov edi,[temp]
165
    mov edi,[temp]
166
    mov eax,[edi]
166
    mov eax,[edi]
167
    mov [esi],eax
167
    mov [esi],eax
168
    mov eax,[edi+4]
168
    mov eax,[edi+4]
169
    mov [esi+4],eax
169
    mov [esi+4],eax
170
    mov [esi+8],dword 2
170
    mov [esi+8],dword 2
171
    mov [esi+12],dword 0
171
    mov [esi+12],dword 0
172
    mov [esi+16],dword 5
172
    mov [esi+16],dword 5
173
no_bls:
173
no_bls:
174
 
174
 
175
no_ws:
175
no_ws:
176
    ret
176
    ret
177
 
177
 
178
 
178
 
179
delfarshoot:
179
delfarshoot:
180
    cmp [edi+4],dword 40
180
    cmp [edi+4],dword 40
181
    jb  del
181
    jb  del
182
    cmp [edi+4],dword 400
182
    cmp [edi+4],dword 400
183
    ja  del
183
    ja  del
184
    cmp [edi],dword 40
184
    cmp [edi],dword 40
185
    jb  del
185
    jb  del
186
    cmp [edi],dword 600
186
    cmp [edi],dword 600
187
    ja  del
187
    ja  del
188
    jmp nodel
188
    jmp nodel
189
del:
189
del:
190
    mov [edi+8],dword 0
190
    mov [edi+8],dword 0
191
nodel:
191
nodel:
192
    ret
192
    ret
193
 
193
 
194
 
194
 
195
movemas:
195
movemas:
196
    cmp [edi+8],dword 0
196
    cmp [edi+8],dword 0
197
    jne no_freeel
197
    jne no_freeel
198
    ret
198
    ret
199
no_freeel:
199
no_freeel:
200
    mov eax,[edi+12]
200
    mov eax,[edi+12]
201
    add [edi],eax
201
    add [edi],eax
202
    mov eax,[edi+16]
202
    mov eax,[edi+16]
203
    add [edi+4],eax
203
    add [edi+4],eax
204
    ret
204
    ret
205
 
205
 
206
 
206
 
207
 
207
 
208
endshowmas:
208
endshowmas:
209
    cmp [edi+8],dword 0
209
    cmp [edi+8],dword 0
210
    je  noshowem
210
    je  noshowem
211
    mov eax,star2
211
    mov eax,star2
212
    aimgtoimg eax,dword [edi],dword [edi+4],canvas,0x0
212
    aimgtoimg eax,dword [edi],dword [edi+4],canvas,0x0
213
noshowem:
213
noshowem:
214
    ret
214
    ret
215
 
215
 
216
 
216
 
217
 
217
 
218
endmovemas:
218
endmovemas:
219
    cmp [edi+8],dword 0
219
    cmp [edi+8],dword 0
220
    jne no_fr
220
    jne no_fr
221
    ret
221
    ret
222
no_fr:
222
no_fr:
223
    mov eax,[edi+12]
223
    mov eax,[edi+12]
224
    add [edi],eax
224
    add [edi],eax
225
    mov eax,[edi+16]
225
    mov eax,[edi+16]
226
    add [edi+4],eax
226
    add [edi+4],eax
227
    ret
227
    ret
228
 
228
 
229
 
229
 
230
findzero:
230
findzero:
231
    cmp [edi+8],dword 0
231
    cmp [edi+8],dword 0
232
    je  iz_zero
232
    je  iz_zero
233
    xor eax,eax
233
    xor eax,eax
234
    ret
234
    ret
235
iz_zero:
235
iz_zero:
236
    mov eax,1
236
    mov eax,1
237
    ret
237
    ret
238
 
238
 
239
compobr:
239
compobr:
240
    cmp [esi+8],dword 0
240
    cmp [esi+8],dword 0
241
    je  no_crsh
241
    je  no_crsh
242
    cmp [edi+8],dword 0
242
    cmp [edi+8],dword 0
243
    je  no_crsh
243
    je  no_crsh
244
    cmp [esi+16],dword 0
244
    cmp [esi+16],dword 0
245
    jg  no_crsh
245
    jg  no_crsh
246
 
246
 
247
    mov eax,[esi]
247
    mov eax,[esi]
248
    mov [temp],eax
248
    mov [temp],eax
249
    mov eax,[esi+4]
249
    mov eax,[esi+4]
250
    mov [temp2],eax
250
    mov [temp2],eax
251
    mov eax,[edi]
251
    mov eax,[edi]
252
    mov [temp3],eax
252
    mov [temp3],eax
253
    mov eax,[edi+4]
253
    mov eax,[edi+4]
254
    mov [temp4],eax
254
    mov [temp4],eax
255
 
255
 
256
    pushad
256
    pushad
257
    collimg imgsize,[temp],[temp2],imgsize,[temp3],[temp4],[otv]
257
    collimg imgsize,[temp],[temp2],imgsize,[temp3],[temp4],[otv]
258
    popad
258
    popad
259
    cmp [otv],dword 0
259
    cmp [otv],dword 0
260
    je  no_crsh
260
    je  no_crsh
261
 
261
 
262
    cmp [edi+8],dword 2
262
    cmp [edi+8],dword 2
263
    jne no_grship
263
    jne no_grship
264
    inc [gship]
264
    inc [gship]
265
    add [score],30
265
    add [score],30
266
    jmp setzero
266
    jmp setzero
267
no_grship:
267
no_grship:
268
    cmp [edi+8],dword 1
268
    cmp [edi+8],dword 1
269
    jne no_blship
269
    jne no_blship
270
    inc [bship]
270
    inc [bship]
271
    add [score],20
271
    add [score],20
272
    jmp setzero
272
    jmp setzero
273
no_blship:
273
no_blship:
274
    cmp [edi+8],dword 3
274
    cmp [edi+8],dword 3
275
    jne no_metr
275
    jne no_metr
276
    dec dword [edi+16]
276
    dec dword [edi+16]
277
    cmp dword [edi+16],0
277
    cmp dword [edi+16],0
278
    jne mok
278
    jne mok
279
    mov dword [edi+16],1
279
    mov dword [edi+16],1
280
mok:
280
mok:
281
    mov [esi+8],dword 0
281
    mov [esi+8],dword 0
282
    ret
282
    ret
283
no_metr:
283
no_metr:
284
 
284
 
285
setzero:
285
setzero:
286
    mov [esi+8],dword 0
286
    mov [esi+8],dword 0
287
    mov [edi+8],dword 0
287
    mov [edi+8],dword 0
288
no_crsh:
288
no_crsh:
289
    ret
289
    ret
290
 
290
 
291
shipobjtest:
291
shipobjtest:
292
    cmp [edi+8],dword 0
292
    cmp [edi+8],dword 0
293
    je  no_obj
293
    je  no_obj
294
    mov eax,[edi]
294
    mov eax,[edi]
295
    mov [temp3],eax
295
    mov [temp3],eax
296
    mov eax,[edi+4]
296
    mov eax,[edi+4]
297
    mov [temp4],eax
297
    mov [temp4],eax
298
    pushad
298
    pushad
299
    collimg imgsize,[shipx],[shipy],imgsize,[temp3],[temp4],[otv]
299
    collimg imgsize,[shipx],[shipy],imgsize,[temp3],[temp4],[otv]
300
    popad
300
    popad
301
    cmp [otv],dword 0
301
    cmp [otv],dword 0
302
    je  no_obj
302
    je  no_obj
303
    cmp [edi+8],dword 4  ;if box
303
    cmp [edi+8],dword 4  ;if box
304
    jne no_fbox
304
    jne no_fbox
305
    add [energy],5
305
    add [energy],5
306
    add [score],50
306
    add [score],50
307
    mov [edi+8],dword 0
307
    mov [edi+8],dword 0
308
    inc [boxget]
308
    inc [boxget]
309
    ret
309
    ret
310
no_fbox:
310
no_fbox:
311
    sub [energy],16
311
    sub [energy],16
312
    mov [edi+8],dword 0
312
    mov [edi+8],dword 0
313
no_obj:
313
no_obj:
314
    ret
314
    ret
315
 
315
 
316
shipguntest:
316
shipguntest:
317
    cmp [edi+8],dword 0
317
    cmp [edi+8],dword 0
318
    je  no_gobj
318
    je  no_gobj
319
    cmp [edi+16],dword 0
319
    cmp [edi+16],dword 0
320
    jl  no_gobj
320
    jl  no_gobj
321
    mov eax,[edi]
321
    mov eax,[edi]
322
    mov [temp3],eax
322
    mov [temp3],eax
323
    mov eax,[edi+4]
323
    mov eax,[edi+4]
324
    mov [temp4],eax
324
    mov [temp4],eax
325
    pushad
325
    pushad
326
    collimg imgsize,[shipx],[shipy],imgsize,[temp3],[temp4],[otv]
326
    collimg imgsize,[shipx],[shipy],imgsize,[temp3],[temp4],[otv]
327
    popad
327
    popad
328
    cmp [otv],dword 0
328
    cmp [otv],dword 0
329
    je  no_gobj
329
    je  no_gobj
330
    sub [energy],4
330
    sub [energy],4
331
    mov [edi+8],dword 0
331
    mov [edi+8],dword 0
332
no_gobj:
332
no_gobj:
333
    ret
333
    ret
334
 
334
 
335
 
335
 
336
START:                          ; start of execution
336
START:                          ; start of execution
337
 
337
 
338
massize = 400
338
massize = 400
339
elemsize = 20
339
elemsize = 20
340
 
340
 
341
    mov [massive],dword massize
341
    mov [massive],dword massize
342
    mov [massive+4],dword elemsize
342
    mov [massive+4],dword elemsize
343
 
343
 
344
omassize = 100
344
omassize = 100
345
oelemsize = 20
345
oelemsize = 20
346
 
346
 
347
    mov [objmas],dword omassize
347
    mov [objmas],dword omassize
348
    mov [objmas+4],dword oelemsize
348
    mov [objmas+4],dword oelemsize
349
 
349
 
350
 
350
 
351
    mov eax,66
351
    mov eax,66
352
    mov ebx,1
352
    mov ebx,1
353
    mov ecx,1
353
    mov ecx,1
354
    mcall
354
    mcall
355
 
355
 
356
    mov eax,26
356
    mov eax,26
357
    mov ebx,2
357
    mov ebx,2
358
    mov ecx,1
358
    mov ecx,1
359
    mov edx,keymap
359
    mov edx,keymap
360
    mcall
360
    mcall
361
 
361
 
362
startgame:
362
startgame:
363
    gif_hash_offset = gif_hash_area
-
 
364
    giftoimg gif_file_area2,canvas
363
    giftoimg gif_file_area2,canvas
365
 
-
 
366
    gif_hash_offset = gif_hash_area
-
 
367
    giftoimg gif_file_area,img_area
364
    giftoimg gif_file_area,img_area
368
 
365
 
369
    getimg img_area,0,0,32,32,ship
366
    getimg img_area,0,0,32,32,ship
370
    getimg img_area,32,0,32,32,shoot
367
    getimg img_area,32,0,32,32,shoot
371
    getimg img_area,64,0,32,32,warship1
368
    getimg img_area,64,0,32,32,warship1
372
    getimg img_area,96,0,32,32,warship2
369
    getimg img_area,96,0,32,32,warship2
373
    getimg img_area,128,0,32,32,meteor
370
    getimg img_area,128,0,32,32,meteor
374
    getimg img_area,160,0,32,32,star
371
    getimg img_area,160,0,32,32,star
375
    getimg img_area,192,0,32,32,star2
372
    getimg img_area,192,0,32,32,star2
376
    getimg img_area,224,0,32,32,star3
373
    getimg img_area,224,0,32,32,star3
377
    getimg img_area,0,32,32,32,box
374
    getimg img_area,0,32,32,32,box
378
 
375
 
379
 
376
 
380
 
377
 
381
main_menu:
378
main_menu:
382
    call draw_logowindow
379
    call draw_logowindow
383
 
380
 
384
stillm:
381
stillm:
385
    wtevent redm,keym,buttonm
382
    wtevent redm,keym,buttonm
386
    jmp stillm
383
    jmp stillm
387
redm:
384
redm:
388
    call draw_logowindow
385
    call draw_logowindow
389
    jmp stillm
386
    jmp stillm
390
keym:
387
keym:
391
    mov  eax,2
388
    mov  eax,2
392
    mcall
389
    mcall
393
    jmp  stillm
390
    jmp  stillm
394
buttonm:
391
buttonm:
395
    mov  eax,17                 ; get id
392
    mov  eax,17                 ; get id
396
    mcall
393
    mcall
397
    cmp  ah,1                   ; button id=1 ?
394
    cmp  ah,1                   ; button id=1 ?
398
    je   close_app
395
    je   close_app
399
    cmp  ah,2                   ; button id=1 ?
396
    cmp  ah,2                   ; button id=1 ?
400
    je   start_game
397
    je   start_game
401
    cmp  ah,3                   ; button id=1 ?
398
    cmp  ah,3                   ; button id=1 ?
402
    je   help
399
    je   help
403
    cmp  ah,4                   ; button id=1 ?
400
    cmp  ah,4                   ; button id=1 ?
404
    je   close_app
401
    je   close_app
405
    jmp  stillm
402
    jmp  stillm
406
 
403
 
407
draw_logowindow:
404
draw_logowindow:
408
    call draw_window
405
    call draw_window
409
    setimg 5,21,canvas
406
    setimg 5,21,canvas
410
    drawlbut 300,300,60,14,'START',2,0x990000,cl_Black
407
    drawlbut 300,300,60,14,'START',2,0x990000,cl_Black
411
    drawlbut 300,320,60,14,'HELP',3,0x990000,cl_Black
408
    drawlbut 300,320,60,14,'HELP',3,0x990000,cl_Black
412
    drawlbut 300,340,60,14,'EXIT',4,0x990000,cl_Black
409
    drawlbut 300,340,60,14,'EXIT',4,0x990000,cl_Black
413
    ret
410
    ret
414
 
411
 
415
;***********************
412
;***********************
416
; Draw help menu
413
; Draw help menu
417
;***********************
414
;***********************
418
 
415
 
419
help:
416
help:
420
    call draw_helpwindow
417
    call draw_helpwindow
421
 
418
 
422
stillh:
419
stillh:
423
    wtevent redh,keyh,buttonh
420
    wtevent redh,keyh,buttonh
424
    jmp stillh
421
    jmp stillh
425
redh:
422
redh:
426
    call draw_helpwindow
423
    call draw_helpwindow
427
    jmp stillh
424
    jmp stillh
428
keyh:
425
keyh:
429
    mov  eax,2
426
    mov  eax,2
430
    mcall
427
    mcall
431
    jmp  stillh
428
    jmp  stillh
432
buttonh:
429
buttonh:
433
    mov  eax,17                 ; get id
430
    mov  eax,17                 ; get id
434
    mcall
431
    mcall
435
    cmp  ah,1                   ; button id=1 ?
432
    cmp  ah,1                   ; button id=1 ?
436
    je   close_app
433
    je   close_app
437
    cmp  ah,2                   ; button id=1 ?
434
    cmp  ah,2                   ; button id=1 ?
438
    je   start_game
435
    je   start_game
439
    cmp  ah,3                   ; button id=1 ?
436
    cmp  ah,3                   ; button id=1 ?
440
    je   help
437
    je   help
441
    cmp  ah,4                   ; button id=1 ?
438
    cmp  ah,4                   ; button id=1 ?
442
    je   close_app
439
    je   close_app
443
    cmp  ah,5                   ; button id=1 ?
440
    cmp  ah,5                   ; button id=1 ?
444
    je   main_menu
441
    je   main_menu
445
    jmp  stillh
442
    jmp  stillh
446
 
443
 
447
draw_helpwindow:
444
draw_helpwindow:
448
    call draw_window
445
    call draw_window
449
    setimg 5,21,canvas
446
    setimg 5,21,canvas
450
 
447
 
451
    drawfbox 40,50,580,380,cl_Grey
448
    drawfbox 40,50,580,380,cl_Grey
452
 
449
 
453
    mov ebp,4*7
450
    mov ebp,4*7
454
    mov ebx,180*65536+90
451
    mov ebx,180*65536+90
455
    mov edx,helptext
452
    mov edx,helptext
456
    mov esi,50
453
    mov esi,50
457
    mov ecx,cl_White
454
    mov ecx,cl_White
458
    dec ebp
455
    dec ebp
459
looht:
456
looht:
460
    mov eax,4
457
    mov eax,4
461
    mcall
458
    mcall
462
    add edx,esi
459
    add edx,esi
463
    add ebx,10
460
    add ebx,10
464
    dec ebp
461
    dec ebp
465
    jnz looht
462
    jnz looht
466
 
463
 
467
    setimg 90,90,ship
464
    setimg 90,90,ship
468
    setimg 90,130,shoot
465
    setimg 90,130,shoot
469
    setimg 90,170,star
466
    setimg 90,170,star
470
    setimg 90,210,warship1
467
    setimg 90,210,warship1
471
    setimg 90,250,warship2
468
    setimg 90,250,warship2
472
    setimg 90,290,meteor
469
    setimg 90,290,meteor
473
    setimg 90,330,box
470
    setimg 90,330,box
474
 
471
 
475
    drawlbut 500,400,80,14,'<
472
    drawlbut 500,400,80,14,'<
476
 
473
 
477
    jmp stillh
474
    jmp stillh
478
 
475
 
479
helptext:
476
helptext:
480
    db 'Phenix                                            '
477
    db 'Phenix                                            '
481
    db 'Controls: Num1 move left, Num3 move right         '
478
    db 'Controls: Num1 move left, Num3 move right         '
482
    db '          P-pause (use for screen shooting)       '
479
    db '          P-pause (use for screen shooting)       '
483
    db '                                                  '
480
    db '                                                  '
484
 
481
 
485
    db 'Lazer cannon                                      '
482
    db 'Lazer cannon                                      '
486
    db 'Press Num5 for shoot                              '
483
    db 'Press Num5 for shoot                              '
487
    db 'Core fast, speed fast, reload slow                '
484
    db 'Core fast, speed fast, reload slow                '
488
    db '                                                  '
485
    db '                                                  '
489
 
486
 
490
    db 'Plazma cannon                                     '
487
    db 'Plazma cannon                                     '
491
    db 'Press Num2 for Plazma Nuke and Num8 for shoot     '
488
    db 'Press Num2 for Plazma Nuke and Num8 for shoot     '
492
    db 'Core slow, speed medium, reload fast              '
489
    db 'Core slow, speed medium, reload fast              '
493
    db '                                                  '
490
    db '                                                  '
494
 
491
 
495
    db 'Blue warship                                      '
492
    db 'Blue warship                                      '
496
    db 'Speed fast                                        '
493
    db 'Speed fast                                        '
497
    db 'Attack method: plazma bomb                        '
494
    db 'Attack method: plazma bomb                        '
498
    db '                                                  '
495
    db '                                                  '
499
 
496
 
500
    db 'Green warship                                     '
497
    db 'Green warship                                     '
501
    db 'Speed slow                                        '
498
    db 'Speed slow                                        '
502
    db 'Attack method: laser shoot                        '
499
    db 'Attack method: laser shoot                        '
503
    db '                                                  '
500
    db '                                                  '
504
 
501
 
505
    db 'Meteor                                            '
502
    db 'Meteor                                            '
506
    db 'Dangeros object!                                  '
503
    db 'Dangeros object!                                  '
507
    db 'SuperSheld                                        '
504
    db 'SuperSheld                                        '
508
    db '                                                  '
505
    db '                                                  '
509
 
506
 
510
    db 'Fly Box                                           '
507
    db 'Fly Box                                           '
511
    db 'Sheld pack, sheld +5, score +30                   '
508
    db 'Sheld pack, sheld +5, score +30                   '
512
    db 'Get for sheld level up!                           '
509
    db 'Get for sheld level up!                           '
513
    db '                                                  '
510
    db '                                                  '
514
 
511
 
515
start_game:
512
start_game:
516
 
513
 
517
;    jmp end_gm
514
;    jmp end_gm
518
 
515
 
519
    mov [canvas],dword 640
516
    mov [canvas],dword 640
520
    mov [canvas+4],dword 440
517
    mov [canvas+4],dword 440
521
 
518
 
522
    call draw_window
519
    call draw_window
523
 
520
 
524
;Main loop wait for event with 10msec
521
;Main loop wait for event with 10msec
525
still:
522
still:
526
;    scevent red,key,button ;for full speed
523
;    scevent red,key,button ;for full speed
527
 
524
 
528
    timeevent 1,no_event,red,key,button
525
    timeevent 1,no_event,red,key,button
529
no_event:
526
no_event:
530
    setimg 5,21,canvas
527
    setimg 5,21,canvas
531
 
528
 
532
    cmp [pause_on],0
529
    cmp [pause_on],0
533
    jne still
530
    jne still
534
 
531
 
535
    cmp [energy],0
532
    cmp [energy],0
536
    jl  game_over
533
    jl  game_over
537
 
534
 
538
    cmp [ctime],dword 0
535
    cmp [ctime],dword 0
539
    je  no_dct
536
    je  no_dct
540
    dec dword [ctime]
537
    dec dword [ctime]
541
no_dct:
538
no_dct:
542
 
539
 
543
    cmp [xtime],dword 0
540
    cmp [xtime],dword 0
544
    je  no_dxt
541
    je  no_dxt
545
    dec dword [xtime]
542
    dec dword [xtime]
546
no_dxt:
543
no_dxt:
547
 
544
 
548
 
545
 
549
;
546
;
550
;   Add to level new ships
547
;   Add to level new ships
551
;
548
;
552
    inc dword [pathtime]
549
    inc dword [pathtime]
553
    mov ebp,[levelpart]
550
    mov ebp,[levelpart]
554
    shl ebp,5
551
    shl ebp,5
555
    add ebp,levels
552
    add ebp,levels
556
    mov eax,[ebp]
553
    mov eax,[ebp]
557
    cmp [pathtime],eax ;500
554
    cmp [pathtime],eax ;500
558
    jne no_nextloc
555
    jne no_nextloc
559
 
556
 
560
randobjmasx:
557
randobjmasx:
561
    mov ebp,[levelpart]
558
    mov ebp,[levelpart]
562
    shl ebp,5
559
    shl ebp,5
563
    add ebp,levels
560
    add ebp,levels
564
 
561
 
565
    mov  ecx,[ebp+8]
562
    mov  ecx,[ebp+8]
566
    mov  [shiptype],2
563
    mov  [shiptype],2
567
    mov  [xmoving],9
564
    mov  [xmoving],9
568
    mov  [xaccel],4
565
    mov  [xaccel],4
569
    mov  [ymoving],3
566
    mov  [ymoving],3
570
    mov  [yaccel],2
567
    mov  [yaccel],2
571
    call add_ships
568
    call add_ships
572
 
569
 
573
    mov  ecx,[ebp+12]
570
    mov  ecx,[ebp+12]
574
    mov  [shiptype],1
571
    mov  [shiptype],1
575
    mov  [xmoving],3
572
    mov  [xmoving],3
576
    mov  [xaccel],1
573
    mov  [xaccel],1
577
    mov  [ymoving],3
574
    mov  [ymoving],3
578
    mov  [yaccel],6
575
    mov  [yaccel],6
579
    call add_ships
576
    call add_ships
580
 
577
 
581
    mov  ecx,[ebp+16]
578
    mov  ecx,[ebp+16]
582
    mov  [shiptype],3
579
    mov  [shiptype],3
583
    mov  [xmoving],5
580
    mov  [xmoving],5
584
    mov  [xaccel],2
581
    mov  [xaccel],2
585
    mov  [ymoving],5
582
    mov  [ymoving],5
586
    mov  [yaccel],2
583
    mov  [yaccel],2
587
    call add_ships
584
    call add_ships
588
 
585
 
589
    mov  ecx,[ebp+20]
586
    mov  ecx,[ebp+20]
590
    mov  [shiptype],4
587
    mov  [shiptype],4
591
    mov  [xmoving],4
588
    mov  [xmoving],4
592
    mov  [xaccel],1
589
    mov  [xaccel],1
593
    mov  [ymoving],4
590
    mov  [ymoving],4
594
    mov  [yaccel],1
591
    mov  [yaccel],1
595
    call add_ships
592
    call add_ships
596
 
593
 
597
    jmp newlocend
594
    jmp newlocend
598
 
595
 
599
shiptype dd 0
596
shiptype dd 0
600
xmoving  dd 0
597
xmoving  dd 0
601
ymoving  dd 0
598
ymoving  dd 0
602
xaccel   dd 0
599
xaccel   dd 0
603
yaccel   dd 0
600
yaccel   dd 0
604
 
601
 
605
add_ships:
602
add_ships:
606
looship:
603
looship:
607
    cmp ecx,0
604
    cmp ecx,0
608
    je  no_ships
605
    je  no_ships
609
    push ecx
606
    push ecx
610
    findmas objmas,findzero
607
    findmas objmas,findzero
611
;in edi off to free element
608
;in edi off to free element
612
    jc  close_app
609
    jc  close_app
613
    mov ebp,[shiptype]
610
    mov ebp,[shiptype]
614
    mov dword [edi+8],ebp ;2 ;green ship
611
    mov dword [edi+8],ebp ;2 ;green ship
615
; random x
612
; random x
616
    push edi
613
    push edi
617
    random 600,eax
614
    random 600,eax
618
    pop edi
615
    pop edi
619
    mov [edi],eax
616
    mov [edi],eax
620
; random y
617
; random y
621
    push edi
618
    push edi
622
    mov ebp,[levelpart]
619
    mov ebp,[levelpart]
623
    shl ebp,5
620
    shl ebp,5
624
    add ebp,levels
621
    add ebp,levels
625
    mov esi,[ebp+4] ;get max range
622
    mov esi,[ebp+4] ;get max range
626
    random esi,eax
623
    random esi,eax
627
    neg eax
624
    neg eax
628
    pop edi
625
    pop edi
629
    mov [edi+4],eax
626
    mov [edi+4],eax
630
; x moving
627
; x moving
631
    push edi         ;planers
628
    push edi         ;planers
632
    random [xmoving],eax
629
    random [xmoving],eax
633
    sub eax,[xaccel];4
630
    sub eax,[xaccel];4
634
    pop edi
631
    pop edi
635
    mov [edi+12],eax
632
    mov [edi+12],eax
636
; y moving
633
; y moving
637
    push edi
634
    push edi
638
    random [ymoving],eax     ;slow
635
    random [ymoving],eax     ;slow
639
    add eax,[yaccel] ;2
636
    add eax,[yaccel] ;2
640
    pop edi
637
    pop edi
641
    mov [edi+16],eax
638
    mov [edi+16],eax
642
    pop ecx
639
    pop ecx
643
    dec ecx
640
    dec ecx
644
    jnz looship
641
    jnz looship
645
no_ships:
642
no_ships:
646
    ret
643
    ret
647
 
644
 
648
 
645
 
649
levelpart dd 0
646
levelpart dd 0
650
levels:
647
levels:
651
;level1
648
;level1
652
    dd 1,800,0,0,5,8,0,0     ;one at start
649
    dd 1,800,0,0,5,8,0,0     ;one at start
653
    dd 500,2000,4,20,30,0,0,0
650
    dd 500,2000,4,20,30,0,0,0
654
    dd 500,2000,4,20,0,8,0,0
651
    dd 500,2000,4,20,0,8,0,0
655
    dd 500,2000,10,0,0,4,0,0
652
    dd 500,2000,10,0,0,4,0,0
656
    dd 500,4000,0,30,0,0,0,0
653
    dd 500,4000,0,30,0,0,0,0
657
    dd 400,400,0,0,10,0,0,0
654
    dd 400,400,0,0,10,0,0,0
658
    dd 400,400,0,0,10,0,0,0
655
    dd 400,400,0,0,10,0,0,0
659
    dd 0,0,0,0,0,0,0,0        ;end of level
656
    dd 0,0,0,0,0,0,0,0        ;end of level
660
;level2
657
;level2
661
    dd 1,16000,0,30,0,0,0,0     ;one at start
658
    dd 1,16000,0,30,0,0,0,0     ;one at start
662
    dd 200,8000,0,20,0,0,0,0
659
    dd 200,8000,0,20,0,0,0,0
663
    dd 200,2000,0,10,0,8,0,0
660
    dd 200,2000,0,10,0,8,0,0
664
    dd 200,4000,0,10,0,0,0,0
661
    dd 200,4000,0,10,0,0,0,0
665
    dd 0,0,0,0,0,0,0,0        ;end of level
662
    dd 0,0,0,0,0,0,0,0        ;end of level
666
;level3
663
;level3
667
    dd 1,4000,0,20,30,8,0,0     ;one at start
664
    dd 1,4000,0,20,30,8,0,0     ;one at start
668
    dd 400,4000,10,10,20,6,0,0
665
    dd 400,4000,10,10,20,6,0,0
669
    dd 400,4000,0,20,10,2,0,0
666
    dd 400,4000,0,20,10,2,0,0
670
    dd 400,4000,10,10,20,0,0,0
667
    dd 400,4000,10,10,20,0,0,0
671
    dd 0,-1,0,0,0,0,0,0        ;end of game
668
    dd 0,-1,0,0,0,0,0,0        ;end of game
672
 
669
 
673
 
670
 
674
newlocend:
671
newlocend:
675
    mov [pathtime],0
672
    mov [pathtime],0
676
    inc [levelpart]
673
    inc [levelpart]
677
    jmp no_nextloc
674
    jmp no_nextloc
678
 
675
 
679
endgame dd 0
676
endgame dd 0
680
objects dd 0
677
objects dd 0
681
endtest:
678
endtest:
682
    cmp dword [edi+8],0
679
    cmp dword [edi+8],0
683
    jne no_free
680
    jne no_free
684
    ret
681
    ret
685
no_free:
682
no_free:
686
    mov [endgame],0
683
    mov [endgame],0
687
    inc [objects]
684
    inc [objects]
688
    ret
685
    ret
689
 
686
 
690
 
687
 
691
no_nextloc:
688
no_nextloc:
692
    mov [objects],0
689
    mov [objects],0
693
    mov [endgame],1
690
    mov [endgame],1
694
    readmas objmas,endtest
691
    readmas objmas,endtest
695
    cmp [endgame],1
692
    cmp [endgame],1
696
    jne no_end_lev ;no_nextloc
693
    jne no_end_lev ;no_nextloc
697
 
694
 
698
    mov ebp,[levelpart]
695
    mov ebp,[levelpart]
699
    shl ebp,5
696
    shl ebp,5
700
    add ebp,levels
697
    add ebp,levels
701
    mov eax,[ebp+4]
698
    mov eax,[ebp+4]
702
    cmp eax,dword 0
699
    cmp eax,dword 0
703
    je  end_lev    ;end of level
700
    je  end_lev    ;end of level
704
    cmp eax,dword -1
701
    cmp eax,dword -1
705
    je  end_gm    ;end of game
702
    je  end_gm    ;end of game
706
 
703
 
707
no_end_lev:
704
no_end_lev:
708
 
705
 
709
    cmp [num5],dword 0
706
    cmp [num5],dword 0
710
    je  no_addsh
707
    je  no_addsh
711
    cmp [ctime],dword 0
708
    cmp [ctime],dword 0
712
    jne no_addsh
709
    jne no_addsh
713
    cmp [lazer],dword 0
710
    cmp [lazer],dword 0
714
    je  no_addsh
711
    je  no_addsh
715
    findmas massive,findzero
712
    findmas massive,findzero
716
;in edi off to free element
713
;in edi off to free element
717
    jc  close_app
714
    jc  close_app
718
    mov eax,[shipx]
715
    mov eax,[shipx]
719
    mov [edi],eax
716
    mov [edi],eax
720
    mov eax,[shipy]
717
    mov eax,[shipy]
721
    mov [edi+4],eax
718
    mov [edi+4],eax
722
    mov [edi+8],dword 1   ;show
719
    mov [edi+8],dword 1   ;show
723
    mov [edi+12],dword 0
720
    mov [edi+12],dword 0
724
    mov [edi+16],dword -12
721
    mov [edi+16],dword -12
725
    mov [ctime],dword 8   ;wait for cannon
722
    mov [ctime],dword 8   ;wait for cannon
726
    dec [lazer]
723
    dec [lazer]
727
no_addsh:
724
no_addsh:
728
 
725
 
729
    cmp [num8],dword 0
726
    cmp [num8],dword 0
730
    je  no_addplx
727
    je  no_addplx
731
    cmp [xtime],dword 256-16
728
    cmp [xtime],dword 256-16
732
    jae no_addplx
729
    jae no_addplx
733
    cmp [plazma],0
730
    cmp [plazma],0
734
    je  no_addplx
731
    je  no_addplx
735
    findmas massive,findzero
732
    findmas massive,findzero
736
;in edi off to free element
733
;in edi off to free element
737
    jc  close_app
734
    jc  close_app
738
    mov eax,[shipx]
735
    mov eax,[shipx]
739
    mov [edi],eax
736
    mov [edi],eax
740
    mov eax,[shipy]
737
    mov eax,[shipy]
741
    mov [edi+4],eax
738
    mov [edi+4],eax
742
    mov [edi+8],dword 2   ;show
739
    mov [edi+8],dword 2   ;show
743
    add [xtime],dword 8  ;wait for cannon
740
    add [xtime],dword 8  ;wait for cannon
744
    cmp [xtime],dword 256
741
    cmp [xtime],dword 256
745
    jna okx
742
    jna okx
746
    mov [xtime],256
743
    mov [xtime],256
747
okx:
744
okx:
748
    mov [edi+12],dword 0  ;wait for cannon
745
    mov [edi+12],dword 0  ;wait for cannon
749
    mov [edi+16],dword -8  ;wait for cannon
746
    mov [edi+16],dword -8  ;wait for cannon
750
    dec [plazma]
747
    dec [plazma]
751
no_addplx:
748
no_addplx:
752
 
749
 
753
 
750
 
754
 
751
 
755
    cmp [num2],dword 0
752
    cmp [num2],dword 0
756
    je  no_addsh2
753
    je  no_addsh2
757
    cmp [xtime],dword 0
754
    cmp [xtime],dword 0
758
    jne no_addsh2
755
    jne no_addsh2
759
    cmp [plazma],0
756
    cmp [plazma],0
760
    je  no_addsh2
757
    je  no_addsh2
761
    mov eax,[shipy]
758
    mov eax,[shipy]
762
    mov [temp3],eax
759
    mov [temp3],eax
763
    mov [temp2],dword 5
760
    mov [temp2],dword 5
764
loox2:
761
loox2:
765
    mov [temp],dword 10
762
    mov [temp],dword 10
766
loox:
763
loox:
767
    findmas massive,findzero
764
    findmas massive,findzero
768
;in edi off to free element
765
;in edi off to free element
769
    jc  close_app
766
    jc  close_app
770
    random 25,eax
767
    random 25,eax
771
    mov ebp,eax
768
    mov ebp,eax
772
    sub eax,12
769
    sub eax,12
773
    add eax,[shipx]
770
    add eax,[shipx]
774
    mov [edi],eax
771
    mov [edi],eax
775
    shr ebp,3
772
    shr ebp,3
776
    random ebp,eax
773
    random ebp,eax
777
    neg eax
774
    neg eax
778
    add eax,[temp3] ;[shipy]
775
    add eax,[temp3] ;[shipy]
779
    mov [edi+4],eax
776
    mov [edi+4],eax
780
    mov [edi+8],dword 2   ;show hstar
777
    mov [edi+8],dword 2   ;show hstar
781
    random 5,eax
778
    random 5,eax
782
    sub eax,2
779
    sub eax,2
783
    mov [edi+12],eax   ;show hstar
780
    mov [edi+12],eax   ;show hstar
784
    random 7,eax
781
    random 7,eax
785
    sub eax,8
782
    sub eax,8
786
    mov [edi+16],eax   ;show hstar
783
    mov [edi+16],eax   ;show hstar
787
    dec [temp]
784
    dec [temp]
788
    jnz loox
785
    jnz loox
789
    sub [temp3],30
786
    sub [temp3],30
790
    dec [temp2]
787
    dec [temp2]
791
    jnz loox2
788
    jnz loox2
792
    mov [xtime],dword 256  ;wait for cannon
789
    mov [xtime],dword 256  ;wait for cannon
793
    sub [plazma],50
790
    sub [plazma],50
794
no_addsh2:
791
no_addsh2:
795
 
792
 
796
 
793
 
797
    cmp [num1],dword 0
794
    cmp [num1],dword 0
798
    je  no_left
795
    je  no_left
799
    sub dword [shipx],6
796
    sub dword [shipx],6
800
no_left:
797
no_left:
801
 
798
 
802
    cmp [num3],dword 0
799
    cmp [num3],dword 0
803
    je  no_right
800
    je  no_right
804
    add dword [shipx],6
801
    add dword [shipx],6
805
no_right:
802
no_right:
806
 
803
 
807
;ship correct
804
;ship correct
808
    cmp [shipx],5
805
    cmp [shipx],5
809
    jnl xl_ok
806
    jnl xl_ok
810
    mov [shipx],5
807
    mov [shipx],5
811
xl_ok:
808
xl_ok:
812
    cmp [shipx],603
809
    cmp [shipx],603
813
    jng xr_ok
810
    jng xr_ok
814
    mov [shipx],603
811
    mov [shipx],603
815
xr_ok:
812
xr_ok:
816
 
813
 
817
 
814
 
818
;clear scrbuf
815
;clear scrbuf
819
    mov edi,canvas+8
816
    mov edi,canvas+8
820
    cld
817
    cld
821
    mov ecx,640*440*3/4
818
    mov ecx,640*440*3/4
822
    mov eax,0
819
    mov eax,0
823
    rep stosd
820
    rep stosd
824
 
821
 
825
    compmas objmas,massive,compobr
822
    compmas objmas,massive,compobr
826
 
823
 
827
    readmas objmas,shipobjtest
824
    readmas objmas,shipobjtest
828
    readmas massive,shipguntest
825
    readmas massive,shipguntest
829
 
826
 
830
    readmas objmas,showobjmas
827
    readmas objmas,showobjmas
831
    readmas objmas,moveobjmas
828
    readmas objmas,moveobjmas
832
 
829
 
833
    readmas massive,showmas
830
    readmas massive,showmas
834
    readmas massive,movemas
831
    readmas massive,movemas
835
    readmas massive,delfarshoot
832
    readmas massive,delfarshoot
836
;    findmas massive,findzero
833
;    findmas massive,findzero
837
;in edi off to free element
834
;in edi off to free element
838
;    jc  close_app
835
;    jc  close_app
839
 
836
 
840
    aimgtoimg ship,[shipx],[shipy],canvas,0x0
837
    aimgtoimg ship,[shipx],[shipy],canvas,0x0
841
 
838
 
842
    drawfbox 150,5,64,5,0x000000
839
    drawfbox 150,5,64,5,0x000000
843
    mov eax,[xtime]
840
    mov eax,[xtime]
844
    sub eax,256
841
    sub eax,256
845
    neg eax
842
    neg eax
846
    shr eax,2
843
    shr eax,2
847
    drawfbox 150,5,eax,5,0x0000ff
844
    drawfbox 150,5,eax,5,0x0000ff
848
 
845
 
849
    drawfbox 150,12,64,5,0x000000
846
    drawfbox 150,12,64,5,0x000000
850
    mov eax,[ctime]
847
    mov eax,[ctime]
851
    sub eax,8
848
    sub eax,8
852
    neg eax
849
    neg eax
853
    shl eax,3
850
    shl eax,3
854
    drawfbox 150,12,eax,5,0xffff00
851
    drawfbox 150,12,eax,5,0xffff00
855
 
852
 
856
    drawfbox 220,2,6*5+2 ,9,cl_Grey
853
    drawfbox 220,2,6*5+2 ,9,cl_Grey
857
    outcount [plazma],221,3,cl_Blue,5*65536
854
    outcount [plazma],221,3,cl_Blue,5*65536
858
    drawfbox 220,11,6*5+2 ,9,cl_Grey
855
    drawfbox 220,11,6*5+2 ,9,cl_Grey
859
    outcount [lazer],221,12,0xffff00,5*65536
856
    outcount [lazer],221,12,0xffff00,5*65536
860
 
857
 
861
 
858
 
862
    drawfbox 280,6,6*5+2 ,9,cl_Grey
859
    drawfbox 280,6,6*5+2 ,9,cl_Grey
863
    outcount [gship],281,7,cl_Green,5*65536
860
    outcount [gship],281,7,cl_Green,5*65536
864
    drawfbox 320,6,6*5+2 ,9,cl_Grey
861
    drawfbox 320,6,6*5+2 ,9,cl_Grey
865
    outcount [bship],321,7,cl_Blue,5*65536
862
    outcount [bship],321,7,cl_Blue,5*65536
866
    drawfbox 360,6,6*5+2 ,9,cl_Grey
863
    drawfbox 360,6,6*5+2 ,9,cl_Grey
867
    outcount [boxget],361,7,0xffaa00,5*65536
864
    outcount [boxget],361,7,0xffaa00,5*65536
868
 
865
 
869
    drawfbox 400,2,6*5+2 ,9,cl_Grey
866
    drawfbox 400,2,6*5+2 ,9,cl_Grey
870
    outcount [objects],401,2,0x00ff00,5*65536
867
    outcount [objects],401,2,0x00ff00,5*65536
871
    drawfbox 400,11,6*5+2 ,9,cl_Grey
868
    drawfbox 400,11,6*5+2 ,9,cl_Grey
872
    outcount [energy],401,12,0xff0000,5*65536
869
    outcount [energy],401,12,0xff0000,5*65536
873
 
870
 
874
    drawfbox 450,11,6*5+2 ,9,cl_Grey
871
    drawfbox 450,11,6*5+2 ,9,cl_Grey
875
    outcount [score],451,12,0xffff00,5*65536
872
    outcount [score],451,12,0xffff00,5*65536
876
 
873
 
877
 
874
 
878
    jmp  still
875
    jmp  still
879
 
876
 
880
  red:
877
  red:
881
    call draw_window
878
    call draw_window
882
    jmp still
879
    jmp still
883
 
880
 
884
  key:                          ; key
881
  key:                          ; key
885
    mov  eax,2
882
    mov  eax,2
886
    mcall                   ; read (eax=2)
883
    mcall                   ; read (eax=2)
887
 
884
 
888
    shr eax,8
885
    shr eax,8
889
    and eax,0xff
886
    and eax,0xff
890
    mov ah,al
887
    mov ah,al
891
 
888
 
892
    cmp ah,153
889
    cmp ah,153
893
    jne no_pause
890
    jne no_pause
894
    not [pause_on]
891
    not [pause_on]
895
    jmp still
892
    jmp still
896
no_pause:
893
no_pause:
897
 
894
 
898
 
895
 
899
    cmp ah,76
896
    cmp ah,76
900
    jne no_num5d
897
    jne no_num5d
901
    mov [num5],1
898
    mov [num5],1
902
    jmp still
899
    jmp still
903
no_num5d:
900
no_num5d:
904
    cmp ah,204
901
    cmp ah,204
905
    jne no_num5u
902
    jne no_num5u
906
    mov [num5],0
903
    mov [num5],0
907
    jmp still
904
    jmp still
908
no_num5u:
905
no_num5u:
909
 
906
 
910
    cmp ah,80
907
    cmp ah,80
911
    jne no_num2d
908
    jne no_num2d
912
    mov [num2],1
909
    mov [num2],1
913
    jmp still
910
    jmp still
914
no_num2d:
911
no_num2d:
915
    cmp ah,208
912
    cmp ah,208
916
    jne no_num2u
913
    jne no_num2u
917
    mov [num2],0
914
    mov [num2],0
918
    jmp still
915
    jmp still
919
no_num2u:
916
no_num2u:
920
 
917
 
921
    cmp ah,79 ;key_Space 85 exit
918
    cmp ah,79 ;key_Space 85 exit
922
    jne no_num1d
919
    jne no_num1d
923
    mov [num1],1
920
    mov [num1],1
924
    jmp still
921
    jmp still
925
no_num1d:
922
no_num1d:
926
    cmp ah,207 ;key_Space 85 exit
923
    cmp ah,207 ;key_Space 85 exit
927
    jne no_num1u
924
    jne no_num1u
928
    mov [num1],0
925
    mov [num1],0
929
    jmp still
926
    jmp still
930
no_num1u:
927
no_num1u:
931
 
928
 
932
    cmp ah,81 ;key_Space 85 exit
929
    cmp ah,81 ;key_Space 85 exit
933
    jne no_num3d
930
    jne no_num3d
934
    mov [num3],1
931
    mov [num3],1
935
    jmp still
932
    jmp still
936
no_num3d:
933
no_num3d:
937
    cmp ah,209 ;key_Space 85 exit
934
    cmp ah,209 ;key_Space 85 exit
938
    jne no_num3u
935
    jne no_num3u
939
    mov [num3],0
936
    mov [num3],0
940
    jmp still
937
    jmp still
941
no_num3u:
938
no_num3u:
942
 
939
 
943
    cmp ah,72  ;key_Space 85 exit
940
    cmp ah,72  ;key_Space 85 exit
944
    jne no_num8d
941
    jne no_num8d
945
    mov [num8],1
942
    mov [num8],1
946
    jmp still
943
    jmp still
947
no_num8d:
944
no_num8d:
948
    cmp ah,200 ;key_Space 85 exit
945
    cmp ah,200 ;key_Space 85 exit
949
    jne no_num8u
946
    jne no_num8u
950
    mov [num8],0
947
    mov [num8],0
951
    jmp still
948
    jmp still
952
no_num8u:
949
no_num8u:
953
 
950
 
954
    jmp  still                  ; not testing
951
    jmp  still                  ; not testing
955
 
952
 
956
  button:                       ; button
953
  button:                       ; button
957
    mov  eax,17                 ; get id
954
    mov  eax,17                 ; get id
958
    mcall
955
    mcall
959
    cmp  ah,1                   ; button id=1 ?
956
    cmp  ah,1                   ; button id=1 ?
960
    jne  noclose
957
    jne  noclose
961
close_app:
958
close_app:
962
    mov  eax,-1                 ; close this program
959
    mov  eax,-1                 ; close this program
963
    mcall
960
    mcall
964
  noclose:
961
  noclose:
965
    jmp  still
962
    jmp  still
966
 
963
 
967
draw_window:
964
draw_window:
968
    startwd
965
    startwd
969
    window 40,40,(640+9),(440+26),window_Skinned+0x00
966
    window 40,40,(640+9),(440+26),window_Skinned+0x00
970
    label  8,8,'ASCL DYNAMIC GAME',cl_White+font_Big
967
    label  8,8,'ASCL DYNAMIC GAME',cl_White+font_Big
971
;    setimg 5,22,img_area
968
;    setimg 5,22,img_area
972
    endwd
969
    endwd
973
    ret
970
    ret
974
 
971
 
975
;**********************
972
;**********************
976
;  Game Over process
973
;  Game Over process
977
;**********************
974
;**********************
978
 
975
 
979
game_over:
976
game_over:
980
;    close
977
;    close
981
    call draw_gowindow
978
    call draw_gowindow
982
stillgo:
979
stillgo:
983
    wtevent redgo,keygo,buttongo
980
    wtevent redgo,keygo,buttongo
984
    jmp stillgo
981
    jmp stillgo
985
redgo:
982
redgo:
986
    call draw_gowindow
983
    call draw_gowindow
987
    jmp stillgo
984
    jmp stillgo
988
keygo:
985
keygo:
989
    mov  eax,2
986
    mov  eax,2
990
    mcall
987
    mcall
991
    jmp  stillgo
988
    jmp  stillgo
992
buttongo:
989
buttongo:
993
    mov  eax,17                 ; get id
990
    mov  eax,17                 ; get id
994
    mcall
991
    mcall
995
    cmp  ah,1
992
    cmp  ah,1
996
    je   close_app
993
    je   close_app
997
    cmp  ah,4
994
    cmp  ah,4
998
    je   close_app
995
    je   close_app
999
    cmp  ah,5
996
    cmp  ah,5
1000
    je   main_menu
997
    je   main_menu
1001
    cmp  ah,7
998
    cmp  ah,7
1002
    je   restart_lev
999
    je   restart_lev
1003
    jmp  stillgo
1000
    jmp  stillgo
1004
 
1001
 
1005
restart_lev:
1002
restart_lev:
1006
    mov [pathtime],0
1003
    mov [pathtime],0
1007
 
1004
 
1008
prevpart:
1005
prevpart:
1009
    mov ebp,[levelpart]
1006
    mov ebp,[levelpart]
1010
    shl ebp,5
1007
    shl ebp,5
1011
    add ebp,levels
1008
    add ebp,levels
1012
    mov eax,[ebp]
1009
    mov eax,[ebp]
1013
    cmp eax,dword 1
1010
    cmp eax,dword 1
1014
    je  rest    ;end of level
1011
    je  rest    ;end of level
1015
    dec [levelpart]
1012
    dec [levelpart]
1016
    jmp prevpart
1013
    jmp prevpart
1017
 
1014
 
1018
 
1015
 
1019
rest:
1016
rest:
1020
;massives reset - clear massives
1017
;massives reset - clear massives
1021
    mov edi,massive+8
1018
    mov edi,massive+8
1022
    cld
1019
    cld
1023
    mov ecx,massize*elemsize/4
1020
    mov ecx,massize*elemsize/4
1024
    mov eax,0
1021
    mov eax,0
1025
    rep stosd
1022
    rep stosd
1026
 
1023
 
1027
    mov edi,objmas+8
1024
    mov edi,objmas+8
1028
    cld
1025
    cld
1029
    mov ecx,omassize*oelemsize/4
1026
    mov ecx,omassize*oelemsize/4
1030
    mov eax,0
1027
    mov eax,0
1031
    rep stosd
1028
    rep stosd
1032
 
1029
 
1033
;counters reset
1030
;counters reset
1034
    mov [boxget],0
1031
    mov [boxget],0
1035
    mov [gship],0
1032
    mov [gship],0
1036
    mov [bship],0
1033
    mov [bship],0
1037
 
1034
 
1038
;ship reset
1035
;ship reset
1039
    mov [energy],100
1036
    mov [energy],100
1040
    mov [shipx],300
1037
    mov [shipx],300
1041
    mov [shipy],400
1038
    mov [shipy],400
1042
    mov [lazer],1000
1039
    mov [lazer],1000
1043
    mov [plazma],500
1040
    mov [plazma],500
1044
 
1041
 
1045
 
1042
 
1046
; reset keyboard
1043
; reset keyboard
1047
    mov [num1],0
1044
    mov [num1],0
1048
    mov [num5],0
1045
    mov [num5],0
1049
    mov [num3],0
1046
    mov [num3],0
1050
    mov [num2],0
1047
    mov [num2],0
1051
    mov [num8],0
1048
    mov [num8],0
1052
    jmp start_game
1049
    jmp start_game
1053
 
1050
 
1054
draw_gowindow:
1051
draw_gowindow:
1055
    startwd
1052
    startwd
1056
    drawfbox 170,160,300,120,cl_Grey
1053
    drawfbox 170,160,300,120,cl_Grey
1057
    drawlbut 180,260,80,14,'(X) EXIT',4,0x990000,cl_Black
1054
    drawlbut 180,260,80,14,'(X) EXIT',4,0x990000,cl_Black
1058
    drawlbut 280,260,80,14,'',5,0x990000,cl_Black
1055
    drawlbut 280,260,80,14,'',5,0x990000,cl_Black
1059
    drawlbut 380,260,80,14,'RESTART',7,0x990000,cl_Black
1056
    drawlbut 380,260,80,14,'RESTART',7,0x990000,cl_Black
1060
 
1057
 
1061
    label 280,200,'  GAME OVER  ',cl_Black
1058
    label 280,200,'  GAME OVER  ',cl_Black
1062
    endwd
1059
    endwd
1063
    ret
1060
    ret
1064
 
1061
 
1065
 
1062
 
1066
;**********************
1063
;**********************
1067
;  End level process
1064
;  End level process
1068
;**********************
1065
;**********************
1069
 
1066
 
1070
end_lev:
1067
end_lev:
1071
;    close
1068
;    close
1072
    call draw_scorewindow
1069
    call draw_scorewindow
1073
stilleg:
1070
stilleg:
1074
    wtevent redeg,keyeg,buttoneg
1071
    wtevent redeg,keyeg,buttoneg
1075
    jmp stilleg
1072
    jmp stilleg
1076
redeg:
1073
redeg:
1077
    call draw_scorewindow
1074
    call draw_scorewindow
1078
    jmp stilleg
1075
    jmp stilleg
1079
keyeg:
1076
keyeg:
1080
    mov  eax,2
1077
    mov  eax,2
1081
    mcall
1078
    mcall
1082
    jmp  stilleg
1079
    jmp  stilleg
1083
buttoneg:
1080
buttoneg:
1084
    mov  eax,17                 ; get id
1081
    mov  eax,17                 ; get id
1085
    mcall
1082
    mcall
1086
    cmp  ah,1
1083
    cmp  ah,1
1087
    je   close_app
1084
    je   close_app
1088
    cmp  ah,2
1085
    cmp  ah,2
1089
    je   next_lev
1086
    je   next_lev
1090
    cmp  ah,3
1087
    cmp  ah,3
1091
    je   help
1088
    je   help
1092
    cmp  ah,4
1089
    cmp  ah,4
1093
    je   close_app
1090
    je   close_app
1094
    cmp  ah,5
1091
    cmp  ah,5
1095
    je   main_menu
1092
    je   main_menu
1096
    jmp  stilleg
1093
    jmp  stilleg
1097
 
1094
 
1098
next_lev:
1095
next_lev:
1099
    mov [pathtime],0
1096
    mov [pathtime],0
1100
    inc [levelpart]
1097
    inc [levelpart]
1101
 
1098
 
1102
;ship reset
1099
;ship reset
1103
    mov [energy],100
1100
    mov [energy],100
1104
    mov [shipx],300
1101
    mov [shipx],300
1105
    mov [shipy],400
1102
    mov [shipy],400
1106
    mov [lazer],1000
1103
    mov [lazer],1000
1107
    mov [plazma],500
1104
    mov [plazma],500
1108
 
1105
 
1109
;counters reset
1106
;counters reset
1110
    mov [boxget],0
1107
    mov [boxget],0
1111
    mov [gship],0
1108
    mov [gship],0
1112
    mov [bship],0
1109
    mov [bship],0
1113
 
1110
 
1114
; reset keyboard
1111
; reset keyboard
1115
    mov [num1],0
1112
    mov [num1],0
1116
    mov [num5],0
1113
    mov [num5],0
1117
    mov [num3],0
1114
    mov [num3],0
1118
    mov [num2],0
1115
    mov [num2],0
1119
    mov [num8],0
1116
    mov [num8],0
1120
    jmp start_game
1117
    jmp start_game
1121
 
1118
 
1122
draw_scorewindow:
1119
draw_scorewindow:
1123
    call draw_window
1120
    call draw_window
1124
    startwd
1121
    startwd
1125
    drawfbox 170,130,300,190,cl_Grey
1122
    drawfbox 170,130,300,190,cl_Grey
1126
    drawlbut 180,300,80,14,'(X) EXIT',4,0x990000,cl_Black
1123
    drawlbut 180,300,80,14,'(X) EXIT',4,0x990000,cl_Black
1127
    drawlbut 280,300,80,14,'',5,0x990000,cl_Black
1124
    drawlbut 280,300,80,14,'',5,0x990000,cl_Black
1128
    drawlbut 380,300,80,14,'NEXT >>',2,0x990000,cl_Black
1125
    drawlbut 380,300,80,14,'NEXT >>',2,0x990000,cl_Black
1129
 
1126
 
1130
    setimg 180,140,warship1
1127
    setimg 180,140,warship1
1131
    outcount [bship],241,151,cl_Blue,5*65536
1128
    outcount [bship],241,151,cl_Blue,5*65536
1132
 
1129
 
1133
    setimg 180,180,warship2
1130
    setimg 180,180,warship2
1134
    outcount [gship],241,191,cl_Green,5*65536
1131
    outcount [gship],241,191,cl_Green,5*65536
1135
 
1132
 
1136
    setimg 180,220,meteor
1133
    setimg 180,220,meteor
1137
    setimg 180,260,box
1134
    setimg 180,260,box
1138
    outcount [boxget],241,271,0xbbbb00,5*65536
1135
    outcount [boxget],241,271,0xbbbb00,5*65536
1139
    endwd
1136
    endwd
1140
    ret
1137
    ret
1141
 
1138
 
1142
 
1139
 
1143
;**********************
1140
;**********************
1144
;  End of game process
1141
;  End of game process
1145
;**********************
1142
;**********************
1146
 
1143
 
1147
end_gm:
1144
end_gm:
1148
    mov [pathtime],0
1145
    mov [pathtime],0
1149
    call draw_window
1146
    call draw_window
1150
    label 200 ,8,'YOU WIN PRESS ANY KEY TO EXIT',cl_White+font_Big
1147
    label 200 ,8,'YOU WIN PRESS ANY KEY TO EXIT',cl_White+font_Big
1151
 
1148
 
1152
stilleg2:
1149
stilleg2:
1153
;    scevent   redeg2,keyeg2,buttoneg2
1150
;    scevent   redeg2,keyeg2,buttoneg2
1154
    timeevent 1,no_event2,redeg2,keyeg2,buttoneg2
1151
    timeevent 1,no_event2,redeg2,keyeg2,buttoneg2
1155
 
1152
 
1156
no_event2:
1153
no_event2:
1157
    setimg 5,21,canvas
1154
    setimg 5,21,canvas
1158
 
1155
 
1159
;clear scrbuf
1156
;clear scrbuf
1160
    mov edi,canvas+8
1157
    mov edi,canvas+8
1161
    cld
1158
    cld
1162
    mov ecx,640*440*3/4
1159
    mov ecx,640*440*3/4
1163
    mov eax,0
1160
    mov eax,0
1164
    rep stosd
1161
    rep stosd
1165
 
1162
 
1166
    aimgtoimg ship,320,220,canvas,0x0
1163
    aimgtoimg ship,320,220,canvas,0x0
1167
 
1164
 
1168
    readmas massive,endshowmas
1165
    readmas massive,endshowmas
1169
    readmas massive,endmovemas
1166
    readmas massive,endmovemas
1170
    readmas massive,delfarshoot
1167
    readmas massive,delfarshoot
1171
;    findmas massive,findzero
1168
;    findmas massive,findzero
1172
;in edi off to free element
1169
;in edi off to free element
1173
;    jc  close_app
1170
;    jc  close_app
1174
 
1171
 
1175
    inc [pathtime]
1172
    inc [pathtime]
1176
    cmp [pathtime],30
1173
    cmp [pathtime],30
1177
    jne no_firework
1174
    jne no_firework
1178
    mov [pathtime],0
1175
    mov [pathtime],0
1179
    random 400,eax
1176
    random 400,eax
1180
    mov [temp3],eax
1177
    mov [temp3],eax
1181
    random 600,eax
1178
    random 600,eax
1182
    mov [temp2],eax
1179
    mov [temp2],eax
1183
    mov [temp],dword 8;10
1180
    mov [temp],dword 8;10
1184
xloox:
1181
xloox:
1185
    findmas massive,findzero
1182
    findmas massive,findzero
1186
;in edi off to free element
1183
;in edi off to free element
1187
    jc  close_app
1184
    jc  close_app
1188
 
1185
 
1189
    mov eax,[temp2] ;[shipx]
1186
    mov eax,[temp2] ;[shipx]
1190
    mov [edi],eax
1187
    mov [edi],eax
1191
    mov eax,[temp3] ;[shipy]
1188
    mov eax,[temp3] ;[shipy]
1192
    mov [edi+4],eax
1189
    mov [edi+4],eax
1193
    mov [edi+8],dword 2   ;show hstar
1190
    mov [edi+8],dword 2   ;show hstar
1194
rerand:
1191
rerand:
1195
    random 5,eax
1192
    random 5,eax
1196
    sub eax,2
1193
    sub eax,2
1197
    cmp eax,0
1194
    cmp eax,0
1198
    je  rerand
1195
    je  rerand
1199
    mov [edi+12],eax   ;show hstar
1196
    mov [edi+12],eax   ;show hstar
1200
rerand2:
1197
rerand2:
1201
    random 7,eax
1198
    random 7,eax
1202
    sub eax,3
1199
    sub eax,3
1203
    cmp eax,0
1200
    cmp eax,0
1204
    je  rerand2
1201
    je  rerand2
1205
    mov [edi+16],eax   ;show hstar
1202
    mov [edi+16],eax   ;show hstar
1206
    dec [temp]
1203
    dec [temp]
1207
    jnz xloox
1204
    jnz xloox
1208
no_firework:
1205
no_firework:
1209
    jmp stilleg2
1206
    jmp stilleg2
1210
 
1207
 
1211
redeg2:
1208
redeg2:
1212
    jmp end_gm ;stilleg2
1209
    jmp end_gm ;stilleg2
1213
keyeg2:
1210
keyeg2:
1214
    mov  eax,2
1211
    mov  eax,2
1215
    mcall
1212
    mcall
1216
    jmp  main_menu
1213
    jmp  main_menu
1217
buttoneg2:
1214
buttoneg2:
1218
    mov  eax,17                 ; get id
1215
    mov  eax,17                 ; get id
1219
    mcall
1216
    mcall
1220
    jmp  stilleg2
1217
    jmp  stilleg2
1221
 
1218
 
1222
 
1219
 
1223
 
1220
 
1224
 
1221
 
1225
 
1222
 
1226
 
1223
 
1227
; DATA AREA
1224
; DATA AREA
1228
IM_END:
1225
IM_END:
1229
;global
1226
;global
1230
pause_on dd 0
1227
pause_on dd 0
1231
 
1228
 
1232
;massive
1229
;massive
1233
shipx dd 300
1230
shipx dd 300
1234
shipy dd 400
1231
shipy dd 400
1235
 
1232
 
1236
;guns
1233
;guns
1237
lazer  dd 1000
1234
lazer  dd 1000
1238
plazma dd 500
1235
plazma dd 500
1239
 
1236
 
1240
;keys
1237
;keys
1241
num1 dd 0
1238
num1 dd 0
1242
num5 dd 0
1239
num5 dd 0
1243
num3 dd 0
1240
num3 dd 0
1244
num2 dd 0
1241
num2 dd 0
1245
num8 dd 0
1242
num8 dd 0
1246
 
1243
 
1247
;enemy countres
1244
;enemy countres
1248
gship  dd 0
1245
gship  dd 0
1249
bship  dd 0
1246
bship  dd 0
1250
boxget dd 0
1247
boxget dd 0
1251
 
1248
 
1252
energy dd 100
1249
energy dd 100
1253
score  dd 0
1250
score  dd 0
1254
 
1251
 
1255
;delay for cannon
1252
;delay for cannon
1256
ctime dd 0
1253
ctime dd 0
1257
;delay for nuke gun
1254
;delay for nuke gun
1258
xtime dd 0
1255
xtime dd 0
1259
;path time
1256
;path time
1260
pathtime dd 0
1257
pathtime dd 0
1261
;
1258
;
1262
temp  dd 0
1259
temp  dd 0
1263
temp2 dd 0
1260
temp2 dd 0
1264
temp3 dd 0
1261
temp3 dd 0
1265
temp4 dd 0
1262
temp4 dd 0
1266
otv dd 0
1263
otv dd 0
1267
 
1264
 
1268
;for collimg
1265
;for collimg
1269
imgsize:
1266
imgsize:
1270
 dd 32
1267
 dd 32
1271
 dd 32
1268
 dd 32
1272
 
1269
 
1273
;massive:
1270
;massive:
1274
;dd 400  ;elements num
1271
;dd 400  ;elements num
1275
;dd 20  ;size of element in bytes
1272
;dd 20  ;size of element in bytes
1276
;rb 400*20
1273
;rb 400*20
1277
 
-
 
1278
 
1274
 
1279
keymap:
1275
keymap:
1280
rb 1000
1276
rb 1000
1281
 
1277
 
1282
;gif_file_area ~21500
1278
;gif_file_area ~21500
1283
gif_file_area2:
1279
gif_file_area2:
1284
file 'phenix.gif'
1280
file 'phenix.gif'
1285
rb 50
-
 
1286
gif_file_area:
1281
gif_file_area:
1287
file 'star2.gif';include gif file
1282
file 'star2.gif';include gif file
1288
rb 50          ;50 bytes temp back zone
-
 
1289
img_area:
1283
img_area:
1290
rb 256*64*3+8
1284
rb 256*64*3+8
1291
ship:
1285
ship:
1292
rb 32*32*3+8
1286
rb 32*32*3+8
1293
shoot:
1287
shoot:
1294
rb 32*32*3+8
1288
rb 32*32*3+8
1295
warship1:
1289
warship1:
1296
rb 32*32*3+8
1290
rb 32*32*3+8
1297
warship2:
1291
warship2:
1298
rb 32*32*3+8
1292
rb 32*32*3+8
1299
meteor:
1293
meteor:
1300
rb 32*32*3+8
1294
rb 32*32*3+8
1301
star:
1295
star:
1302
rb 32*32*3+8
1296
rb 32*32*3+8
1303
star2:
1297
star2:
1304
rb 32*32*3+8
1298
rb 32*32*3+8
1305
star3:
1299
star3:
1306
rb 32*32*3+8
1300
rb 32*32*3+8
1307
box:
1301
box:
1308
rb 32*32*3+8
1302
rb 32*32*3+8
1309
 
1303
 
1310
gif_hash_area:
-
 
1311
rd 4096+1      ;hash area size for unpacking GIF
1304
IncludeUGlobals
1312
 
1305
 
1313
massive:
1306
massive:
1314
rd massize  ;elements num
1307
rd massize  ;elements num
1315
rd elemsize  ;size of element in bytes
1308
rd elemsize  ;size of element in bytes
1316
rb massize*elemsize
1309
rb massize*elemsize
1317
 
1310
 
1318
objmas:
1311
objmas:
1319
rd omassize  ;elements num
1312
rd omassize  ;elements num
1320
rd oelemsize  ;size of element in bytes
1313
rd oelemsize  ;size of element in bytes
1321
rb omassize*oelemsize
1314
rb omassize*oelemsize
1322
 
1315
 
1323
canvas:
1316
canvas:
1324
canvas_x:
1317
canvas_x:
1325
 rd 1
1318
 rd 1
1326
canvas_y:
1319
canvas_y:
1327
 rd 1
1320
 rd 1
1328
rb (640*440*3)+2000
1321
rb (640*440*3)+2000
1329
I_END:
1322
I_END:
1330
 
1323
 
1331
>
1324
>
1332
 
1325
 
1333
>
1326
>