-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathmrboom.asm
executable file
·15239 lines (12780 loc) · 355 KB
/
mrboom.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; _________ _________ _________ _________ _________ _________
; ___\______ /___\____ /_____\____ /___\_____ /___\_____ /___\______ /___
; \_ | | _ |_____/\_ ____ _ |/ _ |/ _ | | _/
; |___|___|___|_____| sns |___________|___________|___________|___|___|___|
;==[mr.boom 3.0]=====================================================[1997-99]=
; ? tapis roulants nivo 1
; ? fleches sur le sol pour les bombes kon pousse
%MACS
;NB_JOUEURS_MIN EQU 1
duree_saut EQU 64
duree_mort EQU 32
;ttp EQU 4000 ;emps avant le mode demo (touches pressees ...)
;ttp EQU 40 ;emps avant le mode demo (touches pressees ...)
ttp2 EQU 180 ;temps avant le mode demo (pas de touches pressees)
TRICHE EQU 0
;faire des apocalypse differentes
;version_du_jeu EQU 00110000B ;10110000B
nombre_de_vbl_avant_le_droit_de_poser_bombe2 EQU 60*2
invisibilite_totale EQU 100 ;nombre de résistance apres un choc.
invinsibilite_bonus equ 750 ;nombre vbl de mégaforce apres manger bonus...
duree_match EQU 512 ;001000000000B ;2 minutes
duree_match2 EQU 48 ; 000000110000B ;30 secondes
duree_match4 EQU 512 ;001000000000B ;2 minutes
duree_match3 EQU 256 ;000100000000B ;1 minutes
duree_match5 EQU 304 ; 000100110000B ;1 minutes 30
;+duree_match EQU 512 ;001000000000B ;2 minutes^M
;+duree_match2 EQU 48 ; 000000110000B ;30 secondes^M
;+duree_match4 EQU 512 ;001000000000B ;2 minutes^M
;+duree_match3 EQU 256 ;000100000000B ;1 minutes^M
;+duree_match5 EQU 304 ; 000100110000B ;1 minutes 30^M
;010011B ;001100000000B
time_bouboule equ 5 ;temps pour rotation boules menu
pic_max equ 420 ;durée attente sur gfx de zaac
duree_conta EQU 0800 ;nombre de vbl pour une contamination.
duree_draw2 EQU 500 ;durée du draw game
duree_med2 EQU 1200 ;durée du med cere ;10 secondes...
duree_vic2 EQU 1200 ;durée du vic cere
attente_avant_draw2 equ 100
attente_avant_med2 equ 100
temps_re_menu equ 15
resistance_au_debut_pour_un_dyna equ 0
;----- pour les joueurs...
info1 equ 1
info2 equ 1
info3 equ 210
info4 equ 3
;1,2,3 (normal),4:double...
;ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé
; PMODE/W Assembly Example File #1
;ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé
.386p
;
;extrn ExitProcess : PROC ;procedure to shut down a process
;
;extrn ShowWindow : PROC
;extrn GetModuleHandleA: PROC
;extrn GetForegroundWindow : PROC
;extrn ExitProcess : PROC ;procedure to shut down a process
;extrn GetForegroundWindow : PROC
;extrn SendMessageA : PROC
;extrn IsZoomed : PROC
;extrn ShowWindow : PROC
vbl MACRO
local avbl1
local avbl2
inc dword ptr [changement]
mov dx,3dah
avbl1: in al,dx
test al,8
jne avbl1
avbl2: in al,dx
test al,8
je avbl2
xor eax,eax
xor edx,edx
ENDM
BIGENDIANPATCH MACRO a
local blablablatoto
cmp isbigendian,1
jne blablablatoto
mov bigendianin,a
push eax
mov al,byte ptr [bigendianin]
mov byte ptr [bigendianout+3],al
mov al,byte ptr [bigendianin+1]
mov byte ptr [bigendianout+2],al
mov al,byte ptr [bigendianin+2]
mov byte ptr [bigendianout+1],al
mov al,byte ptr [bigendianin+3]
mov byte ptr [bigendianout+0],al
pop eax
mov a,bigendianout
blablablatoto:
ENDM
PUSHALL MACRO ; Pushes all registers onto stack = 18c
PUSHAD
PUSH DS ES
ENDM
POPALL MACRO ; Pops all registers from stack = 18c
POP ES DS
POPAD
ENDM
actionButtonPushed2 MACRO a
local ok
cmp byte ptr [total_t+ebx+4],1
je ok
cmp byte ptr [total_t+ebx+5],1
je ok
cmp byte ptr [total_t+ebx+6],1
je ok
jmp a
ok:
endm
actionButtonPushed MACRO a
local ok
cmp byte ptr [esi+4],1
je ok
cmp byte ptr [esi+5],1
je ok
cmp byte ptr [esi+6],1
je ok
jmp a
ok:
endm
_TEXT segment use32 dword public 'CODE' ;IGNORE
assume cs:_TEXT,ds:_DATA
start: ;IGNORE
jmp _main
db ' Monsieur Boom ' ; The "WATCOM" string is needed in
; order to run under DOS/4G and WD.
;E db 'envois !!!',10,13,'$'
;a db 'attend... !!!',10,13,'$'
get_all_infos3 MACRO
local donoterasekeyslabel
cmp taille_exe_gonfle,0
je donoterasekeyslabel
PUSHALL
;------------- ;ordy local...
push ds
pop es
mov esi,offset donnee2
mov edi,offset total_t
mov ecx,touches_size
rep movsb
POPALL
donoterasekeyslabel:
ENDM
get_all_infos2 MACRO
local donoterasekeyslabel
cmp taille_exe_gonfle,0
je donoterasekeyslabel
PUSHALL
;------------- ;ordy local...
push ds
pop es
mov esi,offset donnee2
mov edi,offset total_t
mov ecx,touches_size
rep movsb
;------------------
;edi est bien placé...
POPALL
donoterasekeyslabel:
ENDM
num proc near ;entree eax:juska 9999999999
push dx esi
push ebx eax ecx
;mov eax,0543212345
mov ebx,eax
mov esi,offset liste_de_machin
mov ecx,[esi]
errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr:
mov ax,0
rrtetrertertretertterert:
cmp ebx,ecx ;10000
jb reerrereerret
sub ebx,ecx ;10000
inc ax
jmp rrtetrertertretertterert
reerrereerret:
;affchiffre
push ax
push dx
add al,48
mov dl,al
mov ah,2
int 21h
pop ax
pop dx
add esi,4
mov ecx,[esi]
or ecx,ecx
jz reererreer
jmp errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
reererreer:
mov dl,' '
mov ah,2
int 21h
pop ecx eax ebx
pop esi dx
ret
endp
;
;----- aff hexa.
;notreadresse db 4 dup (0FFh) ;netadd
; db 6 dup (0FFh) ;nodeadd
; dw 0FFFFh ;sockette...
aff_adresse proc near ; ds:si sur adresse
push ds es
Pushad
mov cx,10
dds:
call hexa
cmp cx,1
je ertertertertert
mov dl,'.'
cmp cx,9
jne reterertert
mov dl,' '
reterertert:
cmp cx,3
jne reterertertu
mov dl,' '
reterertertu:
mov ah,2
int 21h
loop dds
ertertertertert:
mov dl,10
mov ah,2
int 21h
mov dl,13
mov ah,2
int 21h
popad
pop es ds
ret
aff_adresse endp
hexa proc near ; ds:si sur variable
xor ax,ax
lodsb
push ax
shr ax,4
movzx ebx,ax
mov dl,cs:[trucs+ebx]
mov ah,2
int 21h
pop ax
and al,01111B
movzx ebx,ax
mov dl,cs:[trucs+ebx]
mov ah,2
int 21h
ret
hexa endp
printeax proc near
;-----------------------
; convert the value in EAX to hexadecimal ASCIIs
;-----------------------
mov edi,OFFSET ASCII ; get the offset address
mov cl,8 ; number of ASCII
P1: rol eax,4 ; 1 Nibble (start with highest byte)
mov bl,al
and bl,0Fh ; only low-Nibble
add bl,30h ; convert to ASCII
cmp bl,39h ; above 9?
jna short P2
add bl,7 ; "A" to "F"
P2: mov [edi],bl ; store ASCII in buffer
inc edi ; increase target address
dec cl ; decrease loop counter
jnz P1 ; jump if cl is not equal 0 (zeroflag is not set)
;-----------------------
; Print string
;-----------------------
mov edx,OFFSET ASCII ; DOS 1+ WRITE STRING TO STANDARD OUTPUT
mov ah,9 ; DS:DX->'$'-terminated string
int 21h ; maybe redirected under DOS 2+ for output to file
; (using pipe character">") or output to printer
ret
endp
last_color proc near
PUSHALL
;------------
;dans BX: la couleur k'on veut !!!
;mov bl,0100B ;rouge
;mov bh,10000000B ;indique clignotement
push bx
;mov ax,0b800h
;mov es,ax
;mov ds,ax
push ds
pop es
mov edi,0b8000h
mov esi,0b8000h
;xor di,di
;xor si,si
;-----
mov ah,03h
mov bh,0
int 10h
;dans dh ligne du curseur
dec dh ; car toujours > 1 vu k'on balance apres avoir afficvhé
;movzx edx,dh ;*128
shr dx,8
and edx,255
mov eax,edx
shl edx,7
shl eax,5
add edx,eax
add esi,edx
add edi,edx
mov cx,80
pop bx
nooon:
inc edi
inc esi
lodsb
or al,bh
and al,11110000B
or al,bl
stosb
dec cx
jne nooon
;---------------------------------
POPALL
ret
last_color endp
;sortie: ebx entree ebp...
direction_du_joueur MACRO a
local trrtertyrtytyrtyrrtyRz
local trrtertyrtytyrtyrrtyRzt
local ytrrtertyrtytyrtyrrtyy
local ytrrtertyrtytyrtyrrtyRy
push eax
xor ebx,ebx
mov eax,[touches+ebp]
and eax,127
cmp eax,16
jne trrtertyrtytyrtyrrtyRz
mov ebx,-1*a
trrtertyrtytyrtyrrtyRz:
cmp eax,8
jne trrtertyrtytyrtyrrtyRzt
mov ebx,1*a
trrtertyrtytyrtyrrtyRzt:
cmp eax,00
jne ytrrtertyrtytyrtyrrtyy
mov ebx,32*a
ytrrtertyrtytyrtyrrtyy:
cmp eax,24
jne ytrrtertyrtytyrtyrrtyRy
mov ebx,-32*a
ytrrtertyrtytyrtyrrtyRy:
pop eax
ENDM
;esi: endroit ou on pose la bombe...
;edi: infojoueur du dyna
pose_une_bombe MACRO
local vania
local ttyrrtyrtyrtyrtytyrrtyrtyyrtrty
local erertertrteterert
local nononono_onest_en_recordplay
mov byte ptr [esi],1
;utilise Esi par rapport a truc2 pour gauche/droite.
bruit2 11,34 ;,BLOW_WHAT2 ;bruit de kan on pose une bombe
;"hazard" pour ke les bombes soit pas toutes pareille lors du tri bombe
push eax
mov eax,dword ptr [edi] ;nombre de bombes k'on peut encore poser...
and eax,011B
add byte ptr [esi],al
pop eax
;---------------
dec dword ptr [edi] ;nombre de bombes k'on peut encore poser...
;donnee dw 20,20,277,277,150,200,250,280 ;x du dynablaster
; dw 9,170,9,170,78,98,98,10 ;y du dynablaster
;liste_bombe dd 0 ; nombre de bombes...
; dd 247 dup (0,0,0,0)
;1er: offset de l'infojoeur
;2eme: nombre de tours avant que ca PETE !!!
;3eme:distance par rapport au debut de truc2
;4eme puissance de la bombe. + retardee ou non
;mov ebx,[liste_bombe]
;shl ebx,4 ;*16
;recherche la premiere place de libre !!!
xor ebx,ebx
ttyrrtyrtyrtyrtytyrrtyrtyyrtrty:
cmp dword ptr [liste_bombe+ebx+4+1*4],0 ;indique emplacement non remplis !!!
je erertertrteterert
add ebx,taille_dune_info_bombe
jmp ttyrrtyrtyrtyrtytyrrtyrtyyrtrty
erertertrteterert:
mov edx,dword ptr [edi+4] ;récupere la puissance de la bombe dans
;l'info du joueur...
mov ecx,dword ptr [edi+8] ;récupere la taille de la meiche de la
;bombe dans l'info du joueur...
;mov [nomonster],1
cmp action_replay,0
jne nononono_onest_en_recordplay
cmp twice,1
jne nononono_onest_en_recordplay
shr ecx,1
nononono_onest_en_recordplay:
mov [liste_bombe+ebx+4+2*4],eax ;distance par rapport au debut de truc2
mov word ptr [liste_bombe+ebx+4+3*4],dx ;puissance de la bombe.
;------------------------------------ mouvement de la bombe
;truc_X db 32*0,0,0,0,0,0,0,0,0,0,0,0,0 ;+ ou -...
;truc_Y db 32*0,0,0,0,0,0,0,0,0,0,0,0,0
mov byte ptr [truc_X+eax],0
mov byte ptr [truc_Y+eax],0
mov word ptr [liste_bombe+ebx+4+4*4],0 ;!!!!!!!!!1 ;adder X automatique.
mov word ptr [liste_bombe+ebx+4+4*4+2],0
mov word ptr [liste_bombe+ebx+4+5*4],0 ;adder X
mov word ptr [liste_bombe+ebx+4+5*4+2],0 ;adder Y
;-------------------------------------------------
push ebx
mov ebx,[infojoueur+ebp] ;uniquement s'il y a droit...
mov edx,dword ptr [ebx+4*4]
pop ebx
;---- maladie de la bonbinette ???
cmp word ptr [maladie+ebp],6 ;malade ??? (en general)
jne vania
mov word ptr [liste_bombe+ebx+4+3*4],1 ;puissance de la bombe.
vania:
;------
mov word ptr [liste_bombe+ebx+4+3*4+2],dx ;bombe a retardement ou pas ???
mov [liste_bombe+ebx+4+1*4],ecx ;nombre de tours avant que ca PETE !!!
mov [liste_bombe+ebx+4+0*4],edi ;offset de l'infojoeur
inc dword ptr [liste_bombe]
mov [tribombe2+ebp],0
ENDM
lapinomb MACRO a
local nooooiii
local nooooiii2
local nan_prend_pas_lombre
cmp word ptr [donnee4+4+ebx],-1
je nooooiii2
push ecx ebx
mov ecx,edi
add ecx,ecx
mov ebx,[kel_ombre]
shr ebx,cl
and ebx,1111B
jz nan_prend_pas_lombre
cmp ebx,3
ja nan_prend_pas_lombre
pop ebx ecx
;ombres dw 8 dup (0)
;mov ax,[ombres+edi]
;push ecx ebx
;sub ecx
mov a,[ombres+edi]
add a,8*320
jmp nooooiii
nan_prend_pas_lombre:
pop ebx ecx
nooooiii:
;ca c pour lordre daffichage, pour pas ke 2 dyna se croisent de maniere bizarre
add a,bx
add a,bx
add a,bx
nooooiii2:
ENDM
poussage MACRO ou,xy_adder,xy_x32
local pas_changement_case
local pas_ca___
local stooppppes
local continue_lme_train_train
local stooppppes_pas
local ya_une_bombe_stope_ou_explose
local ttyrrtyrtyrtyrtytyrrtyrtyyrtrty
local nan_pas_de_bombe_ayant_squatte_entre_temps
local erertertrteterert
local fait_pas_peter
local tantpis
local nanana
local reterertertertertterertert
push ebx eax
xor eax,eax
cmp word ptr [liste_bombe+ebp+4+4*4+xy_adder],ou ;adder X automatique.
jne pas_ca___
;************* _il ya a donc une force ki nous pousser a pousser *********
mov ebx,[liste_bombe+ebp+4+2*4] ;offset dans truc
cmp word ptr [liste_bombe+ebp+4+5*4+xy_adder],0 ; on est au milieu ???
; changement possible
jne continue_lme_train_train ;
cmp byte ptr [truc+ebx+(ou*xy_x32)],66 ;ya du dur rebondissant a cote ?
jne reterertertertertterertert
neg word ptr [liste_bombe+ebp+4+4*4+xy_adder]
bruit2b 3,45
jmp continue_lme_train_train
reterertertertertterertert:
cmp byte ptr [truc+ebx+(ou*xy_x32)],0 ;ya du dur a cote ?
jne stooppppes
cmp byte ptr [truc_monstre+ebx],'' ;stoppe si on est sur un dyna/monstre..
je stooppppes
cmp byte ptr [truc2+ebx+(ou*xy_x32)],0 ;ya du dur a cote ?
je stooppppes_pas
cmp byte ptr [truc2+ebx+(ou*xy_x32)],5 ;ya du dur a cote ?
jb ya_une_bombe_stope_ou_explose
cmp byte ptr [truc2+ebx+(ou*xy_x32)],54 ;ya du dur a cote ?
ja stooppppes
stooppppes_pas:
jmp continue_lme_train_train
ya_une_bombe_stope_ou_explose:
;***************** CHOC EVENTUEL AVEC UNE BOMBE 50% ******************************
;---------- recherche la bombe... pour la faire eventuellement peter.
;fait un diiiing (chok entre deux bombes)
;bruit3 6 30 BLOW_WHAT2
push esi ebx
mov esi,ebx
add esi,ou*xy_x32
xor ebx,ebx
ttyrrtyrtyrtyrtytyrrtyrtyyrtrty:
cmp dword ptr [liste_bombe+ebx+4+2*4],esi ;regarde si ya une bombe a cet endroit
je erertertrteterert
add ebx,taille_dune_info_bombe
jmp ttyrrtyrtyrtyrtytyrrtyrtyyrtrty
erertertrteterert:
;fait peter ke si elle bouge...
cmp word ptr [liste_bombe+ebx+4+4*4],0
jne tantpis
cmp word ptr [liste_bombe+ebx+4+4*4+2],0
je fait_pas_peter
tantpis:
mov dword ptr [liste_bombe+ebx+4+1*4],1 ;fait peter la bombe...
mov word ptr [liste_bombe+ebx+4+4*3+2],0 ;(la rend la bombe normalle. au cas ou)
pop ebx esi
jmp stooppppes
fait_pas_peter:
;----------------------------------------------------------
pop ebx esi
;jmp continue_lme_train_train
;-------------------------------
stooppppes:
mov word ptr [liste_bombe+ebp+4+4*4+xy_adder],0 ;adder X automatique.
;bruit2b 2 40
bruit2 0 40
jmp pas_ca___
continue_lme_train_train:
;------------ rien ne peu nous arreter: on pousse.
add word ptr [liste_bombe+ebp+4+5*4+xy_adder],ou ;ax ;adder X
cmp word ptr [liste_bombe+ebp+4+5*4+xy_adder],8*(ou) ;on a change de case !!!
jne pas_changement_case
;--- cas particulier des 50% de bombes restantexs non detectees.
; (forcement en deplacement celles la.)
; (peut aussi etre un bonus, une flamme; un espoir. euh non, pas despoir)
cmp [truc2+ebx+(ou*xy_x32)],0
je nan_pas_de_bombe_ayant_squatte_entre_temps
sub word ptr [liste_bombe+ebp+4+5*4+xy_adder],ou
mov dword ptr [liste_bombe+ebp+4+1*4],1 ;fait peter la bombe...
mov word ptr [liste_bombe+ebp+4+4*3+2],0 ;(la rend la bombe normalle. au cas ou)
jmp stooppppes ;remonte...
nan_pas_de_bombe_ayant_squatte_entre_temps:
;-------------------------------------------
mov word ptr [liste_bombe+ebp+4+5*4+xy_adder],-8*(ou)
mov al,byte ptr [truc2+ebx]
mov byte ptr [truc2+ebx],0
add ebx,ou*xy_x32
add dword ptr [liste_bombe+ebp+4+2*4],ou*xy_x32
mov byte ptr [truc2+ebx],al
pas_changement_case:
;validation du nouveau X/Y....
mov ax,word ptr [liste_bombe+ebp+4+5*4+xy_adder]
mov ebx,[liste_bombe+ebp+4+2*4]
mov byte ptr [truc_X+ebx],0
mov byte ptr [truc_Y+ebx],0
mov byte ptr [truc_X+ebx+(13*16*xy_adder)],al
pas_ca___:
pop eax ebx
ENDM
;viseur esi-1 sur TRUC.
colle_un_bonus MACRO viseur_hazard_bonus,hazard_bonus,correspondance_bonus
local uihuiuihhuiouiohuihuiorteerrty
local reertertert
local pas_rec
local pas_rect
local drtytyrrtyrteterertert
local drtytyrrtyrteterertert2
;------------- ne pose pas de bonus sur une bombe non explosee
cmp byte ptr [esi-1+32*13],0
je drtytyrrtyrteterertert2
cmp byte ptr [esi-1+32*13],5
jb drtytyrrtyrteterertert
drtytyrrtyrteterertert2:
;--------------------------------------------------
;local rteterertert
;-------------- met ou du vide ou un bonus...
;hazard_bonus db 54,0,54,0,54,0,54,0,0,0,54,0
;viseur_hazard_bonus dd 0
push eax
push esi
inc [viseur_hazard_bonus]
mov esi,offset hazard_bonus
mov eax,[changement] ;renegade
and eax,000000011B
add esi,eax
add esi,[viseur_hazard_bonus]
cmp esi,offset viseur_hazard_bonus
jb reertertert
mov [viseur_hazard_bonus],0
mov esi,offset hazard_bonus
mov eax,[changement]
and eax,000000011B
add esi,eax
reertertert:
mov al,[esi]
pop esi
;or al,al
;jz rteterertert
push ebx
xor ebx,ebx
mov bl,al
mov al,[correspondance_bonus+ebx]
;********************** TRAFFIC POUR PLAY !!! *********
cmp action_replay,2 ;play
jne pas_rect
push ebx
;STRUTURE DE REC:
xor ebx,ebx
;mov bl,byte ptr fs:[1966080+TAILLE_HEADER_REC]
;mov byte ptr al,fs:[1966080+TAILLE_HEADER_REC+ebx]
;inc byte ptr fs:[1966080+TAILLE_HEADER_REC]
push esi
mov esi,replayer_saver4
mov bl,replayer_saver5 ;byte ptr fs:[esi+TAILLE_HEADER_REC]
mov byte ptr al,fs:[esi+TAILLE_HEADER_REC+ebx]
inc replayer_saver5 ;byte ptr fs:[esi+TAILLE_HEADER_REC]
pop esi
pop ebx
pas_rect:
;**************************************************
;;cas particulier: terrain6 plus apres lapocalypse, pas de bonus
cmp special_nivo_6,0
jz uihuiuihhuiouiohuihuiorteerrty
xor al,al
uihuiuihhuiouiohuihuiorteerrty:
;---------------
mov byte ptr [esi-1+32*13],al ;54
pop ebx
pop eax
drtytyrrtyrteterertert:
ENDM
resistance MACRO saut,monstre_ou_pas
local finito_baby
local erterdynanormalito
local passaut2
cmp [invinsible+ebp],0 ;flamme ? sauf si on est en invinsible apres un coups...
jne saut ;évite la mort de justesse...
cmp [lapipipino+ebp],0 ;lapin ?
je erterdynanormalito
cmp [lapipipino2+ebp],0 ;lapin qui saute ?
je passaut2
cmp [lapipipino5+ebp],0 ;hauteur du saut
jne saut
passaut2:
;tue le lapin...
bruit3 12,34,BLOW_WHAT2 ;bruit de kan on pose une bombe
mov [lapipipino2+ebp],3 ;mort du lapin
mov [lapipipino3+ebp],duree_mort
erterdynanormalito:
;--- rend normalles toutes ses bombes
;--- qui etaient a retardement. et retire son pouvoir..
push ebx
mov ebx,[infojoueur+ebp]
mov dword ptr [ebx+4*4],0 ;retire pouvoir
call nike_toutes_ses_bombes
pop ebx
;---------------------
;**décrémente le nombre de coups k'on peut prendre ***
cmp [nombre_de_coups+ebp],0
je finito_baby
dec dword ptr [nombre_de_coups+ebp]
mov [invinsible+ebp],invisibilite_totale
;---- retire le pouvoir de pousser (and car on le retire pas pour les monstres)
and dword ptr [pousseur+ebp],monstre_ou_pas
;retire les patins a roulette
mov dword ptr [patineur+ebp],0
;retire le tribombe
mov dword ptr [tribombe+ebp],0
jmp saut
finito_baby:
ENDM
aff_spt666 MACRO lignes,colonnes
local yuertertertrteerti
local yuconcerti
local yuertertertrtei
mov ecx,lignes
yuertertertrteerti:
mov ebx,colonnes
yuconcerti:
movsb
dec ebx
jnz yuconcerti
add edi,320-colonnes
add esi,320-colonnes
dec ecx
jnz yuertertertrteerti
ENDM
aff_spt2 MACRO lignes,colonnes,a
local yuertertertrteerti
local yuconcerti
local yuertertertrteiE
local yuertertertrtei
local rtrtyrtyrtyrtyrtyrtyrty
mov ecx,lignes
yuertertertrteerti:
mov ebx,colonnes
yuconcerti:
lodsb
or al,al
jz rtrtyrtyrtyrtyrtyrtyrty
cmp al,1
je yuertertertrtei
cmp al,156
je yuertertertrteiE
mov byte ptr es:[edi],al
jmp rtrtyrtyrtyrtyrtyrtyrty
yuertertertrteiE:
push ebx
xor ebx,ebx
mov bl,es:[edi]
mov al,es:[couleurssss+ebx]
add al,93 ;!
mov byte ptr es:[edi],al
pop ebx
jmp rtrtyrtyrtyrtyrtyrtyrty
yuertertertrtei:
push ebx
xor ebx,ebx
mov bl,es:[edi]
mov al,es:[couleurssss+ebx]
add al,a
mov byte ptr es:[edi],al
pop ebx
rtrtyrtyrtyrtyrtyrtyrty:
inc edi
dec ebx
jnz yuconcerti
add edi,320-colonnes
add esi,320-colonnes
dec ecx
jnz yuertertertrteerti
ENDM
return_presse MACRO e,machin
local retertertertertetrtrertertert
local erterertertert
PUSHALL
mov ecx,[nb_ordy_connected]
inc ecx
;nombre d'ordy en tout...
mov esi,offset total_t
;control_joueur dd 8 dup (?) ;-1,6,32,32+6,-1,-1,-1,-1
retertertertertetrtrertertert:
cmp byte ptr [esi+7*8],1
jne erterertertert
cmp [nombre_de_dyna],2 ;uniquement s'il y a au moins 2 dyna...
jb erterertertert
mov byte ptr [e],machin
erterertertert:
add esi,64
dec ecx
jnz retertertertertetrtrertertert
POPALL
ENDM
touche_pressedd MACRO e,machin
local retertertertertetrtrertertert
local erterertertert
PUSHALL
mov ecx,[nb_ordy_connected]
inc ecx
;nombre d'ordy en tout...
mov esi,offset total_t
;control_joueur dd 8 dup (?) ;-1,6,32,32+6,-1,-1,-1,-1
retertertertertetrtrertertert:
cmp byte ptr [esi+7*8+2],1
jne erterertertert
push eax
mov eax,machin
mov [e],eax
pop eax
erterertertert:
add esi,64
dec ecx
jnz retertertertertetrtrertertert
POPALL
ENDM
touche_presse MACRO e,machin
local retertertertertetrtrertertert
local erterertertert
PUSHALL
mov ecx,[nb_ordy_connected]
inc ecx
;nombre d'ordy en tout...
mov esi,offset total_t
;control_joueur dd 8 dup (?) ;-1,6,32,32+6,-1,-1,-1,-1
retertertertertetrtrertertert:
cmp byte ptr [esi+7*8+2],1
jne erterertertert
mov [e],machin
erterertertert:
add esi,64
dec ecx
jnz retertertertertetrtrertertert
POPALL
ENDM
touche_presseque_master MACRO e,machin
local erterertertert
PUSHALL
cmp [master],0
jne erterertertert
cmp byte ptr [total_t+7*8+2],1
jne erterertertert
mov byte ptr [e],machin
erterertertert:
POPALL
ENDM
bonus_tete MACRO a ;active un bonus... quand on marche dessus
local yertterertertertert
push eax
cmp byte ptr [esi],a
jb yertterertertertert
cmp byte ptr [esi],a+10 ;54+10
jnb yertterertertertert
bruit2 1,40
;bruit 1 40
mov byte ptr [esi],0
mov eax,[changement]
and eax,01111B
mov al,[hazard_maladie+eax]
and ax,255
mov word ptr [maladie+ebp],ax ;ax ;4: touches inversée...
;3 : la chiasse...
;2 : maladie de la lenteur...
;1 : maladie du speeD.
;5 : maladie de la constipation
;6 : maladie de la bonbinette
mov word ptr [maladie+ebp+2],duree_conta ;500 ; dd 8 dup (?)
;mov esi,[infojoueur+ebp]
;cmp byte ptr [esi+c],b ;bombe_max
;je yertterertertertert
;inc byte ptr [esi+c]
yertterertertertert:
pop eax
ENDM
bruit MACRO a,b,t