Skip to content

Commit 4fb4802

Browse files
mateusfavarinPedroHLCFRDS
authored
Redhot trackrom (#211)
* fix VRAM load * rebase (#210) * comments * boss cutscene comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * comments * progress * progress * boss cutscene struct data * progress * almost got boss cutscenes working, but Roos head is on his feet * progress * progress * roo head fix * progress * 3 new functions * TeleportSelf working * TeleportSelf working * TeleportSelf working * TeleportSelf working * TeleportSelf working * 74% * bugfixes * fix post-roo door spawn * fix post-roo door spawn * plant bugfix * optimization, removes entire loop * bugfixes * remove dead code * move sps lower to collision function * new mode found * rename flags * OnlineCTR fixes * 60fps fixes * progress * gameModeEnd * comments * overlay rewrite * progress * progress * progress * start implementing custom levels into decomp * more custom level progress * more custom level progress * custom level fixes * remove Prim expansion for custom levels, put back later * custom levels progress * custom levels progress * custom levels work in decomp builds * relic fix * remove map hack, decomp build is nullptr safe * rename extra driver models * remove dead code * debug menu functions in 603 * debug menu functions in 603 * start of profiler integration into retail * profiler progress * debug profiler partially implemented, 1132 byte budget left * debug menu start * debug menu start * reset common.h * progress * progress * timer progress * debug progress * profiler working * profiler progress * profiler vsync/drawsync * pc port fixes * progress * more profiler * DebugMenu flag renamed * DebugMenu structs * progress * debug menu encoding progress * debug menu progress * debug menu draws * debug font in debug menus * progress * progress * folder added * debug menu progress * pc port workaround transparency * fixes * debug progress * debug menu loads levels properly * bugfix * debug menu Square for GO-BACK * progress * timers in pc port * Faradise garage rewrite * UI progress * UI_VS progress * UI_VS progress * UI_VS progress * progress * progress * progress * quip progress * quip progress * quip progress * UI_VsReadDriver * progress * test for persistent primitives * USE_PCDRV (untested) * v1 fixes * PCDRV read=0 * PCDRV size fix * progress * PCDRV draws copyright * progress * progress * LOAD queue refactor, removes hacky fixes from OG game * PCDRV enters gameplay * OG bugfix * rename to XnfFile * rename function * variable rename * Remove dead code, no more size pointers in load queue * progress * LOAD refactor * pc fix * pc fix * pc port hacks removed * save 300 bytes * more defrag * progress * ci: move servers to 64; prioritize mingw32 online-server; fix GCC14 (#196) * ci: disable builds for rebuild_PC * flake: add more targets for online-servers; bump * ci: move to x86-64 and aarch64 * ci: flake bump * online-server: build with GCC14 * flake: prefix pc builds * ci: magic-nix-cache was discontinue; prioritize windows builds * ci: restore PC builds, but let them fail * pc port fixes * USE_DEFRAG -> USE_ALTMODS * fixes * OnlineCTR organizing * debug menu progress * debug menu progress * dbg characters work * FakeCrash->FCrash * bugfix * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * coll notes * progress * progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * coll progress * notes * notes * COLL refactor * comments * progress * progress * progress * progress * progress * vismem progress * vismem progress * vismem progress * vismem progress * vismem progress * vismem progress * vismem progress * cam progress * cam progress * cam progress BlastedLerp struct * cleanup * cleanup * cleanup * cleanup * cleanup * PushBuffer 2 new funcs (thanks Faradise) * struct rename * optimization * optimization * advgarage bugfix * progress * Remove Hardware CriticalSection, use Software CriticalSection * defrag MAIN, required for byte budget, fixes Software CriticalSection * progress * bugfix * debug menu DEPTH fix * profiler 16x9 * 226 test and profiler print * profiling for 226 * 226 test progress * loading screen optimizations * progress * remove critical sections * bugfix * boss spawn fix * LOAD full defrag * remove outdated benchmark * progress * MEMPACK_Init refactor * clearity * bugfix * progress * optimization * bugfix * RenderStars and Decomp (#208) * Stars * Decomp progress * add semicolon * add another semicolon * pc port fix * fix VRAM load (#209) --------- Co-authored-by: Niko <a> Co-authored-by: Pedro Lara Campos <root@pedrohlc.com> Co-authored-by: Agung Firdaus <agung.frds7@gmail.com> * temporarily disable ghosts --------- Co-authored-by: Pedro Lara Campos <root@pedrohlc.com> Co-authored-by: Agung Firdaus <agung.frds7@gmail.com>
1 parent 7bd0497 commit 4fb4802

File tree

5 files changed

+429
-11
lines changed

5 files changed

+429
-11
lines changed

mods/Levels/PS1_TrackROM/buildList.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ common, exe, VehBirth_SetConsts, 0x0, src/engine_stats.c
3232
common, exe, MEMCARD_Save, 0x0, src/memcard_save_hook.c
3333
common, exe, LOAD_DriverMPK, 0x0, src/load_drivers.c
3434
common, exe, VehBirth_GetModelByName, 0x0, src/search_model.c
35-
common, exe, GhostReplay_Init1, 0x0, src/ghost_init.c
35+
common, exe, GhostReplay_Init1, 0x0, src/ghost_init.c
36+
common, exe, GhostReplay_ThTick, 0x0, src/ghost_onUpdate.c
37+
common, exe, CTR_CycleTex_LEV, 0x0, src/cycle_tex.c
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include <common.h>
2+
3+
void CTR_CycleTex_LEV(struct AnimTex* animtex, int timer)
4+
{
5+
int frameIndex;
6+
struct AnimTex* curAnimTex = animtex;
7+
8+
if(animtex == NULL) { return; }
9+
10+
// iterate over All AnimTex's in a row,
11+
// last one loops back to the beginning, could've also just been a null terminator
12+
while (*(int*)curAnimTex != (int)animtex)// I feel like this should just be a do/while with `(int)curAnimText != (int)animtex`, but idk
13+
{
14+
frameIndex = FPS_HALF(timer) + curAnimTex->frameDuration >>
15+
((int)curAnimTex->shiftFactor & 0x1fU);
16+
17+
frameIndex = frameIndex % curAnimTex->numFrames;
18+
curAnimTex->frameIndex = frameIndex;
19+
20+
struct IconGroup4** ptrArray = ANIMTEX_GETARRAY(curAnimTex);
21+
22+
// Save new frame
23+
curAnimTex->ptrActiveTex = (int*)ptrArray[frameIndex]; //why is this line slightly different than CTR_CycleTex_Model.c?
24+
25+
// Go to next AnimTex, which comes after this AnimTex's ptrarray
26+
curAnimTex = (struct AnimTex*)&ptrArray[curAnimTex->numFrames];
27+
}
28+
}

mods/Levels/PS1_TrackROM/src/ghost_init.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
#include <common.h>
1+
#include "utils.h"
22

33
void GhostReplay_ThTick(struct Thread *);
44

55
void GhostReplay_Init(void)
66
{
7+
#ifdef DISABLE_GHOSTS
8+
return;
9+
#else DISABLE_GHOSTS
710
char i;
811
u_short uVar1;
912
int iVar2;
@@ -204,4 +207,5 @@ void GhostReplay_Init(void)
204207
// just so Oxide doesn't block your view
205208
GhostReplay_ThTick(t);
206209
}
210+
#endif
207211
}

0 commit comments

Comments
 (0)