This repository was archived by the owner on Nov 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_scene.scene
156 lines (146 loc) · 4.67 KB
/
test_scene.scene
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
//Scene file do not make any changes here.
global test_scene_base_width = 1280
global test_scene_base_height = 720
global test_scene_device_width = 1280
global test_scene_device_height = 720
global test_scene_fadesprite, test_scene_fadeimage as integer
global test_scene_tween# as float
global test_scene_change_window = 1
global test_scene_loaded = 0
global test_scene_images as integer[2]
global test_scene_sprites as integer[2]
global test_scene_sprites_count_x as float[2]
global test_scene_sprites_count_y as float[2]
global test_scene_text as integer[2]
function test_scene_create_window( winflag as integer )
test_scene_change_window = winflag
endfunction
function test_scene_setup()
if test_scene_loaded = 1 then exitfunction
test_scene_loaded = 1
if test_scene_change_window = 1
SetVirtualResolution(test_scene_base_width,test_scene_base_height)
SetWindowSize(test_scene_device_width,test_scene_device_height,0)
SetClearColor(0,0,0)
endif
SetPhysicsWallTop(1)
SetPhysicsWallBottom(1)
SetPhysicsWallLeft(1)
SetPhysicsWallRight(1)
test_scene_images[1] = LoadImage("test_circle.png")
test_scene_text[1] = CreateText( "Test Scene 1." )
SetTextPosition(test_scene_text[1],32.000000,32.000000)
SetTextSize(test_scene_text[1],40.000000)
SetTextDepth(test_scene_text[1],9)
SetTextVisible(test_scene_text[1],1)
test_scene_sprites[1] = CreateSprite( test_scene_images[1] )
SetSpritePosition(test_scene_sprites[1],64.000000,192.000000)
SetSpriteSize(test_scene_sprites[1],352.000000,352.000000)
SetSpriteDepth(test_scene_sprites[1],5000)
endfunction
function test_scene_sync()
if test_scene_loaded = 0 then test_scene_setup()
test_scene_tween# = 60/(1.0/GetFrameTime())
endfunction
function test_scene_cleanup()
local i as integer
if test_scene_loaded = 0 then exitfunction
for i = 0 to test_scene_sprites.length
if GetSpriteExists( test_scene_sprites[i] ) then DeleteSprite( test_scene_sprites[i] )
next i
for i = 0 to test_scene_text.length
if GetTextExists( test_scene_text[i] ) then DeleteText( test_scene_text[i] )
next i
if GetSpriteExists(test_scene_fadesprite) then DeleteSprite(test_scene_fadesprite)
test_scene_fadesprite = 0
if GetImageExists(test_scene_fadeimage) then DeleteImage(test_scene_fadeimage)
for i = 0 to test_scene_images.length
if GetImageExists( test_scene_images[i] ) then DeleteImage( test_scene_images[i] )
next i
test_scene_loaded = 0
endfunction
function test_scene_fade( percent as float )
local fMul as float
local i as integer
fMul = percent / 100.0
if fMul > 1.0 then fMul = 1.0
if fMul < 0.0 then fMul = 0.0
if fMul = 1.0
if GetSpriteExists(test_scene_fadesprite) then DeleteSprite(test_scene_fadesprite)
test_scene_fadesprite = 0
if GetImageExists(test_scene_fadeimage) then DeleteImage(test_scene_fadeimage)
exitfunction
endif
if test_scene_loaded = 0 then test_scene_setup()
if not GetSpriteExists( test_scene_fadesprite )
test_scene_fadeimage = CreateImageColor(0,0,0,255)
test_scene_fadesprite = CreateSprite(test_scene_fadeimage)
SetSpriteDepth(test_scene_fadesprite,0)
SetSpritePosition(test_scene_fadesprite,0,0)
SetSpriteSize(test_scene_fadesprite,GetDeviceWidth(),GetDeviceHeight())
endif
SetSpriteColor(test_scene_fadesprite,0,0,0,255-255*fMul)
endfunction
function test_scene_GetNextVirtualButton( )
local i as integer
local ret as integer
ret = 1
for i = 1 to 100
if not GetVirtualButtonExists( i )
ret = i
exit
endif
next i
endfunction ret
REMSTART
##################################################
#### Settings: Do not make any changes below. ####
##################################################
scenename: test_scene
gridx: 32.000000
gridy: 32.000000
gridon: 1
sceneresolutiontext: L: 1280x720 (1.78) Samsung Galaxy S3
screenwidth: 1280
screenheight: 720
scenebackr: 0
scenebackg: 0
scenebackb: 0
scenebacka: 255
followdeviceres: 0
basewidth: 1280
baseheight: 720
scenegravityx: 0.000000
scenegravityy: 50.000000
scenewalltop: 1
scenewallbottom: 1
scenewallleft: 1
scenewallright: 1
scenemaxpolygon: 8
scenepercentage: 0
imageindex: 1
addimage: C:/Users/blair/Documents/Development/projects/AGK/AppGameKit_BaseProject/media/test_circle.png
imageatlas: 0
imagerows: 1
imagecolumns: 1
spriteindex: 0
addtext: Text 1
mediatype: 2
mediavisible: 1
mediatext: Test Scene 1.
spriteposx: 32.000000
spriteposy: 32.000000
spritesizex: 238.000000
spritesizey: 40.000000
spritedepth: 9
spriteindex: 1
addsprite: Sprite 1
mediatype: 1
mediavisible: 1
mediatext:
spriteposx: 64.000000
spriteposy: 192.000000
spritesizex: 352.000000
spritesizey: 352.000000
spritedepth: 5000
REMEND