0% found this document useful (0 votes)
769 views15 pages

Super Mario 64 Decomp Mega Document

The document outlines the file structure and organization of the source code for Super Mario 64, describing key folders like actors, levels, and src that contain object data, level scripts, and game code respectively. It provides an overview of how objects work through behavior scripts defined in behavior_data.c and implemented in files like goomba.inc.c, and how the object list processor updates objects each frame by calling their behaviors.

Uploaded by

E B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
769 views15 pages

Super Mario 64 Decomp Mega Document

The document outlines the file structure and organization of the source code for Super Mario 64, describing key folders like actors, levels, and src that contain object data, level scripts, and game code respectively. It provides an overview of how objects work through behavior scripts defined in behavior_data.c and implemented in files like goomba.inc.c, and how the object list processor updates objects each frame by calling their behaviors.

Uploaded by

E B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

1

Super Mario 64
Decomp Mega Document
2

Table of Contents
File Structure...........................................................................................................................................3
Working with Github to save Progress....................................................................................................4
Actors Folder...............................................................................................................................................5
How Objects Work.......................................................................................................................................6
3

File Structure
├── actors: object behaviors, geo layout, and display lists
├── asm: handwritten assembly code, rom header
│ └── non_matchings: asm for non-matching sections
├── assets: animation and demo data
│ ├── anims: animation data
│ └── demos: demo data
├── bin: C files for ordering display lists and textures
├── build: output directory
├── data: behavior scripts, misc. data
├── doxygen: documentation infrastructure
├── enhancements: example source modifications
├── include: header files
├── levels: level scripts, geo layout, and display lists
├── lib: SDK library code
├── rsp: audio and Fast3D RSP assembly code
├── sound: sequences, sound samples, and sound banks
├── src: C source code for game
│ ├── audio: audio code
│ ├── buffers: stacks, heaps, and task buffers
│ ├── engine: script processing engines and utils
│ ├── game: behaviors and rest of game source
│ ├── goddard: Mario intro screen
│ └── menu: title screen and file, act, and debug level selection menus
├── text: dialog, level names, act names
├── textures: skybox and generic texture data
└── tools: build tools
4

Working with Github to save Progress


Use Github Desktop

Fork branches when creating new hacks

D:/Sm64 is where the folders are being saved

/mnt/d in ubuntu to get to d drive

Make after each change

Make -j4 for 4 core make (makes it go faster)


5

Actors Folder

This folder contains model data, animations, and object bank data.

Each actor has their own file at the top that contains model and animation data.

At the bottom, groups represent Content Banks as shown below.


6

How Objects Work


Data
The behavior_data.c file holds most of the bevavior script data for
objects.
File Structure
Top of Page -> Include statements (Import)
Next -> define BC
After -> Common Functions
Examples:
CALL_NATIVE
SET_MODEL
DROP_TO_FLOOR
DEACTIVATE (despawn object)
HIDE
SET_HOME
SET_INTERACT_TYPE
7

Finally -> Behavior Script Declarations

The CALL_NATIVE function calls functions in the game -> behaviors ->
<corresponding file>. The BEGIN_LOOP – END LOOP runs object.
8

Src -> Game


9

Goomba as an Example

(In Data-> behavior.data.c)

Goomba Behavior Script is declared in the behavior mega file. It then makes calls to the goomba’s file.

(In Game -> Behaviors -> goomba.inc.c)

The update plays the goomba’s ai.


10
11
12
13
14

Generic Behavior Functions


Held in

Src -> game -> Obj_behaviors.c

Obj_behaviors2.c

Object List Processor


Game -> object_list_processor.c

Runs game each frame

UpdateObjects()

Declares a lot of common variables like gCurrentObject.

Commonly denoted as o and means the current object being considered.

Game_init
Src -> game

Contains controller info plus input…

Adding Objects to a level


Levels -> <Level Name> -> script.c

Add object in OBJECT() function

#include behavior_data.h
15

#include actors/<Object Bank>

#include model_ids.h

Data -> behavior_data.c

Holds corresponding behavior data

Player Input

Thread5_game_loop in game_init.c

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy