-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
61 lines (51 loc) · 1.37 KB
/
main.lua
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
emulator = require("emulation.emulator.bizhawk")
require("goldensun.Constants")
require("goldensun.Drawing")
client.SetClientExtraPadding(0, 0, Constants.Screen.RIGHT_GAP,
Constants.Screen.DOWN_GAP)
gui.use_surface("client")
Constants.Screen.HEIGHT = client.screenheight()
Constants.Screen.WIDTH = client.screenwidth()
require("goldensun.GameSettings")
require("goldensun.Encounters")
require("goldensun.Party")
require("goldensun.Movement")
require("goldensun.Camera")
require("goldensun.Enemies")
require("goldensun.Flee")
require("goldensun.Map")
require("goldensun.Info")
require("goldensun.State")
require("goldensun.Toggles")
require("goldensun.Inputs")
require("goldensun.RandomNumber")
require("goldensun.Battle")
GameSettings.initialize()
Map.initialize()
while true do
State.update()
Info.update()
Battle.update()
RandomNumber.update()
Map.update()
Flee.update()
Party.update()
Movement.update()
Camera.update()
Encounters.update()
Enemies.update()
gui.clearGraphics("emu")
Drawing:drawBackground()
emulator:load_joypad(0)
emulator:load_input()
Toggles:draw()
Map:draw()
Movement.draw()
Flee.draw()
Encounters.draw()
Info.drawSections()
if State.in_battle() then Battle.draw() end
Inputs:checkForInput()
Encounters.check()
emulator:frameadvance()
end