-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.asm
49 lines (42 loc) · 762 Bytes
/
main.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
;;
;; Title: Wanna be sokoban
;; Copyright: 2013 Damian Ziemba
;; Authors: Damian Ziemba <[email protected]>
;; License: GPL
;;
[bits 64]
; exports
global main
global screenWidth
global screenHeight
global screenFull
global screenRatio
global gameTitle
global keys
; imports - program
extern initOpenGL
extern initSDL
extern handleEvent
extern loadMap
; imports - libc
extern exit
section .data
screenWidth: equ 1024
screenHeight: equ 768
screenFull: equ 0
screenRatio: equ screenWidth/screenHeight
gameTitle: db "Wanna be sokoban", 0
keys: times 323 db 0
mapFile: db "maps/1.txt", 0
section .text
main:
call initSDL
call initOpenGL
mov RDI, mapFile
call loadMap
events:
call handleEvent
and RAX, RAX
jnz events
mov RDI, 0
call exit