-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathintro.asm
89 lines (73 loc) · 1.53 KB
/
intro.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
; Copyright (C) Teemu Suutari
; x86
bits 32
section .text
%include "common/symbols.asm"
%include "common/structs.asm"
%include "common/debug.asm"
%include "common/exit.asm"
%include "common/libcall.asm"
%include "video/gl_libcall.asm"
%include "video/framerate.asm"
global _main
_main:
%ifdef NO_LATURI
and esp,byte ~15
LIBCALL _load_all_syms
%endif
DEBUG "Intro 2013"
DEBUG ""
DEBUG "---------------------"
DEBUG "--- Program start ---"
DEBUG "---------------------"
DEBUG ""
DEBUG "ESP 0x%08x",esp
DEBUG ""
%include "audio/player_main.asm"
%include "video/gl_init.asm"
mov edi,[audio_device]
mov esi,AudioProc
LIBCALL _AudioDeviceStart
DEBUG "_AudioDeviceStart %d",eax
intro_loop:
%include "video/gl_display.asm"
; mov edi, [alsource]
; mov esi, SOLVE(AL_SEC_OFFSET)
; mov edx,esp
; push dword [sample_position]
; fild dword [esp]
; pop eax
; push dword 52838
; fidiv dword [esp]
; fstp dword [esp]
; pop edi
mov edi,[sample_position]
LIBCALL _glTexCoord1i
; pop edi
; mov esi,esp
; push edi
; LIBCALL _MusicPlayerGetTime
; add dword [byte esi+6],byte -128
; mov edi,esi
; LIBCALL _glColor3dv
; LIBCALL _CGEventSourceKeyState
mov edi,esp
%ifdef NO_LATURI OLD_OSX
LIBCALL _CGSGetKeys
%else
LIBCALL _SLSGetKeys
%endif
; dec dword [byte edi+4]
; js intro_loop
shr byte [byte edi+6],6
jnc intro_loop
DEBUG "done, exiting"
intro_exit:
; no exit here for non-debug, will obviously crash later :D
%ifdef NO_LATURI
EXIT
%endif
player_modules_start:
%include "audio/audio_proc.asm"
%include "audio/modules.asm"
player_modules_end: