-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathddconver.asm
941 lines (807 loc) · 18.8 KB
/
ddconver.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
cseg segment public 'code'
assume cs: cseg, ds: dseg
public options,load_tan,load_ega,load_cga,load_vga
public reload,level5_reload,cvert,cvertx,bbw_reload
extrn load:near,set_up:near,write_text:near
extrn enemy1_rout : near , player1_rout: near , player2_rout:near
extrn babobo_rout : near , enemy2_rout : near , enemy3_rout :near
extrn gabobo_rout : near , roper_rout : near
extrn vgaplayer2_rout:near,vgaroper_rout:near,vgaghost_rout:near
extrn decomp:near,insert_disk1:near
extrn goal_snd:near
extrn ptxt_cont:near,load_error:near
EXTRN UNDRAW_CONT:NEAR,DRAW_CONT:NEAR
EXTRN SCROLLU_CONT:NEAR,SCROLLD_CONT:NEAR
EXTRN SCROLLL_CONT:NEAR,SCROLLR_CONT:NEAR
EXTRN DOWNLOAD_CONT:NEAR,INIT_CONT:NEAR
EXTRN UNDRAW_SPRT16:NEAR,DRAW_SPRT16:NEAR
EXTRN SCROLL_U16:NEAR,SCROLL_D16:NEAR
EXTRN SCROLL_L16:NEAR,SCROLL_R16:NEAR
EXTRN DOWN_LOAD16:NEAR,INIT_DUMMY16:NEAR
EXTRN UNDRAW_SPRTEGA:NEAR,DRAW_SPRTEGA:NEAR
EXTRN SCROLL_UEGA:NEAR,SCROLL_DEGA:NEAR
EXTRN SCROLL_LEGA:NEAR,SCROLL_REGA:NEAR
EXTRN DOWN_LOADEGA:NEAR,INIT_DUMMYEGA:NEAR
extrn head_ega:near,level_ega:near,ptxt_ega:near
extrn head_16:near,level_16:near,ptxt_16:near
extrn head_cont:near,level_cont:near,ptxt_cont:near
extrn init_sticks:near
include ddeqfile
convrt macro addr,leng
push ds
push es
push si
push di
mov ax,seg addr
mov es,ax
mov di,offset addr
mov cx,leng
call cv_data
pop di
pop si
pop es
pop ds
endm
multi_load macro cnt,dest
local no_lod,n_err,retrys
pushall
mov ax,[bx+cnt] ;the pntr to file needed
cmp ax,[cnt+offset in_memory] ;check what is in !
je no_lod ;if the same then dont load it !
mov word ptr [cnt+offset in_memory],ax ;store this !
add ax,si ;si is base of the table
mov bx,ax ;now to get offset of file_name
mov start_seg,seg dest
mov start_offset,offset dest
retrys:
push bx
mov bx,[bx]
mov file_name,bx ;read from correct file_name table
call load
pop bx ; it points to the files list
cmp errfl,0
je n_err
mov ax,g_disc
call load_error
jmp retrys
n_err:
cmp sixteencol,1 ;is it tandy version
jne no_lod
mov ax,seg dest
mov es,ax
mov di,offset dest
mov cx,len ;use the fact delzw has the length !!!
call cvert ;just call the bloody routine !
no_lod: popall
endm
; must find out the lengths of all the files that must be loaded !
level5_reload:
; fix this by calling the level , 6 !
mov mission,6
call reload
mov mission,5
ret
bbw_reload:
mov mission,7
call reload ;load up the big boss willy .
mov mission,5
ret
reload:
; the reloading of the sprite data after every level
pushall
mov bl,mission
sub bl,1 ;make it 0-4 not 1-5
xor bh,bh
shl bx,1 ;index to words ! One assumes that level has changed
; also does it go 0-4 or 1-5 ???
mov bx,[bx+offset level_files] ;point to file data
mov si,offset cgafiles
cmp sixteencol,0
je not_16
mov si,offset vgafiles
cmp sixteencol,3
je not_16 ;( rename its vga )
mov si,offset egafiles
not_16:
if vers eq vga
multi_load 0,lin_dat
multi_load 2,wil_dat
multi_load 4,capt_dat
;multi_load 6,abo_dat ; no need for dave he is always in.
multi_load 8,bill_dat
multi_load 10,wep_dat
else
multi_load 0,wil_dat
multi_load 2,wep_dat
endif
popall
ret
LOAD_TAN:
if vers eq vga
pushall
mov ax,seg dseg
mov ds,ax
load_m char_map , chset_file , g_disc ;binary no need to convert.
load_mtan big_chars , chf_ega , g_disc ;graphics so convert
load_mtan abo_dat , abobo_eg1 , g_disc ;convert first
load_mtan pl1_dat1 , player1_ega1 , g_disc ;convert first
;call insert_disk1 ;
mov g_disc,2 ;ega graphics disc
MOV AX,SEG DSEG
MOV ES,AX
MOV DS,AX
les di,dum_ptr
MOV di,32768 ;posn for lut of colour and mask ?
xor dx,dx
mov cx,256
mask_lupe:
xor ax,ax
test dX,15
JZ LAV1
MOV AX,15
LAV1: TEST DX,240 ;test top 4 bits
JZ LAV2 ;all zero so leave
or ax,240
lav2: not ax
stosb
inc dx
loop mask_lupe
mov di,32768+256
mov bx,offset pl2_tab ;
call convert
mov di,32768+512
mov bx,offset roper_tab ;
call convert
mov di,32768+768
mov bx,offset ghost_tab
call convert
mov ax,seg dseg
mov es,ax
mov ds,ax
mov di,offset colrmap_table
mov ax,-1
stosw ;0-player1 ?
stosw ;1 ;williams
stosw ;2 ;abobo
stosw ;3 ;Linda
stosw ;4 ;Big Boss Willie
mov ax,offset pl2_recol
stosw ;5 player2
mov ax,-1
stosw ;6 wil_a
stosw ;7 wil_b
stosw ;8 wil_c
stosw ;9 abobo_a
stosw ;10 abobo_b
mov ax,offset roper_recol
stosw ;11 roper Shite ; how can it kock stuffup then ??
mov ax,-1
stosw ;12 captain
stosw ;13 bill
stosw ;14 lowry
stosw ;15 cap_A
stosw ;16 cap_b
stosw ;17 cap_c
stosw ;18 fatty
stosw ;19 weapons
mov ax,offset ghost_recol
stosw ;20 roper_b/ghost !
call change_jmps
mov ax,seg dseg
mov ds,ax
MOV [GMODE],9
call downloadtable
popall
endif
RET
LOAD_EGA:
if vers eq vga
pushall
mov ax,seg dseg
mov ds,ax
load_m char_map, chset_file , g_disc
load_m big_chars, chf_ega , g_disc
load_m abo_dat , abobo_eg1 , g_disc
load_m pl1_dat1 , player1_ega1 , g_disc
;call insert_disk1
mov g_disc,2 ;ega graphics disc is now wanted !
mov ax,seg dseg
mov es,ax
mov ds,ax
mov di,offset colrmap_table
mov ax,offset cs:player1_rout
stosw ;0-player1 ?
;mov ax,offset cs:player1_rout
stosw ;1 ;williams
;mov ax,offset cs:player1_rout
stosw ;2 ;abobo
;mov ax,offset cs:player1_rout
stosw ;3 ;Linda
;mov ax,offset cs:player1_rout
stosw ;4 ;Big Boss Willie
mov ax,offset cs:player2_rout
stosw ;5 player2
mov ax,offset cs:player1_rout ;enemy1_rout
stosw ;6 wil_a
;mov ax,offset cs:enemy2_rout
stosw ;7 wil_b
;mov ax,offset cs:enemy3_rout
stosw ;8 wil_c
;mov ax,offset cs:babobo_rout
stosw ;9 abobo_a
;mov ax,offset cs:gabobo_rout
stosw ;10 abobo_b
mov ax,offset cs:roper_rout ;oh hell roper !?!
stosw ;11 roper Shite ; how can it kock stuffup then ??
mov ax,offset cs:player1_rout ;enemy1_rout
stosw ;12 captain
stosw ;13 bill
stosw ;14 lowry
stosw ;15 cap_A
stosw ;16 cap_b
stosw ;17 cap_c
stosw ;18 fatty
stosw ;19 weapons
mov ax,offset cs:babobo_rout
stosw ;20 roper_b/ghost !
call change_jmps
mov ax,seg dseg
mov ds,ax
MOV [GMODE],13
call downloadtable
popall
endif
RET
LOAD_VGA:
if vers eq vga
pushall
mov ax,seg dseg
mov ds,ax
load_m char_map, chset_file , g_disc
load_m big_chars, chf_vga , g_disc
load_m pl1_dat1 , player1_vga1 , g_disc
;call insert_disk1
mov g_disc,3 ;vga grafix disc now wanted
load_m abo_dat , abobo_vg1 , g_disc
mov ax,seg dseg
mov es,ax
mov ds,ax
mov di,offset colrmap_table
mov ax,offset cs:player1_rout
stosw ;0-player1 ?
;mov ax,offset cs:player1_rout
stosw ;1 ;williams
;mov ax,offset cs:player1_rout
stosw ;2 ;abobo
;mov ax,offset cs:player1_rout
stosw ;3 ;Linda
;mov ax,offset cs:player1_rout
stosw ;4 ;Big Boss Willie
mov ax,offset cs:vgaplayer2_rout
stosw ;5 player2
mov ax,offset cs:player1_rout ;enemy1_rout
stosw ;6 wil_a
;mov ax,offset cs:enemy2_rout
stosw ;7 wil_b
;mov ax,offset cs:enemy3_rout
stosw ;8 wil_c
;mov ax,offset cs:babobo_rout
stosw ;9 abobo_a
;mov ax,offset cs:gabobo_rout
stosw ;10 abobo_b
mov ax,offset cs:vgaroper_rout ;oh hell roper !?!
stosw ;11 roper Shite ; how can it kock stuffup then ??
mov ax,offset cs:player1_rout ;enemy1_rout
stosw ;12 captain
stosw ;13 bill
stosw ;14 lowry
stosw ;15 cap_A
stosw ;16 cap_b
stosw ;17 cap_c
stosw ;18 fatty
stosw ;19 weapons
;mov ax,offset cs:vgaghost_rout
stosw ;20 roper_b/ghost ! vga ghost is recoloured and moved !
call change_jmps
mov ax,seg dseg
mov ds,ax
MOV [GMODE],13 ;is actually the same mode!
call downloadtable
popall
endif
RET
LOAD_CGA:
pushall
mov ax,seg dseg
mov ds,ax
if vers eq cga
;call insert_disk1 ; all on same disc again.
endif ; only change disc if its the cga version
;border 10
load_m big_chars , chf_cga , g_disc
;border 1
load_m char_map , chset_file , g_disc
load_m pl1_dat1 , player1_file1 , g_disc ; problem easier.
if vers eq vga ;only on this version !
load_m abo_dat , abobo_file1 , g_disc ; problem easier.
endif
mov g_disc,1 ;cga grafix
popall
mov ax,seg dseg
mov ds,ax
MOV [GMODE],5
RET
cvert:
; convert at es:di cx word of ega data to Tandy
; ega is ---- 1 byte of consec. red/green/blue/intensity
shr cx,1
shr cx,1
plains: mov bx,es:[di+2]
mov dx,es:[di]
xchg bh,dl
xchg bl,dh
rept 2
rept 4
shl dl,1
rcl ax,1
shl dh,1
rcl ax,1
shl bl,1
rcl ax,1
shl bh,1
rcl ax,1
endm
xchg al,ah
stosw
endm
loop playnes
ret
playnes:jmp plains
cvertx:
push ds
lds si,dum_ptr ; point to the dummy screen.
shr cx,1
shr cx,1
;shr cx,1 ;/2
;shr cx,1 ;4
shr cx,1 ;8
shr cx,1 ;16
shr cx,1 ;32
shr cx,1 ;64
shr cx,1 ;128 ;hmm divide into chites ?
ch_lp:
call a_chite
add di,128 ;move source to next chite !
loop ch_lp
pop ds
ret
a_chite:
push si
push cx
push di
; first shift the memory and save it to ds:si
; then move using movsw back to es:[di]
mov cx,32 ;number of 8 pix quads
plainsx:
mov dl,es:[di+96]
mov dh,es:[di+64] ; hmm ? swapped what I think is green/red !
mov bl,es:[di+32] ; and now swapped i/b
mov bh,es:[di]
add di,1
rept 2
rept 4
shl dl,1
rcl ax,1
shl dh,1
rcl ax,1
shl bl,1
rcl ax,1
shl bh,1
rcl ax,1
endm
xchg al,ah
mov ds:[si],ax
add si,2
endm
;inc si ;add si,1
loop playnesx
mov cx,64
sub di,32
sub si,128
rep movsw ;store back !
pop di
pop cx
pop si
ret
playnesx:jmp plainsx
convert:
xor dx,dx
mov cx,256
CT_lupe:
MOV AX,DX
AND AX,15 ;low colour
xlat
mov bp,ax
mov ax,dx
shr ax,1
shr ax,1
shr ax,1
shr ax,1;/16
and ax,15
xlat
shl ax,1
shl ax,1
shl ax,1
shl ax,1
or ax,bp
stosb
inc dx
loop CT_lupe
ret
OPTIONS:
;choose the display adapter and get flag
;SIXTEENCOL
; 1-cga
; 2-Tandy 16 colour
; 3-EGA version.
; 4-VGA version.
;
if vers eq vga
mov si,offset dd_mess
mov dx,8*256+20
call write_text
mov si,offset cga_card
mov dx,12*256+20
call write_text
mov si,offset tandy_1000
mov dx,14*256+20
call write_text
mov si,offset ega_card
mov dx,16*256+20
call write_text
mov si,offset vga_card
mov dx,18*256+20
call write_text
rep2:
mov ah,0
int 22 ;wait for key
cmp al,49 ; kill so that only EGA version
je cga_chose ;
cmp al,50 ; can be chosen.
je tan_chose ;
cmp al,51
je ega_chose
cmp al,52
je vga_chose
jmp rep2
else
jmp cga_chose
endif
tan_chose:
mov byte ptr sixteencol,1
jmp contrls
cga_chose:
mov byte ptr sixteencol,0
jmp contrls
ega_chose:
mov byte ptr sixteencol,2
jmp contrls
vga_chose:
mov byte ptr sixteencol,3
jmp contrls
contrls:
; Now this selects if a jostick card is needed by the user
mov ax,2
int 16 ;clear screen
mov si,offset joy_mess
mov dx,12*256+12
call write_text
mov si,offset key_mess
mov dx,16*256+12
call write_text
try_chse:
mov ah,0
int 22 ;read a key message
cmp al,"J"
je joy_choose
cmp al,"j"
je joy_choose
cmp al,"k"
je key_choose ;no joystick
cmp al,"K"
je key_choose ;no joystick
jmp try_chse
joy_choose:
mov nojoyflag,0
call init_sticks
ret
key_choose:
ret ;no change default is none.
CHANGE_JMPS:
;change the jump table for 16 colour game
mov ax,seg dseg
mov ds,ax
mov es,ax
cmp sixteencol,0
je nsc
mov bx,offset zetables
mov al,sixteencol
xor ah,ah
shl ax,1 ;*2 due to words
add bx,ax
mov si,[bx] ;load the table value
MOV DI,OFFSET jumptab
MOV CX,11 ;11 0-20 !
REP MOVSW
NSC:
RET
downloadtable:
;download the secondary animation table data !
; move bytes from tabstart1 to walk_dr_0f
; until tabend1
push ds
push es
mov ax,seg walk_dr_0f
mov ds,ax
mov si,offset walk_dr_0f
mov di,offset lastfrm1
call doub_sub
mov ax,seg p_null_0f ;colaps_l_1f
mov ds,ax
mov si,offset p_null_0f ;colaps_l_1f
mov di,offset lastfrm2
call doub_sub
mov ax,seg null_0f
mov ds,ax
mov si,offset null_0f
mov di,offset wepend
daveslabel:
shl word ptr [si],1
add si,6 ;why make weapons different (how daft !)
cmp si,di
jl daveslabel
pop es
pop ds
ret
doub_sub:
;down load from ds:si to es:di cx=tabend
shl word ptr [si],1
add si,8
cmp si,di
jne doub_sub
ret
cseg ends
extrn pl1_dat1:word,wil_dat:word
extrn lin_dat:word,abo_dat:word,wep_dat:word
extrn capt_dat:word,bill_dat:word,errfl:word
extrn mask_tabtan:word,pl2_recol:word,roper_recol:word,ghost_recol:word
; addresses of the new recolour table addresses ( in dummy segment )
dseg segment public 'data'
public jumptab,vga_col_table
extrn lastfrm1:word,lastfrm2:word,wepend:word
extrn mission:byte,nojoyflag:word
extrn club_0f:word,colaps_l_1f:word,walk_dr_0f:word
extrn p_null_0f:word,null_0f:word
extrn file_name:word,gmode:word
extrn chr_blocks:word,chite_ptr:dword,dum_ptr:dword
extrn start_seg:word,start_offset:word
extrn sixteencol:byte,colrmap_table:word
extrn char_map:word
extrn screen:word,big_chars:word,g_disc:word
extrn len:word ;used by save and set by LOAD
joy_mess db " J : Joystick.",0
key_mess db " K : Keyboard.",0
williams_eg1 db "cartwhl.cpe",0
williams_vg1 db "cartwhl.cpv",0
williams_file1 db "cartwhl.cpc",0
linda_eg1 db "bitch.cpe",0
linda_vg1 db "bitch.cpv",0
linda_file1 db "bitch.cpc",0
abobo_eg1 db "bigdave.cpe",0
abobo_vg1 db "bigdave.cpv",0
abobo_file1 db "bigdave.cpc",0
player1_ega1 db "player.cpe",0
player1_vga1 db "player.cpv",0
player1_file1 db "player.cpc",0
chset_file db "CHARSET.BIN",0
chf_vga db "chars.cpv",0
chf_ega db "chars.cpe",0
chf_cga db "chars.cpc",0
weapons_file1 db "weapons.cpc",0
weapon_ega1 db "weapons.cpe",0
weapon_vga1 db "weapons.cpv",0
wep5_vga db "lvl5.cpv",0
wep5_ega db "lvl5.cpe",0
wep5_cga db "lvl5.cpc",0
wep3_ega db "lvl3.cpe",0
wep3_cga db "lvl3.cpc",0
wep3_vga db "lvl3.cpv",0
boss_file1 db "bbw.cpc",0
boss_eg1 db "bbw.cpe",0
boss_vg1 db "bbw.cpv",0
captain_vga db "captain.cpv",0
captain_ega db "captain.cpe",0
captain_cga db "captain.cpc",0
bill_vga db "bill.cpv",0
bill_ega db "bill.cpe",0
bill_cga db "bill.cpc",0
fat_cga db "fatty.cpc",0
fat_ega db "fatty.cpe",0
fat_vga db "fatty.cpv",0
lowry_cga db "lowry.cpc",0
lowry_ega db "lowry.cpe",0
lowry_vga db "lowry.cpv",0
;hmm need some sort of reload data and data held to signify which baddies
; are currently in memory.
;
; those will need to be equates
; Possible filenames
lin_file equ 0 ;indexes into the f_name table
wil_file equ 2
cap_file equ 4
dav_file equ 6
bil_file equ 8
fat_file equ 10
bbw_file equ 12
low_file equ 14
wep_file equ 16
lvl3_file equ 18
lvl5_file equ 20
egafiles label word ;a list of multiload type files (baddies)
dw offset linda_eg1
dw offset williams_eg1
dw offset captain_ega
dw offset abobo_eg1
dw offset bill_ega
dw offset fat_ega
dw offset boss_eg1
dw offset lowry_ega
dw offset weapon_ega1
dw offset wep3_ega
dw offset wep5_ega
vgafiles label word ;a list of multiload type files (baddies)
dw offset linda_vg1
dw offset williams_vg1
dw offset captain_vga
dw offset abobo_vg1
dw offset bill_vga
dw offset fat_vga
dw offset boss_vg1
dw offset lowry_vga
dw offset weapon_vga1
dw offset wep3_vga
dw offset wep5_vga
cgafiles label word
dw offset linda_file1
dw offset williams_file1
dw offset captain_cga
dw offset abobo_file1
dw offset bill_cga
dw offset fat_cga
dw offset boss_file1
dw offset lowry_cga
dw offset weapons_file1
dw offset wep3_cga
dw offset wep5_cga
; data for linda seg , wil_seg , cap seg , abobo seg , bill seg
in_memory dw -1,-1,-1,-1,-1,
level_files dw lev1_fls,lev2_fls,lev3_fls,lev4_fls,lev5_fls,lev6_fls,lev7_fls
; call the reload level6 ? just for simplicity
; need never multi load big dave !! just load at the start on all vers.
; could move linda as well ?!
if vers eq vga
lev1_fls dw lin_file , wil_file , cap_file , dav_file , bil_file ,wep_file
lev2_fls dw lin_file , wil_file , cap_file , dav_file , fat_file ,wep_file
lev3_fls dw lin_file , wil_file , cap_file , dav_file , bil_file ,lvl3_file
lev4_fls dw lin_file , wil_file , low_file , dav_file , bil_file ,wep_file ;dont need one really!
lev5_fls dw lin_file , wil_file , low_file , dav_file , bil_file ,lvl5_file
lev6_fls dw lin_file , bbw_file , low_file , dav_file , fat_file ,lvl5_file
lev7_fls dw lin_file , bbw_file , low_file , dav_file , fat_file ,lvl5_file
else
lev1_fls dw wil_file , wep_file
lev2_fls dw wil_file , wep_file
lev3_fls dw wil_file , lvl3_file
lev4_fls dw low_file , wep_file ;dont need one really!
lev5_fls dw wil_file , lvl5_file
lev6_fls dw low_file , lvl5_file
lev7_fls dw bbw_file , lvl5_file ; for multiload lvl5 !
endif
; level 5 needs to load bbw over williams || fatty over bill
pl2_tab DB 0,8,2,3 ; colour 0,1,2,3 become
db 4,5,6,7 ; colour 4,5,6,7 become
db 8,7,10,11 ; colour 8,9,10,11 become
db 12,13,14,15 ;colour 12,13,14,15 become
; makes the blues into greys.
roper_tab DB 0,2,2,3 ; colour 0,1,2,3 become
db 4,5,6,7 ; colour 4,5,6,7 become
db 8,10,10,11 ; colour 8,9,10,11 become
db 12,13,14,15 ;colour 12,13,14,15 become
; makes the blues into greens.
ghost_tab DB 0,5,2,3 ; colour 0,1,2,3 become
db 4,5,5,7 ; colour 4,5,6,7 become
db 8,13,10,11 ; colour 8,9,10,11 become
db 12,13,14,15 ;colour 12,13,14,15 become
; makes the blues into magentas.
dd_mess db "Double Dragon II ",0
cga_card db "1: CGA 4 colours . ",0
tandy_1000 db "2: Tandy 1000 16 colours .",0
ega_card db "3: EGA 16 Colours .",0
vga_card db "4: VGA 16 Colours Extended Pallette .",0
zetables dw jumptab,jtab16,jtabega,jtabvga
JUMPTAB DW OFFSET UNDRAW_CONT ;0
DW OFFSET DRAW_CONT ;2
DW OFFSET SCROLLU_CONT ;4
DW OFFSET SCROLLD_CONT ;6
DW OFFSET SCROLLL_CONT ;8
DW OFFSET SCROLLR_CONT ;10
DW OFFSET DOWNLOAD_CONT ;12
DW OFFSET INIT_CONT ;14
dw offset head_cont ;16
dw offset level_cont ;18
dw offset ptxt_cont ;20
JTAB16 label word
DW OFFSET UNDRAW_SPRT16
DW OFFSET DRAW_SPRT16
DW OFFSET SCROLL_U16
DW OFFSET SCROLL_D16
DW OFFSET SCROLL_L16
DW OFFSET SCROLL_R16
DW OFFSET DOWN_LOAD16
DW OFFSET INIT_DUMMY16
dw offset head_16 ;16
dw offset level_16 ;18
dw offset ptxt_16 ;20
JTABEGA label word
if vers eq vga
DW OFFSET UNDRAW_SPRTEGA
DW OFFSET DRAW_SPRTEGA
DW OFFSET SCROLL_UEGA
DW OFFSET SCROLL_DEGA
DW OFFSET SCROLL_LEGA
DW OFFSET SCROLL_REGA
DW OFFSET DOWN_LOADEGA
DW OFFSET INIT_DUMMYEGA
dw offset head_ega ;16
dw offset level_ega ;18
dw offset ptxt_ega ;20
endif
JTABVGA label word
if vers eq vga
DW OFFSET UNDRAW_SPRTEGA ;its the new one !
DW OFFSET DRAW_SPRTEGA ; mainly t'same
DW OFFSET SCROLL_UEGA ;
DW OFFSET SCROLL_DEGA ;
DW OFFSET SCROLL_LEGA ;
DW OFFSET SCROLL_REGA ;
DW OFFSET DOWN_LOADEGA ;
DW OFFSET INIT_DUMMYEGA ;
dw offset head_ega ;16
dw offset level_ega ;18 probably only one thats different !
dw offset ptxt_ega ;20
endif
pal macro r,g,b
db r*4,g*4,b*4
endm
vga_col_table label byte
; the list of stuff for the palette
; I suppose every time the mode is set up I need to change this!
pal 0,0,0 ; very funny indeed hah fucking hah
pal 0,12,0
pal 0,6,0
pal 8,8,14
pal 6,6,15
pal 14,8,8
pal 14,12,0
pal 15,0,0
pal 8,4,2
pal 6,0,0
pal 14,12,12
pal 8,8,10
pal 4,4,8
pal 2,2,4
pal 0,0,0
;pal 15,0,15 ;!!!! ahahah !
db 48,32,12 ;15 thats a guess as it changes level to level
dseg ends
end