Subversion Repositories Kolibri OS

Rev

Rev 950 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
950 leency 1
;=============================================================================;
2
; Hidnplayr's invaders, Compilable for DexOs and Kolibrios                    ;
3
;-----------------------------------------------------------------------------;
4
;                                                                             ;
5
; Copyright (C) hidnplayr 2007. All rights reserved.                          ;
6
;                                                                             ;
7
; Invaders is distributed in the hope that it will be useful, but WITHOUT ANY ;
8
; WARRANTY. No author or distributor accepts responsibility to anyone for the ;
9
; consequences of using it or for whether it serves any particular purpose or ;
10
; works at all, unless he says so in writing. Refer to the GNU General Public ;
11
; License (the "GPL") for full details.                                       ;
12
; Everyone is granted permission to copy, modify and redistribute KolibriOS,  ;
13
; but only under the conditions described in the GPL. A copy of this license  ;
14
; is supposed to have been given to you along with KolibriOS so you can know  ;
15
; your rights and responsibilities. It should be in a file named COPYING.     ;
16
; Among other things, the copyright notice and this notice must be preserved  ;
17
; on all copies.                                                              ;
18
;                                                                             ;
19
; see copying.txt                                                             ;
20
;                                                                             ;
21
; contact me on hidnplayr@gmail.com                                           ;
22
;                                                                             ;
23
;-----------------------------------------------------------------------------;
24
 
25
 
26
SCREEN_X equ 640
27
SCREEN_Y equ 480
28
 
29
SHIP_X equ 32
30
SHIP_Y equ 32
31
 
32
SHIP_X_POS equ (SCREEN_X-SHIP_X)/2
33
SHIP_Y_POS equ SCREEN_Y-SHIP_Y-27
34
 
35
ENEMY_X equ 32
36
ENEMY_Y equ 32
37
 
38
ALIEN_X equ 48
39
ALIEN_Y equ 38
40
ALIEN_Y_POS equ 1
41
 
42
BOUNDARY equ 10
43
MOVEMENT equ 7
44
 
45
TRANSPARENCY equ 0x00000000
46
 
47
WINDOW_X equ 100
48
WINDOW_Y equ 100
49
 
50
BULLET_X equ 10
51
BULLET_Y equ 10
52
 
4386 hidnplayr 53
STARS_   equ 226
950 leency 54
STARLEVELS equ 3
55
 
56
ENEMY_STARTING_X equ 25
57
ENEMY_STARTING_Y equ 50
58
 
59
BULLETSPEED equ 12
60
 
61
SCREEN_X_POS equ 5
62
SCREEN_Y_POS equ 25
63
 
64
gif_hash_offset = gif_hash_area
65
 
66
include 'ascgl.inc'
67
include 'invaders_kolibri.inc'
68
 
69
decodegif:
4386 hidnplayr 70
        giftoimg gif_bullet,bullet
71
        giftoimg gif_bullet2,bullet2
72
        giftoimg gif_ship,ship
73
        giftoimg gif_enemy1,enemy1
74
        giftoimg gif_enemy2,enemy2
75
        giftoimg gif_enemy3,enemy3
76
        giftoimg gif_enemy4,enemy4
77
        giftoimg gif_enemy5,enemy5
78
        giftoimg gif_alien,alien
79
        giftoimg gif_menu1,menu1
80
        giftoimg gif_menu2,menu2
81
        giftoimg gif_menu3,menu3
82
        giftoimg gif_menu4,menu4
83
        giftoimg gif_logo,logo
84
        giftoimg gif_pause,pause_
85
        giftoimg gif_levelup,levelup
86
        giftoimg gif_gameover,gameover
87
        giftoimg gif_highscore,highscore
88
        giftoimg gif_smallfont,smallfont
89
        giftoimg gif_bigfont,bigfont
90
        giftoimg gif_numbers,numbers
950 leency 91
 
4386 hidnplayr 92
        call  createstars
93
        call  drawit
94
        call  [drawroutine]
950 leency 95
 
96
mainloop:
97
 
98
    cmp  byte[status],3 ; if game is paused,...
4386 hidnplayr 99
    je   waitfordraw
950 leency 100
 
101
    call drawit
102
    call [drawroutine]
103
    call checkbullet
104
 
105
   waitfordraw:
106
 
107
    call waitandgetkey ;;;
108
    test ah,ah
4386 hidnplayr 109
    jz   mainloop
950 leency 110
 
111
    cmp  byte[status],1      ;
112
    jne  nogame
113
 
4386 hidnplayr 114
         cmp  ah, KEY_RIGHT
115
         jnz  noright
116
         cmp  dword[ship_x],SCREEN_X-SHIP_X-BOUNDARY
117
         jge  mainloop
118
         add  dword[ship_x],MOVEMENT
950 leency 119
 
4386 hidnplayr 120
         jmp  mainloop
950 leency 121
 
122
       noright:
4386 hidnplayr 123
         cmp  ah, KEY_LEFT
124
         jnz  noleft
125
         cmp  dword[ship_x],BOUNDARY
126
         jle  mainloop
127
         sub  dword[ship_x],MOVEMENT
950 leency 128
 
4386 hidnplayr 129
         jmp  mainloop
950 leency 130
 
131
       noleft:
4386 hidnplayr 132
         cmp  ah, KEY_UP
133
         jnz  noup
950 leency 134
 
4386 hidnplayr 135
         cmp  dword[bullet_y],1
136
         jg   mainloop
950 leency 137
 
4386 hidnplayr 138
         mov  eax,dword[ship_x]
139
         add  eax,(SHIP_X-BULLET_X)/2
140
         mov  dword[bullet_x],eax
141
         mov  dword[bullet_y],SHIP_Y_POS;-BULLET_Y
950 leency 142
 
4386 hidnplayr 143
         jmp  mainloop
950 leency 144
 
145
       noup:
4386 hidnplayr 146
         cmp  ah,KEY_P
147
         jnz  no_pause1
950 leency 148
 
4386 hidnplayr 149
         mov  byte[status],3
150
         aimgtoimg pause_,150,180,vscreen,TRANSPARENCY,0
151
         call [drawroutine]
950 leency 152
 
4386 hidnplayr 153
         jmp  mainloop
950 leency 154
 
155
       no_pause1:
156
 
157
nogame:
158
    cmp  byte[status],0
159
    jne  nomenu
160
 
4386 hidnplayr 161
         cmp  ah, KEY_DOWN
162
         jnz  no_down
950 leency 163
 
4386 hidnplayr 164
         cmp  byte[menu],3
165
         jne  no_menu1
950 leency 166
 
4386 hidnplayr 167
         mov  byte[menu],0
168
         jmp  nomenu
950 leency 169
 
170
       no_menu1:
4386 hidnplayr 171
         inc  byte[menu]
950 leency 172
 
173
       no_down:
4386 hidnplayr 174
         cmp  ah, KEY_UP
175
         jnz  no_up
950 leency 176
 
4386 hidnplayr 177
         cmp  byte[menu],0
178
         jne  no_menu0
950 leency 179
 
4386 hidnplayr 180
         mov  byte[menu],3
181
         jmp  nomenu
950 leency 182
 
183
       no_menu0:
4386 hidnplayr 184
         dec  byte[menu]
950 leency 185
 
186
       no_up:
187
 
4386 hidnplayr 188
         cmp  ah, KEY_ESC
189
         je   exit
950 leency 190
 
191
       no_esc:
4386 hidnplayr 192
         cmp  ah, KEY_ENTER
193
         jnz  no_enter
950 leency 194
 
4386 hidnplayr 195
        exemenu:
196
                cmp  byte[menu],0  ;start
197
                jne  exemenu1
950 leency 198
 
4386 hidnplayr 199
              new_game:
200
                        mov  dword[score],0
201
                        mov  eax,[score]
202
                        call convertscore
950 leency 203
 
4386 hidnplayr 204
                        mov  esi, level1
205
                        mov  word[levelnumb],'01'
206
              load_level:
207
                        mov  byte[enemy_speed],1
208
                        mov  dword[enemy_x], ENEMY_STARTING_X
209
                        mov  dword[enemy_y], ENEMY_STARTING_Y
950 leency 210
 
4386 hidnplayr 211
                        mov  edi, enemy_table
212
                        mov  ecx, 5
213
                        rep  movsd
950 leency 214
 
4386 hidnplayr 215
                        mov  byte[status],1
950 leency 216
 
4386 hidnplayr 217
                        jmp  mainloop
950 leency 218
 
4386 hidnplayr 219
        exemenu1:
220
                cmp  byte[menu],1  ;about
221
                jne  exemenu2
222
                mov  byte[status],4
223
                jmp  mainloop
950 leency 224
 
4386 hidnplayr 225
        exemenu2:
226
                cmp  byte[menu],2  ;highscores
227
                jne  exemenu3
228
                mov  byte[status],5
229
                call load_highscores
230
                jmp  mainloop
950 leency 231
 
4386 hidnplayr 232
        exemenu3:
233
                cmp  byte[menu],3  ;exit
234
                je   exit
950 leency 235
 
236
      no_enter:
237
nomenu:
238
    cmp  byte[status],3
239
    jne  nopause
240
 
241
    cmp  ah, KEY_P
242
    jnz  nopause
243
 
244
    mov  byte[status],1
245
 
246
nopause:
247
    cmp  byte[status],6
248
    jne  nolevelup
249
 
250
    cmp  ah, KEY_ENTER
251
    jne  nolevelup
252
 
4386 hidnplayr 253
        inc  byte[level]
950 leency 254
 
255
;        cmp  byte[level],5
256
;        jne  @f
257
;        mov  byte[level],0
258
 
259
;@@:
4386 hidnplayr 260
        inc  byte[levelnumb+1]
261
        cmp  byte[levelnumb+1],'9'
262
        jle  @f
263
        mov  byte[levelnumb+1],'0'
264
        inc  byte[levelnumb]
950 leency 265
 
266
       @@:
4386 hidnplayr 267
        mov  eax,20
268
        mov  ah,byte[level]
269
        and  ah,7
270
        mul  ah
271
        add  eax,level1
272
        mov  esi,eax
273
        jmp  load_level
950 leency 274
 
275
nolevelup:
276
    cmp  byte[status],7
277
    jne  nohighscore
278
 
4386 hidnplayr 279
        cmp   ah, KEY_ENTER
280
        jne   @f
950 leency 281
 
4386 hidnplayr 282
        call  load_highscores
283
        mov   eax,dword[score]
284
        mov   ebx,gif_hash_area+140
950 leency 285
    .findscore:
4386 hidnplayr 286
        cmp   ebx,gif_hash_area+100
287
        je    .topscore
288
        sub   ebx,4
289
        cmp   eax,dword[ebx]
290
        jg    .findscore
950 leency 291
 
292
    .topscore:
4386 hidnplayr 293
        mov   esi,name
294
        mov   edi,gif_hash_area
295
        mov   ecx,10
296
        rep   movsb
950 leency 297
 
4386 hidnplayr 298
        mov   eax,dword[score]
299
        mov   dword[gif_hash_area+100],eax
950 leency 300
 
4386 hidnplayr 301
        call  save_highscores
302
        mov   byte[status],5
950 leency 303
 
304
@@:
4386 hidnplayr 305
        cmp   ah,14
306
        jne   @f
950 leency 307
 
4386 hidnplayr 308
        cmp   byte[namepos],0
309
        je    @f
950 leency 310
 
4386 hidnplayr 311
        dec   byte[namepos]
312
        movzx ebx,byte[namepos]
313
        add   ebx,name
314
        mov   byte[ebx],0x11  ; this is a character we dont print
950 leency 315
 
316
@@:
4386 hidnplayr 317
        cmp   byte[namepos],10
318
        jge   nohighscore
950 leency 319
 
4386 hidnplayr 320
        cmp   al,'0'
321
        jl    nohighscore
322
        cmp   al,'9'
323
        jle   @f
950 leency 324
 
4386 hidnplayr 325
        cmp   al,'z'
326
        jg    nohighscore
327
        cmp   al,'a'
328
        jge   @f
950 leency 329
 
4386 hidnplayr 330
        cmp   al,'Z'
331
        jg    nohighscore
332
        cmp   al,'A'
333
        jl    nohighscore
950 leency 334
@@:
335
 
4386 hidnplayr 336
        movzx ebx,byte[namepos]
337
        add   ebx,name
338
        mov   byte[ebx],al
950 leency 339
 
4386 hidnplayr 340
        inc   byte[namepos]
950 leency 341
 
4386 hidnplayr 342
        jmp   mainloop
950 leency 343
 
344
nohighscore:
345
    cmp  byte[status],2 ; gameover
346
    jne  nogameover
347
 
348
    cmp  ah, KEY_ENTER
349
    jne  nogameover
350
 
4386 hidnplayr 351
        ; test if score is high enough to put in highscore list...
352
        mov   byte[status],7
950 leency 353
 
4386 hidnplayr 354
        jmp   mainloop
950 leency 355
 
356
nogameover:
357
    cmp  byte[status],0
4386 hidnplayr 358
    je   mainloop
950 leency 359
 
360
    cmp  ah, KEY_ESC
361
    jnz  mainloop
362
 
363
    mov  byte[status],0
364
    mov  word[intro],0
365
 
366
    jmp  mainloop
367
 
368
 ;----------------------------------------------------;
369
 ; Drawing routine: create image in buffer            ;
370
 ;----------------------------------------------------;
371
drawit:
372
    mov  eax,0x00000000
373
    call fillscreen
374
    call drawstars
375
 
376
    cmp  byte[status],1
377
    jne  @f
378
 
4386 hidnplayr 379
        call drawbullet
380
        call drawenemys                                               ; Draw the enemy's to buffer
381
        aimgtoimg ship,dword[ship_x],SHIP_Y_POS,vscreen,TRANSPARENCY,0  ; Draw the ship to buffer
950 leency 382
 
4386 hidnplayr 383
        mov  esi,scoretext
384
        mov  ebx,0
385
        mov  ecx,SCREEN_Y-24
386
        call printtext
950 leency 387
 
4386 hidnplayr 388
        mov  esi,leveltext
389
        mov  ebx,300
390
        call printtext
950 leency 391
 
392
    ret
393
 
394
@@:
395
    cmp  byte[status],2 ; game over, dude !
396
    jne  @f
397
 
4386 hidnplayr 398
        aimgtoimg ship,dword[ship_x],SHIP_Y_POS,vscreen,TRANSPARENCY,0  ; Draw the ship to buffer
950 leency 399
 
4386 hidnplayr 400
        mov  esi,scoretext
401
        mov  ebx,0
402
        mov  ecx,SCREEN_Y-24
403
        call printtext
950 leency 404
 
4386 hidnplayr 405
        mov  esi,leveltext
406
        mov  ebx,300
407
        call printtext
408
        aimgtoimg gameover,150,180,vscreen,TRANSPARENCY,0
950 leency 409
 
4386 hidnplayr 410
        ret
950 leency 411
 
412
@@:
413
    cmp  byte[status],4 ; about screen
414
    jne  @f
415
 
4386 hidnplayr 416
        mov  esi,msgAbout
417
        mov  ebx,50
418
        mov  ecx,100
419
        call printtext
950 leency 420
 
4386 hidnplayr 421
        ret
950 leency 422
 
423
@@:
424
    cmp  byte[status],6 ; level up!
425
    jne  @f
4386 hidnplayr 426
        aimgtoimg ship,dword[ship_x],SHIP_Y_POS,vscreen,TRANSPARENCY,0  ; Draw the ship to buffer
950 leency 427
 
4386 hidnplayr 428
        mov  esi,scoretext
429
        mov  ebx,0
430
        mov  ecx,SCREEN_Y-24
431
        call printtext
950 leency 432
 
4386 hidnplayr 433
        mov  esi,leveltext
434
        mov  ebx,300
435
        call printtext
436
        aimgtoimg levelup,150,180,vscreen,TRANSPARENCY,0
950 leency 437
 
4386 hidnplayr 438
        ret
950 leency 439
 
440
@@:
441
    cmp  byte[status],0 ; menu!
442
    jne  @f
443
 
4386 hidnplayr 444
        aimgtoimg logo,50,80,vscreen,TRANSPARENCY,0
950 leency 445
 
446
 
4386 hidnplayr 447
        cmp  byte[menu],0
448
        jne  .menu_0
449
        aimgtoimg menu1,30,200,vscreen,TRANSPARENCY,1
450
        jmp  .menu_1
950 leency 451
    .menu_0:
4386 hidnplayr 452
        aimgtoimg menu1,30,200,vscreen,TRANSPARENCY,0
950 leency 453
    .menu_1:
4386 hidnplayr 454
        cmp  byte[menu],1
455
        jne  .menu_2
456
        aimgtoimg menu2,80,250,vscreen,TRANSPARENCY,1
457
        jmp  .menu_3
950 leency 458
    .menu_2:
4386 hidnplayr 459
        aimgtoimg menu2,80,250,vscreen,TRANSPARENCY,0
950 leency 460
    .menu_3:
4386 hidnplayr 461
        cmp  byte[menu],2
462
        jne  .menu_4
463
        aimgtoimg menu3,120,300,vscreen,TRANSPARENCY,1
464
        jmp  .menu_5
950 leency 465
    .menu_4:
4386 hidnplayr 466
        aimgtoimg menu3,120,300,vscreen,TRANSPARENCY,0
950 leency 467
    .menu_5:
4386 hidnplayr 468
        cmp  byte[menu],3
469
        jne  .menu_6
470
        aimgtoimg menu4,150,350,vscreen,TRANSPARENCY,1
471
        jmp  .menu_7
950 leency 472
    .menu_6:
4386 hidnplayr 473
        aimgtoimg menu4,150,350,vscreen,TRANSPARENCY,0
950 leency 474
    .menu_7:
475
 
4386 hidnplayr 476
        cmp  word[intro],200
477
        je   .menu_75
478
        inc  word[intro]
950 leency 479
 
480
    .menu_75:
4386 hidnplayr 481
        cmp  word[intro],0
482
        jl   .menu_8
483
        aimgtoimg enemy1,390,180,vscreen,TRANSPARENCY,0
950 leency 484
 
4386 hidnplayr 485
        cmp  word[intro],15
486
        jl   .menu_8
487
        mov  esi,points_50
488
        mov  ebx,470
489
        mov  ecx,180
490
        call printtext
950 leency 491
 
4386 hidnplayr 492
        cmp  word[intro],30
493
        jl   .menu_8
494
        aimgtoimg enemy2,390,220,vscreen,TRANSPARENCY,0
950 leency 495
 
4386 hidnplayr 496
        cmp  word[intro],45
497
        jl   .menu_8
498
        mov  esi,points_100
499
        mov  ebx,450
500
        mov  ecx,220
501
        call printtext
950 leency 502
 
4386 hidnplayr 503
        cmp  word[intro],60
504
        jl   .menu_8
505
        aimgtoimg enemy3,390,260,vscreen,TRANSPARENCY,0
950 leency 506
 
4386 hidnplayr 507
        cmp  word[intro],75
508
        jl   .menu_8
509
        mov  esi,points_150
510
        mov  ebx,450
511
        mov  ecx,260
512
        call printtext
950 leency 513
 
4386 hidnplayr 514
        cmp  word[intro],90
515
        jl   .menu_8
516
        aimgtoimg enemy4,390,300,vscreen,TRANSPARENCY,0
950 leency 517
 
4386 hidnplayr 518
        cmp  word[intro],105
519
        jl   .menu_8
520
        mov  esi,points_200
521
        mov  ebx,450
522
        mov  ecx,300
523
        call printtext
950 leency 524
 
4386 hidnplayr 525
        cmp  word[intro],120
526
        jl   .menu_8
527
        aimgtoimg enemy5,390,340,vscreen,TRANSPARENCY,0
950 leency 528
 
4386 hidnplayr 529
        cmp  word[intro],135
530
        jl   .menu_8
531
        mov  esi,points_250
532
        mov  ebx,450
533
        mov  ecx,340
534
        call printtext
950 leency 535
 
4386 hidnplayr 536
        cmp  word[intro],150
537
        jl   .menu_8
538
        aimgtoimg alien,380,380,vscreen,TRANSPARENCY,0
950 leency 539
 
4386 hidnplayr 540
        cmp  word[intro],165
541
        jl   .menu_8
542
        mov  esi,points_1000
543
        mov  ebx,430
544
        mov  ecx,380
545
        call printtext
950 leency 546
 
547
    .menu_8:
4386 hidnplayr 548
        ret
950 leency 549
@@:
550
    cmp  byte[status],5 ;highscorelist
551
    jne  @f
552
 
4386 hidnplayr 553
        aimgtoimg highscore,60,40,vscreen,TRANSPARENCY,0
950 leency 554
 
4386 hidnplayr 555
        mov  ebx,100                ; print names
556
        mov  ecx,120
557
        mov  esi,gif_hash_area
558
        call printtext
950 leency 559
 
4386 hidnplayr 560
        mov  edi,gif_hash_area+100  ; print scores
561
        mov  esi,scorenumb
562
        mov  ebx,420
563
        mov  ecx,120
950 leency 564
 
565
.highscoreloop:
4386 hidnplayr 566
        mov  eax,[edi]
567
        push ecx
568
        call convertscore
569
        pop  ecx
570
        push esi
571
        call printtext
572
        pop  esi
573
        add  ecx,26
574
        add  edi,4
575
        cmp  edi,gif_hash_area+140
576
        jl  .highscoreloop
950 leency 577
 
578
@@:
579
    cmp  byte[status],7 ;highscore
580
    jne  @f
581
 
4386 hidnplayr 582
        aimgtoimg highscore,60,40,vscreen,TRANSPARENCY,0
950 leency 583
 
4386 hidnplayr 584
        mov  ebx,60
585
        mov  ecx,200
586
        mov  esi,entername
587
        call printtext
950 leency 588
 
4386 hidnplayr 589
        mov  ebx,250
590
        mov  ecx,250
591
        mov  esi,name
592
        call printtext
950 leency 593
 
4386 hidnplayr 594
        mov  esi,scoretext
595
        mov  ebx,0
596
        mov  ecx,SCREEN_Y-24
597
        call printtext
950 leency 598
 
4386 hidnplayr 599
        mov  esi,leveltext
600
        mov  ebx,300
601
        call printtext
950 leency 602
@@:
603
 
604
    ret
605
 
606
 
607
drawenemys:
608
; check if direction should change
4386 hidnplayr 609
        test byte[enemy_d],2
610
        jz   @f
950 leency 611
 
4386 hidnplayr 612
        add  dword[enemy_y],5
950 leency 613
 
4386 hidnplayr 614
        mov  eax,[enemy_y]
615
        shr  eax,5
616
        add  al, byte[level]
617
        mov  byte[enemy_speed],al
950 leency 618
 
4386 hidnplayr 619
        and  byte[enemy_d],1
950 leency 620
 
621
       @@:
622
; move the aliens to left or right
4386 hidnplayr 623
        movzx eax,byte[enemy_speed]
624
        test byte[enemy_d],1
625
        jz   other_dir
950 leency 626
 
4386 hidnplayr 627
        sub  dword[enemy_x],eax
628
        jmp  no_other_dir
950 leency 629
 
630
     other_dir:
4386 hidnplayr 631
        add  dword[enemy_x],eax
950 leency 632
     no_other_dir:
633
 
634
; initialization
4386 hidnplayr 635
        mov  byte[alldeadb],1
636
        mov  edi,enemy_table
637
        mov  eax,dword[enemy_x]
638
        mov  dword[current_enemy_x],eax
639
        mov  eax,dword[enemy_y]
640
        mov  dword[current_enemy_y],eax
950 leency 641
 
642
     loopit:
4386 hidnplayr 643
        cmp  byte[edi],1
644
        je   drawenemy1
950 leency 645
 
4386 hidnplayr 646
        cmp  byte[edi],2
647
        je   drawenemy2
950 leency 648
 
4386 hidnplayr 649
        cmp  byte[edi],3
650
        je   drawenemy3
950 leency 651
 
4386 hidnplayr 652
        cmp  byte[edi],4
653
        je   drawenemy4
950 leency 654
 
4386 hidnplayr 655
        cmp  byte[edi],5
656
        je   drawenemy5
950 leency 657
 
4386 hidnplayr 658
        jmp  dead_alien
950 leency 659
 
660
     drawenemy1:
4386 hidnplayr 661
        mov  byte[alldeadb],0
662
        pusha
663
        aimgtoimg enemy1,dword[current_enemy_x],dword[current_enemy_y],vscreen,TRANSPARENCY,0
664
        popa
950 leency 665
 
4386 hidnplayr 666
        jmp  checknext
950 leency 667
 
668
     drawenemy2:
4386 hidnplayr 669
        mov  byte[alldeadb],0
670
        pusha
671
        aimgtoimg enemy2,dword[current_enemy_x],dword[current_enemy_y],vscreen,TRANSPARENCY,0
672
        popa
950 leency 673
 
4386 hidnplayr 674
        jmp  checknext
950 leency 675
 
676
     drawenemy3:
4386 hidnplayr 677
        mov  byte[alldeadb],0
678
        pusha
679
        aimgtoimg enemy3,dword[current_enemy_x],dword[current_enemy_y],vscreen,TRANSPARENCY,0
680
        popa
950 leency 681
 
4386 hidnplayr 682
        jmp  checknext
950 leency 683
 
684
     drawenemy4:
4386 hidnplayr 685
        mov  byte[alldeadb],0
686
        pusha
687
        aimgtoimg enemy4,dword[current_enemy_x],dword[current_enemy_y],vscreen,TRANSPARENCY,0
688
        popa
950 leency 689
 
4386 hidnplayr 690
        jmp  checknext
950 leency 691
 
692
     drawenemy5:
4386 hidnplayr 693
        mov  byte[alldeadb],0
694
        pusha
695
        aimgtoimg enemy5,dword[current_enemy_x],dword[current_enemy_y],vscreen,TRANSPARENCY,0
696
        popa
950 leency 697
 
698
;        jmp  checknext
699
 
700
     checknext:
4386 hidnplayr 701
        cmp  byte[enemy_d],2
702
        jge  dont_change_dir
950 leency 703
 
4386 hidnplayr 704
           movzx eax,byte[enemy_speed]
950 leency 705
 
4386 hidnplayr 706
           cmp  byte[enemy_d],0
707
           jbe  change_dir
950 leency 708
 
4386 hidnplayr 709
           cmp  dword[current_enemy_x],eax
710
           jg   dont_change_dir
950 leency 711
 
4386 hidnplayr 712
           mov  byte[enemy_d],2
950 leency 713
 
4386 hidnplayr 714
           jmp  dont_change_dir
950 leency 715
 
4386 hidnplayr 716
        change_dir:
717
           mov  ebx, SCREEN_X-ENEMY_X
718
           sub  ebx, eax
719
           cmp  dword[current_enemy_x],ebx
720
           jl   dont_change_dir
950 leency 721
 
4386 hidnplayr 722
           mov  byte[enemy_d],3
950 leency 723
 
4386 hidnplayr 724
        dont_change_dir:
725
           cmp  dword[current_enemy_y],SHIP_Y_POS-ENEMY_Y-BOUNDARY
726
           je   gameover_
950 leency 727
 
728
     dead_alien:
4386 hidnplayr 729
        cmp  edi,enemy_table+20
730
        jge  alldead
950 leency 731
 
4386 hidnplayr 732
        inc  edi
733
        add  dword[current_enemy_x],ENEMY_X+BOUNDARY
734
        mov  eax,dword[current_enemy_x]
735
        sub  eax,dword[enemy_x]
736
        cmp  eax,5*(ENEMY_X+BOUNDARY)
737
        jl   no_newline
950 leency 738
 
4386 hidnplayr 739
        sub  dword[current_enemy_x],5*(ENEMY_X+BOUNDARY)
740
        add  dword[current_enemy_y],ENEMY_Y+BOUNDARY
950 leency 741
      no_newline:
4386 hidnplayr 742
        jmp  loopit
950 leency 743
 
744
     alldead:
4386 hidnplayr 745
        cmp  byte[alldeadb],0
746
        je   enemy_end
950 leency 747
 
4386 hidnplayr 748
        mov  byte[status],6
749
        jmp  mainloop
950 leency 750
 
751
     enemy_end:
752
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4386 hidnplayr 753
        cmp  dword[alien_x],5                                                     ;
754
        jge  @f
950 leency 755
 
4386 hidnplayr 756
        call random_generator
757
        cmp  eax,0xffffffff/50 ; one out of 500 chances that it appears during this frame
758
        jl   alien_end
950 leency 759
 
4386 hidnplayr 760
        mov  dword [alien_x],SCREEN_X-ALIEN_X
950 leency 761
 
762
       @@:
4386 hidnplayr 763
        push  eax
950 leency 764
 
4386 hidnplayr 765
        mov  eax, SCREEN_X                                                                                                                                                                                                                                 ;        mov  eax, SCREEN_X
766
        sub  eax, dword [alien_x]
950 leency 767
 
4386 hidnplayr 768
        cmp  eax, ALIEN_X
769
        jle  @f
770
        mov  eax, ALIEN_X
950 leency 771
       @@:
772
 
4386 hidnplayr 773
        getimg alien,0,0,10,ALIEN_Y,alienpiece
774
        aimgtoimg alien,dword [alien_x],ALIEN_Y_POS,vscreen,TRANSPARENCY,0
775
        sub  dword[alien_x],5                                                     ;
776
                                                                                  ;
777
        pop  eax                                                                  ;
778
                                                                                  ;
779
      alien_end:                                                                  ;
780
                                                                                  ;
950 leency 781
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4386 hidnplayr 782
        ret
950 leency 783
 
784
drawbullet:
4386 hidnplayr 785
        cmp  dword[bullet_y],BULLETSPEED
786
        jl   nobullet
787
        sub  dword[bullet_y],BULLETSPEED
950 leency 788
 
4386 hidnplayr 789
        aimgtoimg bullet,dword[bullet_x],dword[bullet_y],vscreen,TRANSPARENCY,0
950 leency 790
 
791
      nobullet:
4386 hidnplayr 792
        ret
950 leency 793
 
794
checkbullet:
4386 hidnplayr 795
        cmp  dword[bullet_y],BULLETSPEED                              ; does the bullet hit top of the screen?
796
        jle  hidebullet                                               ; yes, hide bullet
950 leency 797
 
798
;        ; check if bullet is inside the enemy field (you can disble this if you want)
799
;        mov  eax,dword[enemy_y]
800
;        cmp  dword[bullet_y],eax
801
;        jl   nohit
802
;
803
;        add  eax,4*(ENEMY_Y+BOUNDARY)
804
;        cmp  dword[bullet_y],eax
805
;        jg   nohit
806
;
807
;        mov  eax,dword[enemy_x]
808
;        cmp  dword[bullet_x],eax
809
;        jl   nohit
810
;
811
;        add  eax,5*(ENEMY_Y+BOUNDARY)
812
;        cmp  dword[bullet_x],eax
813
;        jg   nohit
814
;
4386 hidnplayr 815
        mov  edi,enemy_table
816
        mov  eax,dword[enemy_x]
817
        mov  dword[current_enemy_x],eax
818
        mov  eax,dword[enemy_y]
819
        mov  dword[current_enemy_y],eax
950 leency 820
 
821
       check:
4386 hidnplayr 822
        cmp  byte[edi],0                 ; is the enemy at this position alive?
823
        je   nextcheck                   ; no, try next enemy
824
        ; check if bullet hits current enemy
950 leency 825
 
4386 hidnplayr 826
        mov  eax,dword[current_enemy_y]  ; move the enemy y position into eax
827
        cmp  dword[bullet_y],eax         ; is the bullet's y position less than eax (enemy y pos)
828
        jl   nextcheck                   ; yes, bullet can't be colliding, check next enemy
950 leency 829
 
4386 hidnplayr 830
        add  eax,ENEMY_Y                 ; add the width of the enemy to the enemy's y position (wich is still stored in eax)
831
        cmp  dword[bullet_y],eax         ; is the bullet's y position greater than eax (the end of the enemy)
832
        jg   nextcheck                   ; yes, bullet can't be colliding, check next enemy
950 leency 833
 
4386 hidnplayr 834
        mov  eax,dword[current_enemy_x]  ; now do the same but for the x positions
835
        cmp  dword[bullet_x],eax         ;
836
        jl   nextcheck                   ;
837
                                         ;
838
        add  eax,ENEMY_Y                 ;
839
        cmp  dword[bullet_x],eax         ;
840
        jg   nextcheck                   ;
950 leency 841
 
4386 hidnplayr 842
        jmp  hit
950 leency 843
 
844
      nextcheck:
4386 hidnplayr 845
        inc  edi
846
        add  dword[current_enemy_x],ENEMY_X+BOUNDARY
847
        mov  eax,dword[current_enemy_x]
848
        sub  eax,dword[enemy_x]
849
        cmp  eax,5*(ENEMY_X+BOUNDARY)
850
        jl   no_newline_
950 leency 851
 
4386 hidnplayr 852
        sub  dword[current_enemy_x],5*(ENEMY_X+BOUNDARY)
853
        add  dword[current_enemy_y],ENEMY_Y+BOUNDARY
950 leency 854
      no_newline_:
855
 
4386 hidnplayr 856
        cmp  edi,enemy_table+20         ; is this the last enemy?
857
        jg   nohit                      ; yes, none of them was hit
858
        jmp  check                      ; no, check if enemy is alive and draw it
950 leency 859
 
860
      hit:
4386 hidnplayr 861
        movzx ebx,byte[edi]             ; mov the enemy number onto ebx
862
        add  dword[score],ebx           ; add this number to the score dword
950 leency 863
 
4386 hidnplayr 864
        mov  eax,[score]
865
        call convertscore
950 leency 866
 
4386 hidnplayr 867
        mov  byte[edi],0                ; hide the enemy
950 leency 868
     hidebullet:
4386 hidnplayr 869
        mov  dword[bullet_y],1          ; mov the bullet to top of screen (hide it)
870
        jmp  noalienhit
950 leency 871
 
872
     nohit:
4386 hidnplayr 873
        mov  eax,[alien_x]              ; check if we hit the big alien in the ufo
874
        cmp  [bullet_x],eax
875
        jl   noalienhit
876
        add  eax,ALIEN_X-BULLET_X
877
        cmp  [bullet_x],eax
878
        jg   noalienhit
879
        cmp  [bullet_y],ALIEN_Y_POS+ALIEN_Y
880
        jg   noalienhit
950 leency 881
 
4386 hidnplayr 882
        add  dword[score],100/5
883
        mov  eax,[score]
884
        call convertscore
950 leency 885
 
4386 hidnplayr 886
        mov  [alien_x],0
950 leency 887
 
888
     noalienhit:
889
 
890
ret
891
 
892
convertscore:
4386 hidnplayr 893
        test al,1
894
        jz   .1
895
        mov  byte[scorenumb+5],'5'
896
        jmp  .2
950 leency 897
.1:
4386 hidnplayr 898
        mov  byte[scorenumb+5],'0'
950 leency 899
.2:
4386 hidnplayr 900
        shr  eax,1
901
        mov  ecx,10
902
        xor  edx,edx
903
        div  ecx
904
        add  dl,'0'
905
        mov  byte[scorenumb+4],dl
906
        xor  edx,edx
907
        div  ecx
908
        add  dl,'0'
909
        mov  byte[scorenumb+3],dl
910
        xor  edx,edx
911
        div  ecx
912
        add  dl,'0'
913
        mov  byte[scorenumb+2],dl
914
        xor  edx,edx
915
        div  ecx
916
        add  dl,'0'
917
        mov  byte[scorenumb+1],dl
918
        xor  edx,edx
919
        div  ecx
920
        add  dl,'0'
921
        mov  byte[scorenumb+0],dl
950 leency 922
 
923
ret
924
 
925
 
926
fillscreen: ; eax - screen color ( 0x00RRGGBB )
927
 
4386 hidnplayr 928
        mov  edi,vscreen+8
929
        cld
930
        mov  ecx,SCREEN_X*SCREEN_Y
950 leency 931
    .lab1:
4386 hidnplayr 932
        mov  [edi],eax
933
        add  edi,3
934
        loop .lab1
950 leency 935
 
4386 hidnplayr 936
        ret
950 leency 937
 
938
 
939
printtext:
4386 hidnplayr 940
        push  ebx
950 leency 941
 
942
     loadbyte:
4386 hidnplayr 943
        movzx eax, byte[esi]
944
        test  eax, eax
945
        jnz   checkbyte
950 leency 946
 
4386 hidnplayr 947
        pop   ebx
950 leency 948
 
4386 hidnplayr 949
        ret
950 leency 950
 
951
    checkbyte:
4386 hidnplayr 952
        cmp  al,13
953
        je   nextline
954
        cmp  al,' '
955
        je   space
950 leency 956
 
4386 hidnplayr 957
        cmp  al,'0'
958
        jl   nextchar
959
        cmp  al,'9'
960
        jle  usenumbers
950 leency 961
 
4386 hidnplayr 962
        cmp  al,'z'
963
        jg   nextchar
964
        cmp  al,'a'
965
        jge  usesmallfont
950 leency 966
 
4386 hidnplayr 967
        cmp  al,'Z'
968
        jg   nextchar
969
        cmp  al,'A'
970
        jge  usebigfont
950 leency 971
 
4386 hidnplayr 972
        jmp  nextchar
950 leency 973
 
974
 
975
    usesmallfont:
4386 hidnplayr 976
        mov  edx,eax
977
        sub  edx,'a'
978
        mov  eax,12
979
        mul  edx
980
        mov  edx,eax
950 leency 981
 
4386 hidnplayr 982
        pusha
983
        getimg smallfont,0,edx,20,12,char
984
        popa
950 leency 985
 
4386 hidnplayr 986
        pusha
987
        add  ecx,4
988
        aimgtoimg char,ebx,ecx,vscreen,TRANSPARENCY,0
989
        popa
950 leency 990
 
4386 hidnplayr 991
        add  ebx,20
950 leency 992
 
4386 hidnplayr 993
        jmp  nextchar
950 leency 994
 
995
    usebigfont:
4386 hidnplayr 996
        mov  edx,eax
997
        sub  edx,'A'
998
        mov  eax,20
999
        mul  edx
1000
        mov  edx,eax
950 leency 1001
 
4386 hidnplayr 1002
        pusha
1003
        getimg bigfont,0,edx,28,20,char
1004
        popa
950 leency 1005
 
4386 hidnplayr 1006
        pusha
1007
        aimgtoimg char,ebx,ecx,vscreen,TRANSPARENCY,0
1008
        popa
950 leency 1009
 
4386 hidnplayr 1010
        add  ebx,28
950 leency 1011
 
4386 hidnplayr 1012
        jmp  nextchar
950 leency 1013
 
1014
    usenumbers:
4386 hidnplayr 1015
        mov  edx,eax
1016
        sub  edx,'0'
1017
        mov  eax,20
1018
        mul  edx
1019
        mov  edx,eax
950 leency 1020
 
4386 hidnplayr 1021
        pusha
1022
        getimg numbers,0,edx,16,20,char
1023
        popa
950 leency 1024
 
4386 hidnplayr 1025
        pusha
1026
        aimgtoimg char,ebx,ecx,vscreen,TRANSPARENCY,0
1027
        popa
950 leency 1028
 
4386 hidnplayr 1029
        add  ebx,20
950 leency 1030
 
4386 hidnplayr 1031
        jmp  nextchar
950 leency 1032
 
1033
    space:
4386 hidnplayr 1034
        add  ebx,20
950 leency 1035
 
1036
    nextchar:
4386 hidnplayr 1037
        inc  esi
950 leency 1038
 
4386 hidnplayr 1039
        jmp  loadbyte
950 leency 1040
 
1041
    nextline:
4386 hidnplayr 1042
        pop  ebx
1043
        push ebx
1044
        add  ecx,26
1045
        inc  esi
950 leency 1046
 
4386 hidnplayr 1047
        jmp  loadbyte
950 leency 1048
 
1049
gameover_:
1050
    mov  byte[status],2
1051
 
1052
    ret
1053
 
1054
 
1055
drawstars:
1056
    mov   esi, STARS
1057
 
1058
.loop:
1059
    cmp   esi, STARS+(STARS_*5)
1060
    jge   .done
1061
 
1062
    movzx eax, byte[esi]    ; z (speed, brightness)
1063
    movzx ebx, word[esi+1]  ; x
1064
    movzx ecx, word[esi+3]  ; y
1065
    add   bx , ax
1066
    cmp   bx , SCREEN_X
4386 hidnplayr 1067
    jl    .moveit
950 leency 1068
 
1069
    xor   ebx,ebx
1070
    inc   ebx
1071
 
1072
    call  random_generator
1073
    mov   ecx, [generator]
1074
    and   ecx, SCREEN_Y-1
1075
    inc   ecx
1076
    mov   word[esi+3],cx
1077
 
1078
    call  random_generator
1079
    and   al, STARLEVELS
1080
    test  al,al
1081
    jnz   @f
1082
    inc   al
1083
   @@:
1084
    mov   [esi],al
1085
 
1086
.moveit:
1087
    mov   word [esi+1],bx
1088
 
1089
    movzx eax, byte[esi]
1090
    inc   eax
1091
    mov   edx, 0xff/(STARLEVELS+1)
1092
    mul   edx
1093
 
1094
    mov   ah,al
1095
    shl   eax,8
1096
    mov   al,ah
1097
    mov   ebp, eax
1098
 
1099
    mov   eax, SCREEN_X
1100
    mul   ecx
1101
    add   eax, ebx
1102
    mov   edx, 3
1103
    mul   edx
1104
 
1105
    cmp   eax, SCREEN_X*SCREEN_Y*3
4386 hidnplayr 1106
    jg    @f
950 leency 1107
    add   eax, vscreen+8
1108
    and   dword[eax],0xff000000
4386 hidnplayr 1109
    or    dword[eax],ebp
950 leency 1110
   @@:
1111
 
1112
    add   esi, 5
1113
    jmp   .loop
1114
.done:
1115
 
1116
    ret
1117
 
1118
 
1119
createstars:
1120
 
1121
    mov   ebx, STARS
1122
.loop:
1123
    cmp   ebx, STARS+(STARS_*5)
1124
    jge   .done
1125
 
1126
    call  random_generator
1127
    and   al, STARLEVELS
1128
    test  al,al
1129
    jnz   @f
1130
    inc   al
1131
   @@:
1132
    mov   byte[ebx],al
1133
 
1134
    call  random_generator
1135
    and   eax, SCREEN_X-1
1136
    inc   eax
1137
    mov   word[ebx+1],ax
1138
 
1139
    call  random_generator
1140
    and   eax, SCREEN_Y-1
1141
    inc   eax
1142
    mov   word[ebx+3],ax
1143
 
1144
    add   ebx, 5
1145
    jmp   .loop
1146
.done:
1147
 
1148
    ret
1149
 
1150
 
1151
random_generator:  ; (pseudo random, actually :)
1152
 
1153
    xor   eax,[generator]
1154
    imul  eax,214013
1155
    xor   eax,0xdeadbeef
1156
    rol   eax,9
1157
    mov   [generator],eax
1158
    ror   eax,16
1159
    and   eax,0x7fff
1160
 
1161
    ret
1162
 
1163
 
1164
 
1165
 
1166
level1:
1167
db 4,4,4,4,4
1168
db 3,3,3,3,3
1169
db 2,2,2,2,2
1170
db 1,1,1,1,1
1171
 
1172
level2:
1173
db 4,1,3,1,4
1174
db 4,3,2,3,4
1175
db 0,4,1,4,0
1176
db 0,0,2,0,0
1177
 
1178
level3:
1179
db 1,5,5,5,1
1180
db 1,2,2,2,1
1181
db 3,1,2,1,3
1182
db 4,3,1,3,4
1183
 
1184
level4:
1185
db 4,5,2,5,4
1186
db 5,3,3,3,5
1187
db 4,5,4,5,4
1188
db 1,5,5,5,1
1189
 
1190
level5:
1191
db 5,4,3,4,5
1192
db 5,4,4,4,5
1193
db 4,5,4,5,4
1194
db 3,5,1,5,3
1195
 
1196
level6:
1197
db 1,2,5,4,5
1198
db 5,4,5,2,1
1199
db 1,2,5,4,5
1200
db 1,1,5,1,1
1201
 
1202
level7:
1203
db 1,2,3,2,1
1204
db 1,3,3,3,1
1205
db 3,4,3,4,3
1206
db 5,5,5,5,5
1207
 
1208
level8:
1209
db 1,2,3,4,5
1210
db 3,5,3,5,4
1211
db 4,2,3,2,3
1212
db 5,4,3,2,1
1213
 
1214
enemy_table:
1215
db 0,0,0,0,0
1216
db 0,0,0,0,0
1217
db 0,0,0,0,0
1218
db 0,0,0,0,0
1219
 
1220
 
4386 hidnplayr 1221
msg1            db 'Vesa mode not supported',13,'Press any key to exit.',13,0
1222
msgAbout        db 'Hidnplayrs invaders',13,'KolibriOS version',13,13,'released under GPL',13,'make this game better',13,'if you want to',0
1223
msgdone         db 'You have saved the planet!',0
1224
entername       db 'Enter your name highscorer!',0
1225
highscorefile   db 'invaders.dat',0
1226
points_50       db '5 pt',0
1227
points_100      db '10 pt',0
1228
points_150      db '15 pt',0
1229
points_200      db '20 pt',0
1230
points_250      db '25 pt',0
1231
points_1000     db '100 pt',0
1232
ship_x          dd SHIP_X_POS
1233
enemy_x         dd 0
1234
enemy_y         dd 0
1235
enemy_d         db 0
950 leency 1236
current_enemy_x dd 0
1237
current_enemy_y dd 0
4386 hidnplayr 1238
bullet_x        dd 0
1239
bullet_y        dd 1
1240
score           dd 0
1241
alldeadb        db 0
1242
status          db 0        ; status: 0=menu  1=game  2=gameover   3=paused  4=about 5=highscorelist 6=levelup 7=highscore...
1243
menu            db 0        ; menu:   0=start 1=about 2=highscores 3=exit...
1244
generator       dd 0x45dd4d15
1245
alien_x         dd 0
1246
drawroutine     dd 0
1247
returnaddr      dd 0
1248
intro           dw 0
1249
scoretext       db 'score '
1250
scorenumb       db 0,0,0,0,0,0,0
1251
leveltext       db 'level '
1252
levelnumb       db 0,0,0
1253
lives           db 0
1254
level           db 1
1255
enemy_speed     db 1
1256
namepos         db 0
1257
name            db 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x0d,0x00
950 leency 1258
 
1259
 
1260
gif_bullet    file 'bullet2.gif'
1261
rb 4
1262
 
1263
gif_bullet2   file 'bullet2.gif'
1264
rb 4
1265
 
1266
gif_ship      file 'ship.gif'
1267
rb 4
1268
 
1269
gif_enemy1    file 'enemy1.gif'
1270
rb 4
1271
 
1272
gif_enemy2    file 'enemy2.gif'
1273
rb 4
1274
 
1275
gif_enemy3    file 'enemy3.gif'
1276
rb 4
1277
 
1278
gif_enemy4    file 'enemy4.gif'
1279
rb 4
1280
 
1281
gif_enemy5    file 'enemy5.gif'
1282
rb 4
1283
 
1284
gif_alien     file 'alien.gif'
1285
rb 4
1286
 
1287
gif_menu1     file 'menu1.gif'
1288
rb 4
1289
 
1290
gif_menu2     file 'menu2.gif'
1291
rb 4
1292
 
1293
gif_menu3     file 'menu3.gif'
1294
rb 4
1295
 
1296
gif_menu4     file 'menu4.gif'
1297
rb 4
1298
 
1299
gif_logo      file 'logo.gif'
1300
rb 4
1301
 
1302
gif_pause     file 'pause.gif'
1303
rb 4
1304
 
1305
gif_highscore file 'highscores.gif'
1306
rb 4
1307
 
1308
gif_smallfont file 'font_small.gif'
1309
rb 4
1310
 
1311
gif_bigfont   file 'font_capital.gif'
1312
rb 4
1313
 
1314
gif_numbers   file 'numbers.gif'
1315
rb 4
1316
 
1317
gif_levelup   file 'nextlevel.gif'
1318
rb 4
1319
 
1320
gif_gameover  file 'gameover.gif'
1321
rb 4
1322
 
1323
vscreen:
1324
dd SCREEN_X
1325
dd SCREEN_Y
1326
rb SCREEN_X*SCREEN_Y*3+10
1327
 
1328
IM_END:
1329
 
1330
STARS:
1331
rb STARS_*5
1332
 
1333
bullet:
1334
rb BULLET_X*BULLET_Y*3+8+10
1335
 
1336
bullet2:
1337
rb BULLET_X*BULLET_Y*3+8+10
1338
 
1339
ship:
1340
rb SHIP_X*SHIP_Y*3+10
1341
 
1342
enemy1:
1343
rb ENEMY_X*ENEMY_Y*3+10
1344
 
1345
enemy2:
1346
rb ENEMY_X*ENEMY_Y*3+10
1347
 
1348
enemy3:
1349
rb ENEMY_X*ENEMY_Y*3+10
1350
 
1351
enemy4:
1352
rb ENEMY_X*ENEMY_Y*3+10
1353
 
1354
enemy5:
1355
rb ENEMY_X*ENEMY_Y*3+10
1356
 
1357
alien:
1358
rb ALIEN_X*ALIEN_Y*3+10
1359
 
1360
menu1:
1361
rb 220*18*3+10
1362
 
1363
menu2:
1364
rb 135*18*3+10
1365
 
1366
menu3:
1367
rb 245*18*3+10
1368
 
1369
menu4:
1370
rb 110*18*3+10
1371
 
1372
logo:
1373
rb 40*540*3+10
1374
 
1375
pause_:
1376
rb 40*320*3+10
1377
 
1378
levelup:
1379
rb 40*320*3+10
1380
 
1381
gameover:
1382
rb 40*320*3+10
1383
 
1384
highscore:
1385
rb 40*530*3+10
1386
 
1387
smallfont:
1388
rb 20*312*3+10
1389
 
1390
bigfont:
1391
rb 28*520*3+10
1392
 
1393
numbers:
1394
rb 16*200*3+10
1395
 
1396
char:
1397
rb 28*20*3+20 ; biggest char's are 28x20
1398
 
1399
alienpiece:
1400
rb ALIEN_X*ALIEN_Y*3+20
1401
 
1402
gif_hash_area:
4386 hidnplayr 1403
rd 4096+1                          ;hash area size for unpacking GIF
950 leency 1404
 
1405
I_END:
1406
 
1407
;include 'dex.inc'
1408