-
Notifications
You must be signed in to change notification settings - Fork 0
/
vlib_conf.lua
149 lines (125 loc) · 4.11 KB
/
vlib_conf.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
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
--- Stores VeritaLib preprocessor configuration, such as debug mode behaviors and target resolution.
---@class vlib_conf
local vlib_conf = {
--------- Debug ---------
--- Controls VeritaLib debug behaviors.
debug = {
--- Whether to enable VeritaLib debug behaviors.
enable = true,
--- The rest of the fields in this table will be ignored if `enable` is false.
--- Debug controls, keyboard only.
--- Resides in the `debug` input context.
input_commands = {
show_ui = "F12",
},
},
--------- General ---------
--- Game-specific default values for `config.json`.
default_config = {
dgpu_trick = false,
gpu = "",
fullscreen_resolution = {
width = 1920,
height = 1080,
},
window_size = {
width = 1600,
height = 900,
},
refresh_rate_numerator = 0,
refresh_rate_denominator = 0,
windowed = true,
vsync = false,
window_scaling = "aspect",
deadzone = 0.25,
dir_threshold = 0.35,
},
--- Whether to enable Dear ImGui in the result.
--- Implied by `debug.enable`.
enable_imgui = true,
--------- Resources ---------
--- Size of one texture page.
texpage_size = 4096,
--------- Input ---------
--- A list of commands used by your game mapped to their default inputs.
--- Split into several contexts, which can be checked independently from each other.
input_commands = {
-- Example configuration
-- Example menu context
menu = {
dir = {
-- In this case, creates boolean inputs dir.up, dir.down, dir.left, and dir.right
type = "directional",
keyboard = {
-- See lstg.Input.Keyboard module
up = "Up",
down = "Down",
left = "Left",
right = "Right",
},
gamepad = {
-- See xinput module
up = "Up",
down = "Down",
left = "Left",
right = "Right",
},
-- Does not create analog input for joysticks, joysticks are mapped to boolean inputs.
joystick = "both",
repeating = true
},
accept = {
type = "button",
keyboard = "Z",
gamepad = "A",
},
back = {
type = "button",
keyboard = "X",
gamepad = "B",
},
},
-- Example game context
game = {
dir = {
-- In this case, creates analog inputs dir.x and dir.y, and creates boolean inputs
-- dir.up, dir.down, dir.left, and dir.right.
-- Boolean inputs are checked for keyboard only.
type = "analog",
keyboard = {
-- See lstg.Input.Keyboard
up = "Up",
down = "Down",
left = "Left",
right = "Right",
},
-- Set gamepad to nil as dpad will not be used.
-- Creates analog input for joysticks, digital buttons are mapped to analog inputs.
joystick = "left",
},
shot = {
type = "button",
keyboard = "Z",
gamepad = "A",
},
bomb = {
type = "button",
keyboard = "X",
gamepad = "B",
},
},
},
--------- Source Result ---------
--- Whether to remove comments in the output.
--- Implied by `minify`.
no_comments = false,
--- Whether to minify the Lua files (removes comments + insignificant whitespace).
minify = false,
--------- Viewport ---------
--- Game target resolution.
target_res = {
width = 1920,
height = 1080,
},
}
return vlib_conf