|
@@ -70,6 +70,7 @@ section .data
|
70
|
70
|
def_str bigline_error, {"Line with more than 16 tokens !", 0xA}
|
71
|
71
|
def_str nl_error, {"Character \n is not the last one", 0xA}
|
72
|
72
|
def_str badop_error, {"Bad OP", 0xA}
|
|
73
|
+ window_title: db "Yaglitch", 0x0
|
73
|
74
|
|
74
|
75
|
section .bss
|
75
|
76
|
|
|
@@ -353,29 +354,39 @@ sdl_init:
|
353
|
354
|
mov rdi, audiospec_wanted
|
354
|
355
|
mov rsi, audiospec_recv
|
355
|
356
|
call SDL_OpenAudio
|
356
|
|
-dbginit:
|
357
|
|
- ; 256*256 window
|
358
|
|
- ;mov rdi, 256
|
359
|
|
- ;mov rsi, 255
|
360
|
|
- ;mov rdx, 32
|
361
|
|
- ;;mov rcx, SDL_SWSURFACE
|
362
|
|
- ;xor rcx, rcx
|
363
|
|
- ;call SDL_SetVideoMode
|
|
357
|
+ ; video init 256*256 window
|
|
358
|
+ %ifdef SDL1
|
|
359
|
+ mov rdi, 256
|
|
360
|
+ mov rsi, 256
|
|
361
|
+ mov rdx, 32
|
|
362
|
+ ;mov rcx, SDL_SWSURFACE
|
|
363
|
+ xor rcx, rcx
|
|
364
|
+ call SDL_SetVideoMode
|
|
365
|
+ %endif
|
|
366
|
+ %ifdef SDL2
|
|
367
|
+ mov rdi, window_title
|
|
368
|
+ mov rsi, SDL_WINDOWPOS_UNDEFINED
|
|
369
|
+ mov rdx, SDL_WINDOWPOS_UNDEFINED
|
|
370
|
+ mov rcx, 256
|
|
371
|
+ mov r8, 256
|
|
372
|
+ xor r9, r9
|
|
373
|
+ call SDL_CreateWindow
|
|
374
|
+ %endif
|
|
375
|
+ %ifdef MIX_AUDIO
|
|
376
|
+ ; init callback heap infos
|
|
377
|
+ mov rax, 0xc ; brk
|
|
378
|
+ xor rdi, rdi ; get heap start addr
|
|
379
|
+ mov [cllbck_heapsz], rdi
|
|
380
|
+ syscall
|
|
381
|
+ cmp rax, -1
|
|
382
|
+ je exit_fatal
|
|
383
|
+ mov [cllbck_heap], rax
|
|
384
|
+ %endif
|
364
|
385
|
|
365
|
386
|
audio_start:
|
366
|
387
|
;start audio
|
367
|
388
|
xor rdi, rdi
|
368
|
389
|
call SDL_PauseAudio
|
369
|
|
-%ifdef MIX_AUDIO
|
370
|
|
- ; init callback heap infos
|
371
|
|
- mov rax, 0xc ; brk
|
372
|
|
- xor rdi, rdi ; get heap start addr
|
373
|
|
- mov [cllbck_heapsz], rdi
|
374
|
|
- syscall
|
375
|
|
- cmp rax, -1
|
376
|
|
- je exit_fatal
|
377
|
|
- mov [cllbck_heap], rax
|
378
|
|
-%endif
|
379
|
390
|
|
380
|
391
|
loop_event:
|
381
|
392
|
xor rdi, rdi
|