-
Notifications
You must be signed in to change notification settings - Fork 1
/
blastbuf.asm
88 lines (74 loc) · 1.48 KB
/
blastbuf.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
blaster_buffer_size equ blaster_mix_buffer_size
%include "blaster.asm"
%include "bgl.asm"
org 100h
call bgl_init
mov word [bgl_x_pos],0
mov word [bgl_y_pos],0
mov word [bgl_rotate_angle],0
mov word [bgl_buffer_offset],yems
call blaster_init
blaster_set_sample_rate 11025
mov si,sound
mov cx,sound_size
mov al,0
mov ah,1
call blaster_mix_play_sample
mov si,sound2
mov cx,sound2_size
mov al,1
mov ah,1
call blaster_mix_play_sample
mov si,sound3
mov cx,sound3_size
mov al,2
mov ah,0
call blaster_mix_play_sample
yess:
mov al,3
call bgl_flood_fill_full
sub word [bgl_rotate_angle],10
call bgl_draw_gfx_rotate
call bgl_wait_retrace
call bgl_write_buffer
call blaster_mix_calculate
call blaster_program_dma
call blaster_start_playback
cmp byte [bgl_key_states+2],0
je .1
mov si,sound
mov cx,sound_size
mov al,0
mov ah,0
call blaster_mix_play_sample
jmp .end
.1:
cmp byte [bgl_key_states+3],0
je .2
mov si,sound2
mov cx,sound2_size
mov al,1
mov ah,0
call blaster_mix_play_sample
jmp .end
.2:
cmp byte [bgl_key_states+4],0
je .end
mov si,sound3
mov cx,sound3_size
mov al,2
mov ah,0
call blaster_mix_play_sample
jmp .end
.end:
jmp yess
call blaster_deinit
mov ah,4ch
int 21h
sound: incbin "extreme.raw"
sound_size equ $-sound
sound2: incbin "bester.raw"
sound2_size equ $-sound2
sound3: incbin "lgr.raw"
sound3_size equ $-sound3
yems: incbin "engineer.gfx"