-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodule_SDL1.sum
46 lines (36 loc) · 1.1 KB
/
module_SDL1.sum
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
//-------------------------------------------------------------------
//
// Module example using SDL 1.x
//
// FILE:
// module_SDL1.sum
//
// FOR SUMMER VERSION 0.71.0
//
// USAGE:
// sum module_SDL1.sum
//
//-------------------------------------------------------------------
//
#ifdef WIN32
module ("SDL", "sdl"); // in Windows: "SDL.dll"
#endif
#ifdef __linux__
module ("libSDL", "sdl"); // in Linux: "libSDL.so"
#endif
//----------------------------------------------------------
// lib_name: func_name: proto: sub_esp:
//----------------------------------------------------------
import ("sdl", "SDL_Init", "0i", 0);
import ("sdl", "SDL_SetVideoMode", "piiii", 0);
import (0, "SDL_Delay", "0i", 0);
import (0, "SDL_Quit", "00", 0);
var a = 1500;
function hello (int i) {
console.log ("Plase Wait 3 Seconds ... Value i: %d\n", i);
}
sdl.SDL_Init (32);
sdl.SDL_SetVideoMode (800, 600, 16, 0); // color 16
hello(a);
SDL_Delay (3000);
SDL_Quit ();