-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvf4_training.lua
More file actions
52 lines (44 loc) · 1.37 KB
/
Copy pathvf4_training.lua
File metadata and controls
52 lines (44 loc) · 1.37 KB
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
require "vf4_training.global_variables"
require "vf4_training.memory_addresses.vf4evo"
require "vf4_training.memory_addresses.vf4ft"
require "vf4_training.frame_data.frame_data_overlay"
require "vf4_training.training.training_overlay"
require "vf4_training.players_info"
require "vf4_training.utils.utils"
function Overlay()
if HIDE_UI then
if (INPUT.getButtons(1) == 0xFFFFEFFF) then
HIDE_UI = false
end
end
if GAME_ADDRESSES ~= nil and HIDE_UI ~= true then
PlayersInfo.initialize_values()
FrameDataOverlay.start()
TrainingOverlay.start()
Training.process_inputs()
ChangeCostume()
end
end
function CheckRom()
local rom_name = flycast.state.gameId
if rom_name == 'VF4 FINAL TUNED JAPAN' then
GAME_ADDRESSES = FT_MEMORY_TABLE
elseif rom_name == 'VF4 EVOLUTION JAPAN' then
GAME_ADDRESSES = EVO_MEMORY_TABLE
end
end
function ChangeCostume()
if MEMORY.read16(GAME_ADDRESSES.game_sub_state) == 3 then
if (INPUT.getButtons(1) == 0xFFFFFFF8) and MEMORY.read8(GAME_ADDRESSES.p1_costume) == 0 then
MEMORY.write8(GAME_ADDRESSES.p1_costume, 2)
end
if (INPUT.getButtons(1) == 0xFFFFFFF8) and MEMORY.read8(GAME_ADDRESSES.p1_costume) == 1 then
MEMORY.write8(GAME_ADDRESSES.p1_costume, 3)
end
end
end
GAME_ADDRESSES = FT_MEMORY_TABLE
flycast_callbacks = {
start = CheckRom,
overlay = Overlay
}