mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-24 00:02:45 +02:00
Initial scaffolding for a PC port of GoldenEye 007, modeled on the Perfect Dark PC port (same Rare "Indy" engine). The N64 build (Makefile + IDA) is untouched; the PC build is a parallel CMake build. Build: - CMakeLists.txt: SDL2 + zlib + OpenGL. Compiles src/game/*.c + curated engine files + libultra audio/gu + port/. Per-region macro sets (ROMID US/EU/JP) mirror the N64 Makefile's LCDEFS exactly. - build-pc.sh, cmake/: configure+build helper and target/SDL2 modules. Port layer (port/): - video/audio/input/fs/romdata/config/system/mixer: stubs with TODO(Phase N) markers and correct interfaces. - libultra.c: libultra OS shims (message queues, VI, PI, AI, EEPROM, controller, PFS/motor no-ops, region-gated osTvType). - gesched.c: software-RSP scheduler replacing src/sched.c task submission. - n64stubs.c: inert stubs for N64-boot + rmon symbols. - random.c: PRNG ported verbatim from src/random.s (bit-exact). - ucode.c: RSP/ASP/GSP microcode segment markers (dummies; Phase 3 TODO). Docs: - docs/PCPortResearch.md: architecture, GE-specific deltas, phased plan, and the scaffolding review (findings A1-A4/B1-B4/C1-C2 + resolutions). - PORTING.md: top-level entry point. See docs/PCPortResearch.md for the full plan.
36 lines
900 B
C
36 lines
900 B
C
#ifndef PORT_INPUT_H
|
|
#define PORT_INPUT_H
|
|
|
|
/*
|
|
* Input: SDL2 keyboard/mouse/gamepad -> N64 controller structs.
|
|
* Modelled on the PD port's port/include/input.h.
|
|
*
|
|
* The game reads controllers via osContInit / osContStartReadData (src/joy.c).
|
|
* This layer populates the N64 controller state (buttons, stick) from SDL
|
|
* events. Default bindings follow the 1964GEPD / Xbox schemes; see the PD
|
|
* port README for the reference table.
|
|
*/
|
|
|
|
#include <PR/ultratypes.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Initialize SDL input. Returns 0 on success. */
|
|
int inputInit(void);
|
|
void inputDestroy(void);
|
|
|
|
/* Poll once per frame; updates the connected-controller state that
|
|
* osContStartReadData / osContRead will return. */
|
|
void inputUpdate(void);
|
|
|
|
/* Number of controllers currently "connected" (1..4). */
|
|
int inputGetNumControllers(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PORT_INPUT_H */
|