Skip to content

Commit

Permalink
added initial RM2C output
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusyoshi54 committed Feb 15, 2021
1 parent 724fcf6 commit 83b60af
Show file tree
Hide file tree
Showing 817 changed files with 318,289 additions and 5,146 deletions.
46 changes: 46 additions & 0 deletions ImportInstructions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
This file will contain instructions on how to import RM2C data into the sm64ex-alo repo.
First you should always copy the exported folders (/src,/levels,/sound,/text,/textures,/actors) into your repo.
Then make sure you set RM2C inside the makefile to 1
Then to build for PC use this input to terminal: "make clean && make -j4 TARGET_N64=0 TARGET_ARCH=native WINDOWS_BUILD=1 TARGET_GAME_CONSOLE=0 DEBUG=1 NODRAWINGDISTANCE=1"
Then to build for N64 use this input to terminal: "make clean && make -j4"
By default, due to their high variability and unique names, no actor data will be included from RM2C output, you must
go per actor and either copy data from a custom.model.inc.c file to the model.inc.c file, or change the includes in group files.

Level specific models will go into a folder inside of /actors/ with the name of the level they belong to. You must copy these folders
over to their level folders. The directory should match the target level dir, and not overwrite any files. Textures should be pre written
to the target level directories.

Below are some warnings generated by RM2C during extraction.
It is expected to have many warnings for editor files and for roms with lots of custom content.

******************************************************************************************

Levels with fog in sm64 editor and likely early versions of Rom Manager are completely broken and destroy the levels graphics and most non opaque objects.
I attempt to auto fix these, if there is any issue in these levels check fog first.

Level bbh Display List DL_bbh_1_0xe009020 has fog, for editor, fog DLs are heavily edited, potential for gfx errors.
Level wdw Display List DL_wdw_1_0xe039980 has fog, for editor, fog DLs are heavily edited, potential for gfx errors.
Level jrb Display List DL_jrb_1_0xe008b80 has fog, for editor, fog DLs are heavily edited, potential for gfx errors.
Level ttc Display List DL_ttc_1_0xe035930 has fog, for editor, fog DLs are heavily edited, potential for gfx errors.
Level rr Display List DL_rr_1_0xe0390f0 has fog, for editor, fog DLs are heavily edited, potential for gfx errors.
Level rr Display List DL_rr_1_0xe0493d0 has fog, for editor, fog DLs are heavily edited, potential for gfx errors.

Known methods of crashing:
*****************************************************************************
ALL BUILDS
IF CRASH ON BOOT - CHECK SEQUENCES
IF TITLE SCREEN LOOP - CHECK START LEVEL IN TWEAKS.INC.C
IF TEXTURES ARE MESSED UP - ALWAYS CHECK LEVEL FOG FIRST
IF ONLY ALPHA TEXTURES MESSED UP - MOVE FOG GEO LAYOUT TO LAYER 1/4 FROM 4/6
IF CRASH UPON ENTERING A LEVEL, CHECK OBJECTS. IF EDITOR, CHECK SCROLLS FIRST. IF NO OBJECTS BAD CHECK SEQUENCES
*****************************************************************************
N64 BUILD
IF SURFACE NODE POOOL OR SURFACE POOL FULL - ADD MORE TRIS TO EXT BOUNDS.H
IF CRASH ON STAR SELECT - PUSH FORWARD GODDARD SEGMENT IN SEGMENTS.H
*****************************************************************************

MORE ON AUDIO ERRORS:
On N64 build, a lack of proper audio memory allocation will instantly crash the game. If this happens, extend gAudioHeap in buffers.c
If you have issues with certain m64s sounding garbled, extend gAlBankSets in load.c (line 2000 about).
If sound cuts out at certain points, extend values in gAudioSessionPresets.
If background music cuts out after cutscenes end stub seq_player_lower_volume and seq_player_unlower_volume in external.c (will remove volume adjustments from the entire game).
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NON_MATCHING ?= 1
COMPILER_N64 ?= gcc

# Accept RM2C level folder output
RM2C ?= 0
RM2C ?= 1

# Build for original N64 (no pc code)
TARGET_N64 = 1
Expand Down
2 changes: 1 addition & 1 deletion actors/star/model.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static const Lights1 star_seg3_lights_0302A6D8 = gdSPDefLights1(

// 0x0302A6F0
ALIGNED8 static const Texture star_seg3_texture_0302A6F0[] = {
#include "actors/star/star_surface.rgba16.inc.c"
#include "actors/star/star_surface_custom.rgba16.inc.c"
};

// 0x0302AEF0
Expand Down
Binary file added actors/star/star_surface_custom.rgba16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 83b60af

Please sign in to comment.