mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
CTRL+, and CTRL+. to modify platv
`platv` is a room property that controls platform speed, and it has always worked (other than some weird storage issues due to a bug). However, the editor has no way to edit it currently, so people had to resort to editing the level file by hand, or with a third-party tool. This commit simply adds an easy way to modify platform speed.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
d328be2a03
commit
f3cf771cc8
@@ -2771,17 +2771,46 @@ static void handle_draw_input()
|
||||
ed.x_modifier = key.keymap[SDLK_x];
|
||||
ed.z_modifier = key.keymap[SDLK_z];
|
||||
|
||||
const int room = ed.levx + ed.levy * cl.maxwidth;
|
||||
const int plat_speed = cl.roomproperties[room].platv;
|
||||
|
||||
if (key.keymap[SDLK_COMMA])
|
||||
{
|
||||
ed.current_tool = (EditorTools) POS_MOD(ed.current_tool - 1, NUM_EditorTools);
|
||||
if (key.keymap[SDLK_LCTRL] || key.keymap[SDLK_RCTRL])
|
||||
{
|
||||
cl.roomproperties[room].platv = plat_speed - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ed.current_tool = (EditorTools) POS_MOD(ed.current_tool - 1, NUM_EditorTools);
|
||||
}
|
||||
ed.keydelay = 6;
|
||||
}
|
||||
else if (key.keymap[SDLK_PERIOD])
|
||||
{
|
||||
ed.current_tool = (EditorTools) POS_MOD(ed.current_tool + 1, NUM_EditorTools);
|
||||
if (key.keymap[SDLK_LCTRL] || key.keymap[SDLK_RCTRL])
|
||||
{
|
||||
cl.roomproperties[room].platv = plat_speed + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ed.current_tool = (EditorTools) POS_MOD(ed.current_tool + 1, NUM_EditorTools);
|
||||
}
|
||||
ed.keydelay = 6;
|
||||
}
|
||||
|
||||
if (plat_speed != cl.roomproperties[room].platv)
|
||||
{
|
||||
char buffer[3 * SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(
|
||||
buffer, sizeof(buffer),
|
||||
loc::gettext("Platform speed is now {speed}"),
|
||||
"speed:int",
|
||||
cl.roomproperties[room].platv
|
||||
);
|
||||
ed.show_note(buffer);
|
||||
}
|
||||
|
||||
if (key.keymap[SDLK_SPACE])
|
||||
{
|
||||
ed.toolbox_open = !ed.toolbox_open;
|
||||
|
||||
Reference in New Issue
Block a user