mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +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.
67 lines
1.5 KiB
C
67 lines
1.5 KiB
C
#ifndef GFX_API_H
|
|
#define GFX_API_H
|
|
|
|
/*
|
|
* Public API for the software RSP (fast3d).
|
|
*
|
|
* This is the interface the rest of the port (video.c / gesched.c) uses to
|
|
* drive the RSP. It mirrors the PD port's port/fast3d/gfx_api.h.
|
|
*
|
|
* STATUS: scaffolding — the implementation (gfx_pc.cpp etc.) is brought in
|
|
* during Phase 2 by adapting the PD fast3d. See port/fast3d/README.md.
|
|
*/
|
|
|
|
#ifndef __cplusplus
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#endif
|
|
|
|
#include <PR/gbi.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct GfxRenderingAPI;
|
|
struct GfxWindowManagerAPI;
|
|
|
|
struct GfxDimensions {
|
|
float internal_mul;
|
|
uint32_t width, height;
|
|
float aspect_ratio;
|
|
};
|
|
|
|
struct GfxInitSettings {
|
|
struct GfxWindowManagerAPI *wapi;
|
|
struct GfxRenderingAPI *rapi;
|
|
/* window title / size / fullscreen / etc. — see PD gfx_window_manager_api.h */
|
|
const char *title;
|
|
uint32_t width, height;
|
|
int fullscreen;
|
|
int vsync;
|
|
};
|
|
|
|
/* Current draw-area dimensions (before any scaling). */
|
|
extern struct GfxDimensions gfx_current_dimensions;
|
|
|
|
void gfx_init(const struct GfxInitSettings *settings);
|
|
void gfx_destroy(void);
|
|
|
|
/* Frame boundary. */
|
|
void gfx_start_frame(void);
|
|
void gfx_end_frame(void);
|
|
|
|
/* Run the RSP over a display list (the core of the emulation). */
|
|
void gfx_run(Gfx *commands);
|
|
|
|
/* Options. */
|
|
void gfx_set_target_fps(int fps);
|
|
void gfx_set_texture_filter(int mode);
|
|
void gfx_set_mipmap_filter(int mode);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* GFX_API_H */
|