ae52be591b
Adds a new script module exposing Input.bind/value/lastValue/isDown/
wasDown/pressed/released, InputBind.* (the inputbind_t action enum),
and InputButton.* (every named button in the compiled platform's
INPUT_BUTTON_DATA table, e.g. InputButton.SELECT on PSP).
Renames the PLATFORM global to Platform.current for consistency with
Time/Console/Input.
Uppercases every INPUT_BUTTON_DATA .name across inputlinux.c/
inputpsp.c/inputdolphin.c to match the InputButton.* JS constants
(inputButtonGetByName was already case-insensitive, so this doesn't
change matching behavior).
Moves the default key/button-to-action bindings out of
src/duskrpg/input/inputbindmap.h (deleted) and into
assets/scripts/input.js, branching on Platform.current instead of the
old per-platform #ifdefs. Wired in via require('./input.js') from
init.js.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 lines
702 B
TypeScript
18 lines
702 B
TypeScript
// Copyright (c) 2026 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
/// <reference path="require.d.ts" />
|
|
/// <reference path="entity/entity.d.ts" />
|
|
/// <reference path="entity/component/component.d.ts" />
|
|
/// <reference path="entity/component/position.d.ts" />
|
|
/// <reference path="entity/component/physics.d.ts" />
|
|
/// <reference path="entity/component/renderable.d.ts" />
|
|
/// <reference path="scene/scene.d.ts" />
|
|
/// <reference path="display/mesh.d.ts" />
|
|
/// <reference path="time/time.d.ts" />
|
|
/// <reference path="console/console.d.ts" />
|
|
/// <reference path="platform/platform.d.ts" />
|
|
/// <reference path="input/input.d.ts" />
|