Skip to content

Commit

Permalink
Merge pull request #147 from Yanis42/decomp_merge_4
Browse files Browse the repository at this point in the history
Merge ``zeldaret/oot``'s main
  • Loading branch information
Yanis002 authored Oct 20, 2024
2 parents 3d79c29 + 0472b70 commit 84b2ee6
Show file tree
Hide file tree
Showing 1,448 changed files with 112,216 additions and 40,279 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Auto detect text files and perform LF normalization
* text=auto
# Set browser syntax highlighting for certain files
*.inc linguist-language=gas
*.seq linguist-language=gas
include/audio/aseq.h linguist-language=gas
54 changes: 11 additions & 43 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,39 @@ __pycache__/
.pyc
.DS_Store

# Text editor remnants
# IDE files
.vscode/
.vs/
.idea/
CMakeLists.txt
cmake-build-debug
venv/
.venv/
.cache/
compile_commands.json

# Project-specific ignores
.make_options.mk
extracted/
build/
expected/
notes/
baserom/
baseroms/*/segments/
docs/doxygen/
build/*/cache/
*.elf
*.ram
*.sav
*.sra
*.srm
*.z64
*.n64
*.v64
*.map
*.dump
*.wad
*.iso
out.txt
*.ram
*.bin
*.blend1
F3DEX3/*.code
F3DEX3/*.data
wadextract/
isoextract/

# Tool artifacts
tools/mipspro7.2_compiler/
tools/overlayhelpers/batchdisasm/output/*
tools/overlayhelpers/batchdisasm/output2/*
tools/overlayhelpers/batchdisasm/mipsdisasm/*
tools/disasm/output/*
tools/asmsplitter/asm/*
tools/asmsplitter/c/*
# Tools
.venv/
ctx.c
tools/*dSYM/
graphs/

# Assets
*.png
*.jpg
*.mdli
*.anmi
*.obj
*.mtl
*.fbx
!*_custom*
.extracted-assets.json
extracted/
!mod_assets/*

# Docs
!docs/tutorial/
tools/Flips/**/CMakeLists.txt

# Per-user configuration
.python-version
# If you want to use your own gitignore rules without modifying this file:
# - use `git config core.excludesFile path/to/my_gitignore_file`
# - or edit `.git/info/exclude`
63 changes: 63 additions & 0 deletions .make_hackeroot.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk!
# In nearly all cases, not having 'mips-linux-gnu-*' binaries on the PATH is indicative of missing dependencies

# Returns the path to the command $(1) if exists. Otherwise returns an empty string.
find-command = $(shell which $(1) 2>/dev/null)

ifneq ($(call find-command,mips-n64-ld),)
MIPS_BINUTILS_PREFIX := mips-n64-
else ifneq ($(call find-command,mips64-ld),)
MIPS_BINUTILS_PREFIX := mips64-
else ifneq ($(call find-command,mips-linux-gnu-ld),)
MIPS_BINUTILS_PREFIX := mips-linux-gnu-
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
MIPS_BINUTILS_PREFIX := mips64-linux-gnu-
else ifneq ($(call find-command,mips-ld),)
MIPS_BINUTILS_PREFIX := mips-
else ifneq ($(call find-command,mips64-elf-ld),)
MIPS_BINUTILS_PREFIX := mips64-elf-
else
$(error Unable to detect a suitable MIPS toolchain installed)
endif

# Verbose toggle
V := @
ifeq (VERBOSE, 1)
V=
endif

# Colors
NO_COL := \033[0m
GREEN := \033[0;32m
BLUE := \033[0;36m
YELLOW := \033[0;33m
BLINK := \033[32;5m

PRINT := printf

# Generic print function for make rules
define print
$(V)echo -e "$(GREEN)$(1) $(YELLOW)$(2)$(GREEN) -> $(BLUE)$(3)$(NO_COL)"
endef

# Enable optimization flags to use GDB on Ares
ARES_GDB := 1

# Toggle release or debug mode. 1=Release, 0=Debug
# Note: currently only used for HackerOoT
RELEASE := 0

# Valid compression algorithms are 'yaz', 'lzo' and 'aplib'
COMPRESSION ?= yaz
COMPRESSION_TYPE ?= $(shell echo $(COMPRESSION) | tr '[:lower:]' '[:upper:]')

# Platform compatibility flags
TARGET ?=

ifeq ($(TARGET),wad)
CFLAGS := -DCONSOLE_WIIVC -fno-reorder-blocks -fno-optimize-sibling-calls
CPPFLAGS := -DCONSOLE_WIIVC
else ifeq ($(TARGET),iso)
CFLAGS := -DCONSOLE_GC -fno-reorder-blocks -fno-optimize-sibling-calls
CPPFLAGS := -DCONSOLE_GC
endif
148 changes: 138 additions & 10 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"configurations": [
{
"name": "N64 hackeroot-mq",
"compilerPath": "/usr/bin/gcc", // Needs to not be "" for -m32 to work
"name": "hackeroot-mq",
"compilerPath": "/usr/bin/gcc",
"compilerArgs": [
"-m32" // Removes integer truncation warnings with gbi macros
"-m32"
],
"intelliSenseMode": "gcc-x86", // Shouldn't matter
"includePath": [ // Matches makefile's includes
"intelliSenseMode": "gcc-x86",
"includePath": [
"include",
"include/libc",
"src",
Expand All @@ -16,16 +16,144 @@
"extracted/hackeroot-mq"
],
"defines": [
"_LANGUAGE_C", // For gbi.h
"OOT_DEBUG=1", // If targeting a debug version
"_LANGUAGE_C",
"ENABLE_HACKEROOT=1",
"RELEASE_ROM=0",
"COMPRESS_YAZ=1",
"OOT_PAL=1"
"OOT_VERSION=OOT_GC_EU_MQ_DBG",
"OOT_REGION=REGION_EU",
"OOT_PAL=1",
"OOT_MQ=1",
"OOT_DEBUG=1",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE",
"GBI_DEBUG"
],
"cStandard": "gnu11",
"cppStandard": "${default}" // Only ZAPD uses C++, so doesn't really matter
"cStandard": "gnu89",
"cppStandard": "${default}"
},
{
"name": "oot-gc-us",
"compilerArgs": [
"-m32"
],
"includePath": [
"include",
"include/libc",
"src",
"build/gc-us",
".",
"extracted/gc-us"
],
"defines": [
"_LANGUAGE_C",
"ENABLE_HACKEROOT=0",
"RELEASE_ROM=0",
"COMPRESS_YAZ=1",
"OOT_VERSION=OOT_GC_US",
"OOT_REGION=REGION_US",
"OOT_NTSC=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE"
],
"cStandard": "gnu89"
},
{
"name": "oot-gc-eu",
"compilerArgs": [
"-m32"
],
"includePath": [
"include",
"include/libc",
"src",
"build/gc-eu",
".",
"extracted/gc-eu"
],
"defines": [
"_LANGUAGE_C",
"ENABLE_HACKEROOT=0",
"RELEASE_ROM=0",
"COMPRESS_YAZ=1",
"OOT_VERSION=OOT_GC_EU",
"OOT_REGION=REGION_EU",
"OOT_PAL=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE"
],
"cStandard": "gnu89"
},
{
"name": "oot-gc-eu-mq",
"compilerArgs": [
"-m32"
],
"includePath": [
"include",
"include/libc",
"src",
"build/gc-eu-mq",
".",
"extracted/gc-eu-mq"
],
"defines": [
"_LANGUAGE_C",
"ENABLE_HACKEROOT=0",
"RELEASE_ROM=0",
"COMPRESS_YAZ=1",
"OOT_VERSION=OOT_GC_EU_MQ",
"OOT_REGION=REGION_EU",
"OOT_PAL=1",
"OOT_MQ=1",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE"
],
"cStandard": "gnu89"
},
{
"name": "oot-gc-eu-mq-dbg",
"compilerArgs": [
"-m32"
],
"includePath": [
"include",
"include/libc",
"src",
"build/gc-eu-mq-dbg",
".",
"extracted/gc-eu-mq-dbg"
],
"defines": [
"_LANGUAGE_C",
"ENABLE_HACKEROOT=0",
"RELEASE_ROM=0",
"COMPRESS_YAZ=1",
"OOT_VERSION=OOT_GC_EU_MQ_DBG",
"OOT_REGION=REGION_EU",
"OOT_PAL=1",
"OOT_MQ=1",
"OOT_DEBUG=1",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE",
"GBI_DEBUG"
],
"cStandard": "gnu89"
}
],
"version": 4
}

3 changes: 2 additions & 1 deletion INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ The build process has the following package requirements:
* python3-venv
* libpng-dev
* gcc-mips-linux-gnu
* libxml2-dev

Under Debian / Ubuntu (which we recommend using), you can install them with the following commands:

```bash
sudo apt-get update
sudo apt-get install git build-essential binutils-mips-linux-gnu python3 python3-pip python3-venv libpng-dev gcc-mips-linux-gnu
sudo apt-get install git build-essential binutils-mips-linux-gnu python3 python3-pip python3-venv libpng-dev gcc-mips-linux-gnu libxml2-dev
```

#### 2. Clone the repository
Expand Down
Loading

0 comments on commit 84b2ee6

Please sign in to comment.