mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-27 01:00:30 +01:00
77 lines
3.7 KiB
C
77 lines
3.7 KiB
C
/*
|
|
HALO_LINUX_SOURCE_FIXUPS.H
|
|
|
|
Game-only workarounds for source that MSVC accepts but clang rejects, where
|
|
editing the source itself would change the byte-matched MSVC output (see
|
|
port/linux/README.md for how each was checked).
|
|
*/
|
|
|
|
#ifndef __HALO_LINUX_SOURCE_FIXUPS_H
|
|
#define __HALO_LINUX_SOURCE_FIXUPS_H
|
|
|
|
/* rasterizer.h declares rasterizer_debug_drawing_begin(boolean opaque) while
|
|
rasterizer_xbox_debug.h declares a second `long zbias` parameter, and
|
|
rasterizer_debug.c includes both and passes two arguments. MSVC tolerates
|
|
the mismatch; the definition ignores zbias. Adding the parameter to
|
|
rasterizer.h perturbs MSVC's register allocation elsewhere, so instead every
|
|
declaration and call collapses to the one-parameter form here. */
|
|
#define rasterizer_debug_drawing_begin(opaque, ...) (rasterizer_debug_drawing_begin)(opaque)
|
|
|
|
/* frames between the 30 Hz ticks (port/linux/game/render_interpolation.c);
|
|
the platform layer reads the display.interpolation setting */
|
|
struct observer_result;
|
|
struct render_camera;
|
|
struct real_matrix4x3;
|
|
int halo_interpolation_enabled(void);
|
|
float game_time_get_tick_fraction(void);
|
|
void render_interpolation_tick(void);
|
|
void render_interpolation_reset(void);
|
|
void render_interpolation_frame_begin(void);
|
|
void render_interpolation_frame_end(void);
|
|
float render_interpolation_fraction(void);
|
|
struct real_matrix4x3 *render_interpolation_object_node_matrices(long object_index);
|
|
struct observer_result const *render_interpolation_camera(short local_player_index,
|
|
struct observer_result const *observer);
|
|
void render_interpolation_first_person(short local_player_index, struct real_matrix4x3 *node_matrices,
|
|
short node_count, struct render_camera const *camera);
|
|
float render_interpolation_game_time_sec(long ticks);
|
|
|
|
/* the Custom Edition tag cache window, or NULL unless the
|
|
game.custom_edition setting reserved it (port/linux/src/xbox_memory.c) */
|
|
void *halo_custom_edition_tag_cache(void);
|
|
/* where Halo PC keeps the channels of the pixels a Custom Edition bitmap
|
|
just arrived at (an enum custom_edition_channel_order,
|
|
port/linux/game/cache_file_formats.h), which the renderer then samples in
|
|
this build's order; forgotten together when the map goes
|
|
(port/linux/src/xbox_textures.c) */
|
|
void halo_custom_edition_texels_channels(const void *texels, unsigned char channel_order);
|
|
void halo_custom_edition_texels_forget(void);
|
|
/* whether a Halo Custom Edition map's multiplayer vehicles are chosen by
|
|
their placements' spawn flags, as in retail Halo, and whether a vehicle
|
|
placement is placed in the running game
|
|
(port/linux/game/custom_edition_objects.c) */
|
|
struct scenario_object_datum;
|
|
unsigned char custom_edition_vehicles_by_placement(void);
|
|
unsigned char custom_edition_vehicle_placement_allowed(struct scenario_object_datum const *placement);
|
|
|
|
/* the width of the screen the game draws, 480 lines tall: the device's or
|
|
the display's shape, or 640 (port/linux/src/d3d8_gl.c) */
|
|
long halo_screen_width(void);
|
|
/* takes up a new width between frames (F11); returns the width */
|
|
long halo_screen_commit(void);
|
|
/* the shadow maps' pixels for each of their 128 texels each way, a power of
|
|
two (display.shadow_resolution) */
|
|
long halo_shadow_map_scale(void);
|
|
/* while TRUE, drawing shifts right to center 640-column layouts */
|
|
void halo_screen_ui_offset(unsigned char centered);
|
|
/* names a model lighting vertex program, whose draws can be lit for each
|
|
pixel (port/linux/src/d3d8_gl.c, display.per_pixel_lighting) */
|
|
void halo_vertex_shader_lighting(unsigned long handle);
|
|
/* display.anti_aliasing's pass over a window's 3D view, before the HUD and
|
|
menus (source/render/render.c): the window's bounds on the screen */
|
|
void halo_screen_anti_alias(short x0, short y0, short x1, short y1);
|
|
/* the mouse in the menus (source/interface/ui_widget.c) */
|
|
#include "halo_ui_pointer.h"
|
|
|
|
#endif
|