Subversion Repositories Kolibri OS

Rev

Rev 3485 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3485 Rev 7458
Line 141... Line 141...
141
;   ******* VIRTUAL SCREEN FUNCTIONS ************
141
;   ******* VIRTUAL SCREEN FUNCTIONS ************
142
;   *********************************************
142
;   *********************************************
Line 143... Line 143...
143
 
143
 
144
show_screen:  ; flips the virtual screen to the window
144
show_screen:  ; flips the virtual screen to the window
145
    push_abc
-
 
146
 
-
 
147
    mov  eax,7
-
 
148
    mov  ebx,screen
145
    push_abc	
149
    mov  ecx,X_SIZE*65536+Y_SIZE
-
 
150
    mov  edx,4*65536+20
-
 
151
    mcall
-
 
152
 
146
    mcall 7, screen, , 0
153
    pop_abc
147
    pop_abc
Line 154... Line 148...
154
ret
148
ret
155
 
149
 
Line 393... Line 387...
393
       jne .no_ch  ; if (dl==0)
387
       jne .no_ch  ; if (dl==0)
394
         add  eax,ebx ; change gradient
388
         add  eax,ebx ; change gradient
395
       .no_ch:
389
       .no_ch:
396
       pop ecx
390
       pop ecx
397
    loop .lab1
391
    loop .lab1
-
 
392
	
398
    pop_abc
393
    pop_abc
399
ret
394
ret
Line 400... Line 395...
400
 
395
 
Line 412... Line 407...
412
intro:  ; INTRO    ;
407
intro:  ; INTRO    ;
413
    cmp  [is_rolled_up], 1
408
    cmp  [is_rolled_up], 1
414
    jne  @f
409
    jne  @f
415
    ret
410
    ret
416
  @@:
411
  @@:
-
 
412
  
417
    label 146,200,'ARCANOID II  v0.30',0x100000FF
413
    mcall 4,<115,150>,0x82050505,VERSION
418
    label 120,220,'by jj (jacek jerzy malinowski)',0x050505
414
    mcall  ,<125,180>,0x80050505,AUTHOR
419
    if lang eq it
-
 
420
        label 100,240,'Premi spazio per iniziare una nuova partita',0x10FF0800
-
 
421
    else
-
 
422
        label 100,240,'press SPACE to start a new game',0x10FF0800
-
 
423
    end if
-
 
424
    label 15,240,'F1 + delay',0xFFA8FF
415
    mcall  ,<90,210>,0x81EE0800,PRESS_SPACE
425
    label 15,260,'F2 + delay',0xFFA8FF
416
    mcall  ,<50,235>,0x81FFA8FF,CHANGE_SPEED
-
 
417
 
426
    delay 10
418
    delay 10
427
ret
419
ret
Line 428... Line 420...
428
 
420
 
429
;___________________
421
;___________________
430
level_info:
422
level_info:
431
    cmp  [is_rolled_up], 1
423
    cmp  [is_rolled_up], 1
432
    jne  @f
424
    jne  @f
433
    ret
425
    ret
434
  @@:
-
 
435
    if lang eq it
426
  @@:
436
        label 170,230,'L I V E L LO',0x100000FF
-
 
437
    else
427
    mcall 4,<179,210>,0x810000FF,LEVEL
438
        label 170,230,'L E V E L',0x100000FF
-
 
439
    end if
-
 
440
 
-
 
441
 
428
    mcall  ,<100,250>,0x81DD0800,PRESS_SPACE
442
    outcount [level],195,250,0x100000FF,2*65536
-
 
443
    if lang eq it
-
 
444
        label 100,270,'Premi spazio per iniziare il livello',0x10FF0800
-
 
445
    else
-
 
446
        label 100,270,'press SPACE to start the level',0x10FF0800
-
 
447
    end if
429
    outcount [level],195,230,0x10000FF,2*65536
448
    delay 10
430
    delay 10
Line 449... Line 431...
449
ret
431
ret
450
 
432
 
451
;_________________________
433
;_________________________
452
game_over:  ; GAME OVER  ;
434
game_over:  ; GAME OVER  ;
453
    mov  eax,0x00FF00
435
    mov  eax,0x00FF00
454
    mov  ebx,0xFF01
436
    mov  ebx,0xFF01
455
    .g_ok:
437
    .g_ok:
456
    call grad_fill_screen
438
    call grad_fill_screen
457
    call show_screen  ; flips the screen
-
 
458
    label 120,150,'G  A  M  E    O  V  E  R',0x10050505
-
 
459
    if lang eq it
-
 
460
        label 140,200,'Grazie per aver giocato',0x0FFF800
439
    call show_screen  ; flips the screen
461
    else
-
 
462
        label 140,200,'Thanks for playing',0x0FFF800
440
    mcall 4,<100,110>,0x90050505,GAMEOVER
463
    end if
441
    mcall  ,<140,160>,0x80FFF800,THANKS_FOR_PLAYING
Line 464... Line 442...
464
    delay 20
442
	delay 20
Line 489... Line 467...
489
    mov  eax,BACK_CL
467
    mov  eax,BACK_CL
490
    mov  ebx,0xFFFF
468
    mov  ebx,0xFFFF
491
    .g_ok:
469
    .g_ok:
492
    call grad_fill_screen
470
    call grad_fill_screen
Line -... Line 471...
-
 
471
	
-
 
472
    ;black_bg
-
 
473
    ;mov  eax,0
-
 
474
    ;mov  ebx,0
-
 
475
    ;call fill_screen
-
 
476
 
493
 
477
	
494
    mov  eax,37  ; get mouse position
478
    mov  eax,37  ; get mouse position
495
    mov  ebx,1
479
    mov  ebx,1
496
    mcall
480
    mcall
497
    shr  eax,16
481
    shr  eax,16
Line 816... Line 800...
816
 
800
 
Line 817... Line 801...
817
 
801
 
-
 
802
draw_window:
-
 
803
 
818
draw_window:
804
    mcall 12,1
819
 
805
    mcall 48,4
820
    mcall 12,1
806
	lea	ecx, [100*65536+Y_SIZE+4+eax]; [y start] *65536 + [y size] + [skin_height]
821
    mcall 0,<100,X_SIZE+8>,<100,Y_SIZE+21>,0x14ffffff, , VERSION
807
    mcall 0,<100,X_SIZE+9>,,0x74ffffff,,0
822
 
808
	
823
    if lang eq it
809
	mov eax, [lives]
824
        label 200,8,'VITE:',0x10ffffff
810
	add eax, '0'
825
    else
-
 
826
        label 200,8,'LIVES:',0x10ffffff
811
	mov esi, HEADER
Line 827... Line 812...
827
    end if
812
	add esi, 28
828
 
813
	mov [esi], eax
829
    outcount dword [lives],250,8,0x10ffffff,65536
814
    mcall 71,1,HEADER
830
 
815
 
Line 839... Line 824...
839
 
824
 
840
;-----------;####################
825
;-----------;####################
841
; DATA AREA ;####################
826
; DATA AREA ;####################
Line -... Line 827...
-
 
827
;-----------;####################
-
 
828
 
842
;-----------;####################
829
GAMEOVER db 'G  A  M  E    O  V  E  R', 0
-
 
830
HEADER  db 'ARCANOID II          LIVES: ?    ', 0
-
 
831
VERSION db 'ARCANOID II',0
-
 
832
AUTHOR db 'by jj (jacek jerzy malinowski)',0
-
 
833
CHANGE_SPEED db 'F2 dec speed   F3 inc speed',0
-
 
834
 
-
 
835
if lang eq it
-
 
836
THANKS_FOR_PLAYING db 'Grazie per aver giocato', 0
-
 
837
PRESS_SPACE db 'Premi spazio per iniziare',0
-
 
838
LEVEL db 'LIVELLO',0
-
 
839
else
-
 
840
THANKS_FOR_PLAYING db 'Thanks for playing', 0
-
 
841
PRESS_SPACE db 'press SPACE to start',0
Line 843... Line 842...
843
 
842
LEVEL db 'LEVEL',0
Line 844... Line 843...
844
VERSION db 'ARCANOID II', 0
843
end if
845
 
844
 
846
is_rolled_up dd 0
845
is_rolled_up dd 0
847
 
846
 
848
 lives dd 5
847
 lives dd 0
849
 mode dd 0
848
 mode dd 0