Add cvar methods to global functions header and cleanup includes (#152)

* add cvar methods to global functions header and cleanup includes

* fix z_lib.c

* tweak includes
This commit is contained in:
Archez
2024-05-22 09:05:00 -05:00
committed by Garrett Cox
parent ad2bc10ed0
commit 82cf1a4885
17 changed files with 18 additions and 27 deletions
-1
View File
@@ -19,7 +19,6 @@
#include "include/global.h"
#include "include/z64audio.h"
#include "libultraship/libultraship.h"
bool ShouldClearTextureCacheAtEndOfFrame = false;
+1 -6
View File
@@ -1,11 +1,6 @@
#include "ActorViewer.h"
#include "2s2h/BenGui/UIWidgets.hpp"
extern "C" {
#include "global.h"
extern PlayState* gPlayState;
}
#include "global.h"
typedef struct ActorInfo {
u16 id;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
#include "overlays/gamestates/ovl_select/z_select.h"
#include "libultraship/libultraship.h"
#include <libultraship/bridge.h>
extern SceneSelectEntry sScenes[143];
-1
View File
@@ -3,7 +3,6 @@
#include "2s2h/resource/type/Scene.h"
#include <Utils/StringHelper.h>
#include "global.h"
#include "vt.h"
#include "2s2h/resource/type/TextMM.h"
#include <message_data_static.h>
#include <resource/type/Text.h>
+2 -2
View File
@@ -5,9 +5,9 @@
#include <Vertex.h>
extern "C" {
#include "global.h"
#include "vt.h"
#include <z64scene.h>
extern uintptr_t gSegments[NUM_SEGMENTS];
}
LUS::IResource* OTRPlay_LoadFile(PlayState* play, const char* fileName) {
auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResource(fileName);
return res.get();
+1 -5
View File
@@ -1,10 +1,6 @@
#include "BenPort.h"
extern "C" {
#include "z64.h"
#include "vt.h"
#include "global.h"
}
#include <libultraship/libultraship.h>
#include "global.h"
#include <Blob.h>
#include <memory>
#include <cassert>
+1
View File
@@ -9,6 +9,7 @@ extern "C" {
#include "z64.h"
#include "BenPort.h"
#include "libultraship/luslog.h"
#include <public/bridge/consolevariablebridge.h>
void bootproc(void);
void ViConfig_UpdateVi(u32 black);
+8
View File
@@ -5,6 +5,11 @@
#include "segment_symbols.h"
#include "macros.h"
#ifdef __cplusplus
extern "C"
{
#endif
// pre-boot variables
extern u16 gFramebuffer1[SCREEN_HEIGHT][SCREEN_WIDTH]; // at 0x80000500
extern u8 D_80025D00[];
@@ -1762,5 +1767,8 @@ extern u16 D_0F000000[];
extern PlayState* gPlayState;
// #endregion
#ifdef __cplusplus
};
#endif
#endif
+1 -2
View File
@@ -3,8 +3,7 @@
#include "regs.h"
#include "functions.h"
#include "fault.h"
#include "gfxdebuggerbridge.h"
#include "libultraship/libultraship.h"
#include <libultraship/bridge.h>
#include <string.h>
// Variables are put before most headers as a hacky way to bypass bss reordering
-1
View File
@@ -4,7 +4,6 @@
#include "fixed_point.h"
#include "vt.h"
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
#include "libultraship/libultraship.h"
#include <stdio.h>
#define DYNA_RAYCAST_FLOORS 1
+1 -2
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include <libultraship/libultraship.h>
#include <libultraship/bridge.h>
f32 Math_CosS(s16 angle) {
return coss(angle) * SHT_MINV;
@@ -676,7 +676,6 @@ f32 Math_Vec3f_StepTo(Vec3f* start, Vec3f* target, f32 speed) {
void Lib_Nop801004FC(void) {
}
int ResourceMgr_OTRSigCheck(char* imgData);
void* Lib_SegmentedToVirtual(void* ptr) {
if (ResourceMgr_OTRSigCheck(ptr)) {
return ResourceGetDataByName(ptr); // SEGMENTED_TO_VIRTUAL(ptr);
-1
View File
@@ -6,7 +6,6 @@
#include "interface/parameter_static/parameter_static.h"
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
#include "BenPort.h"
#include <libultraship/libultraship.h>
#include "assets/archives/schedule_dma_static/schedule_dma_static_yar.h"
#include "assets/archives/icon_item_static/icon_item_static_yar.h"
#include "assets/archives/icon_item_24_static/icon_item_24_static_yar.h"
-1
View File
@@ -15,7 +15,6 @@
#include "interface/week_static/week_static.h"
#include "BenPort.h"
#include <string.h>
#include "libultraship/libultraship.h"
#include "BenGui/HudEditor.h"
// #region 2S2H [Port] Asset tables we can pull from instead of from ROM
+1 -1
View File
@@ -23,7 +23,7 @@
#include "libc/stdbool.h"
#include "padutils.h"
#include "macros.h"
#include "libultraship/libultraship.h"
#include <libultraship/bridge.h>
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
frameAdvCtx->timer = 0;
-1
View File
@@ -1,5 +1,4 @@
#include "global.h"
#include <libultraship/bridge.h>
/**
* Spawn an object file of a specified ID that will persist through room changes.
@@ -9,7 +9,7 @@
#include "z64view.h"
#include "libc/alloca.h"
#include "overlays/gamestates/ovl_title/z_title.h"
#include "libultraship/libultraship.h"
#include <libultraship/bridge.h>
#include "2s2h/DeveloperTools/BetterMapSelect.h"
void MapSelect_LoadConsoleLogo(MapSelectState* this) {
@@ -13,7 +13,6 @@
#include "overlays/gamestates/ovl_select/z_select.h"
#include <stdlib.h>
#include "BenPort.h"
#include "libultraship/libultraship.h"
void ConsoleLogo_UpdateCounters(ConsoleLogoState* this) {
if ((this->coverAlpha == 0) && (this->visibleDuration != 0)) {