-
Notifications
You must be signed in to change notification settings - Fork 0
/
framework.agc
91 lines (82 loc) · 3 KB
/
framework.agc
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
90
91
////////////////////////////////////////////////////////////////
// Program..: Land of Warriors (LOW) //
// Author...: Luigi Caprio (Phobos70) //
// Mail.....: akamilab@proton.me //
// SH.......: Akamilab //
// Date.....: 13/11/2023 //
// //
// Nota(1)..: //
// Nota(2)..: //
// //
// FRAMEWORK //
////////////////////////////////////////////////////////////////
//
Function global_definition()
/*
Set all the global variables
for the framework
*/
Global deviceWidth as integer = 1024
Global deviceHeight as integer = 768
Global deviceSyncRate as integer = 60
Global deviceFullScreen as integer = 1
Global deviceSystem as string = ""
Global deviceType as string = ""
Global deviceLanguage as string = ""
Global deviceKeyboard as integer = 0
Global deviceMaxWidth as float = 0.0
Global deviceMaxHeight as float = 0.0
Global deviceAspectRatio as float = 0.0
Global statusGame as integer = 1 // 1 = SpalshScreen - 2 = TitleScreen - 3 = Game - 5 = Options - 8 = Pause - 9 = Exit
Global exitGame as integer = 1
Global displayInfo as integer = 0
endfunction
//
Function device_info()
/*
get all the device info
for the framework
*/
deviceSystem = GetDeviceBaseName()
if deviceSystem = "windows" or deviceSystem = "linux" or deviceSystem = "mac"
deviceType = "pc"
deviceSyncRate = 60
deviceLanguage = left(GetDeviceLanguage(),2)
deviceKeyboard = GetKeyboardExists()
elseif deviceSystem = "html5"
deviceType = "html"
deviceSyncRate = 30
deviceLanguage = "en"
deviceKeyboard = GetKeyboardExists()
elseif deviceSystem = "ios" or deviceSystem = "android"
deviceType = "mobile"
deviceSyncRate = 30
deviceLanguage = left(GetDeviceLanguage(),2)
deviceKeyboard = GetKeyboardExists()
endif
if deviceLanguage = "" then deviceLanguage = "en"
deviceMaxWidth = GetMaxDeviceWidth()
deviceMaxHeight = GetMaxDeviceHeight()
deviceAspectRatio = (deviceMaxWidth / deviceMaxHeight)
endfunction
//
Function screen_definition()
/*
Set the screen resolution and basic definitions
*/
SetDisplayAspect(-1)
SetWindowSize( deviceWidth, deviceHeight, deviceFullScreen )
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
SetWindowAllowResize( 0 ) // NOT allow the user to resize the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( deviceSyncRate, 0 )
UseNewDefaultFonts( 1 )
if deviceType = "pc"
SetWindowTitle(textGame[0])
endif
endfunction
//
Function estrai_pacchetti()
ExtractZip("01.akamilab","","AkamiNeko2023") // Splash
// ....
endfunction