Merge pull request #443 from DavidSM64/ar4

Assets Revision 4
This commit is contained in:
David Benepe
2024-04-11 14:55:20 -04:00
committed by GitHub
295 changed files with 62442 additions and 8261 deletions
+4 -2
View File
@@ -6,10 +6,12 @@ nonmatchings/*
__pycache__
# Automatically generated folders should be ignored
tools/dkr_assets_tool_src/_build/
build/
assets/
ucode/
!asm/assets/
!mods/*
# Linker file is automatically generated, so it should be ignored
dkr.ld
@@ -30,6 +32,6 @@ m2cfiles/
# Ignore batch and executable files.
*.exe
*.bat
*.bat
dkr_hot_reload.py
lastRomPath.txt
lastRomPath.txt
+9 -41
View File
@@ -12,16 +12,6 @@ VERSION := us_1.0
NON_MATCHING ?= 0
$(eval $(call validate-option,NON_MATCHING,0 1))
COMPILE_ASSETS ?= 0
$(eval $(call validate-option,COMPILE_ASSETS,0 1))
ifeq ($(COMPILE_ASSETS),1)
DUMMY != ./tools/dkr_assets_tool -c $(VERSION) ./assets >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to compile assets)
endif
endif
ifeq ($(VERSION),us_1.0)
DEFINES += VERSION_US_1_0=1
DEFINES += F3DDKR_GBI=1
@@ -100,6 +90,10 @@ endif
DUMMY != python3 ./tools/python/check_if_need_to_extract.py $(VERSION) >&2 || echo FAIL
######## Prebuild step (Compile assets, generate linker file, etc.) ########
DUMMY != ./tools/dkr_assets_tool -dkrv $(VERSION) prebuild >&2 || echo FAIL
################################
endif
@@ -181,8 +175,7 @@ LOADER_FLAGS = -vwf
N64CRC = $(TOOLS_DIR)/n64crc
FIXCHECKSUMS = python3 $(TOOLS_DIR)/python/calc_func_checksums.py $(VERSION)
COMPRESS = $(TOOLS_DIR)/dkr_assets_tool -fc
BUILDER = $(TOOLS_DIR)/dkr_assets_tool -b $(VERSION) ./assets
BUILDER = $(TOOLS_DIR)/dkr_assets_tool -dkrv $(VERSION) build
LIB_DIRS := lib
ASM_DIRS := asm asm/boot asm/assets lib/asm lib/asm/non_decompilable
@@ -229,13 +222,12 @@ JSON_FILES := $(shell find $(ASSETS) -type f -name '*.json')
IGNORE_JSON_FILES := $(shell find $(ASSETS) -type f -name '*.meta.json')
JSON_FILES := $(filter-out $(IGNORE_JSON_FILES),$(JSON_FILES))
# Add .cbin files
CBIN_FILES := $(shell find $(ASSETS) -type f -name '*.cbin')
#CBIN_FILES := $(shell find $(ASSETS) -type f -name '*.cbin')
# Add .bin files
BIN_FILES := $(shell find $(ASSETS) -type f -name '*.bin')
ALL_FILES := $(CBIN_FILES) $(BIN_FILES) $(JSON_FILES)
#BIN_FILES := $(shell find $(ASSETS) -type f -name '*.bin')
ALL_FILES := $(JSON_FILES)
ALL_FILES_OUT := $(foreach FILE,ALL_FILES,$($(FILE):$(ASSETS)%=$(ASSETS_BUILD_DIR)%))
ALL_FILES_OUT := $(foreach FILE,ALL_FILES_OUT,$($(FILE):$.cbin%=$.bin%))
ALL_FILES_OUT := $(foreach FILE,ALL_FILES_OUT,$($(FILE):$.json%=$.bin%))
DIRECTORY = $(sort $(dir $(ALL_FILES_OUT))) $(addprefix $(BUILD_DIR)/,$(LIB_DIRS) $(ASM_DIRS) $(SRC_DIRS) ucode)
@@ -250,22 +242,10 @@ $$(BASE_PATH).bin: $1
$(eval ALL_ASSETS_BUILT+=$(BASE_PATH).bin)
endef
# $1 = Print message
define BIN_FILE_ACTION
$$(call print,$1:,$$<,$$@)
$$(V)$$(ASSETS_COPY) $$^ $$@
endef
# $1 = Print message
define CBIN_FILE_ACTION
$$(call print,$1:,$$<,$$@)
$$(V)$$(COMPRESS) $$^ $$@
endef
# $1 = Print message
define JSON_FILE_ACTION
$$(call print,$1:,$$<,$$@)
$$(V)$$(BUILDER) $$< $$@
$$(V)$$(BUILDER) -i $$< -o $$@
endef
# Microcode
@@ -361,18 +341,6 @@ dont_remove_asset_files: $(ALL_ASSETS_BUILT)
######## Asset Targets ########
$(BUILD_DIR)/enumsCache.bin: include/enums.h
$(call print,Building enums.h cache:,$<,$@)
$(V)$(TOOLS_DIR)/dkr_assets_tool -bc $(VERSION) $<
dkr.ld: $(BUILD_DIR)/enumsCache.bin
@$(PRINT) "$(YELLOW)Generating Linker File...$(NO_COL)\n"
$(V)./generate_ld.sh $(VERSION)
ALL_ASSETS_BUILT += dkr.ld # This is a hack, but it works I guess.
$(foreach FILE,$(BIN_FILES),$(eval $(call DEFINE_ASSET_TARGET,$(FILE),$(call BIN_FILE_ACTION,Copying))))
$(foreach FILE,$(CBIN_FILES),$(eval $(call DEFINE_ASSET_TARGET,$(FILE),$(call CBIN_FILE_ACTION,Compressing))))
$(foreach FILE,$(JSON_FILES),$(eval $(call DEFINE_ASSET_TARGET,$(FILE),$(call JSON_FILE_ACTION,Building))))
# Microcode target
+3 -2
View File
@@ -20,8 +20,9 @@ As of January 26, 2024, this is our current score:
* `make`, Version 4.2 or higher
* `python3`
* `wget`
* `libpcre2-dev` and `libpcre2-8-0` (Not technically required, but will speedup extracting/building some assets.)
`sudo apt install build-essential pkg-config git python3 wget`
`sudo apt install build-essential pkg-config git python3 wget libpcre2-dev libpcre2-8-0`
### binutils
@@ -32,7 +33,7 @@ You are not required to install a binutils package, but it does speed up the ini
## Setup / Building
1. Install the dependencies
2. Place the ROM file within the `baseroms` directory.
**a.** The name of the ROM file does not matter, but it must end with one of these extensions: `.z64`, `.v64`, `.n64`, or `.rom`. It will be detected automatically from an md5 checksum.
**a.** The name of the ROM file does not matter. It will be detected automatically from an md5 checksum.
**b.** If you use a byte-swapped or little-endian ROM, then it will automatically be converted to a big-endian (.z64) ROM file.
3. Run `make` in the main directory.
**a.** Use the `-jN` argument to use `N` number of threads to speed up building. For example, if you have a system with 4 cores / 4 threads, you should do `make -j4`.
+1974 -1953
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,14 +1,14 @@
# This file was generated by generate_ld.py
# This file is automatically generated. Any changes you make to this file will get overwritten.
.include "macros.inc"
glabel aspMainDataStart
.incbin "./build/us_1.0/ucode/data_audio.bin"
.incbin "build/us_1.0/ucode/data_audio.bin"
glabel rspF3DDKRDataDramStart
.incbin "./build/us_1.0/ucode/data_f3ddkr_dram.bin"
.incbin "build/us_1.0/ucode/data_f3ddkr_dram.bin"
glabel rspF3DDKRDataFifoStart
.incbin "./build/us_1.0/ucode/data_f3ddkr_fifo.bin"
.incbin "build/us_1.0/ucode/data_f3ddkr_fifo.bin"
glabel rspF3DDKRDataXbusStart
.incbin "./build/us_1.0/ucode/data_f3ddkr_xbus.bin"
.incbin "build/us_1.0/ucode/data_f3ddkr_xbus.bin"
glabel rspUnknown2DataStart
.incbin "./build/us_1.0/ucode/data_unknown_2.bin"
.incbin "build/us_1.0/ucode/data_unknown_2.bin"
+7 -7
View File
@@ -1,16 +1,16 @@
# This file was generated by generate_ld.py
# This file is automatically generated. Any changes you make to this file will get overwritten.
.include "macros.inc"
glabel aspMainTextStart
.incbin "./build/us_1.0/ucode/ucode_audio.bin"
.incbin "build/us_1.0/ucode/ucode_audio.bin"
glabel rspF3DDKRBootStart
.incbin "./build/us_1.0/ucode/ucode_boot.bin"
.incbin "build/us_1.0/ucode/ucode_boot.bin"
glabel rspF3DDKRDramStart
.incbin "./build/us_1.0/ucode/ucode_f3ddkr_dram.bin"
.incbin "build/us_1.0/ucode/ucode_f3ddkr_dram.bin"
glabel rspF3DDKRFifoStart
.incbin "./build/us_1.0/ucode/ucode_f3ddkr_fifo.bin"
.incbin "build/us_1.0/ucode/ucode_f3ddkr_fifo.bin"
glabel rspF3DDKRXbusStart
.incbin "./build/us_1.0/ucode/ucode_f3ddkr_xbus.bin"
.incbin "build/us_1.0/ucode/ucode_f3ddkr_xbus.bin"
glabel rspUnknown2Start
.incbin "./build/us_1.0/ucode/ucode_unknown_2.bin"
.incbin "build/us_1.0/ucode/ucode_unknown_2.bin"
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
.incbin "./assets/us_1.0/bin/boot.bin"
.incbin "asm/boot/boot.bin"
Executable → Regular
+546 -375
View File
File diff suppressed because it is too large Load Diff
+1 -4
View File
@@ -21,10 +21,7 @@ if [ -d "$UCODE_DIR" ]; then
rm -r $UCODE_DIR
fi
if ! ./tools/dkr_assets_tool -bc "$VER" ./include/enums.h ; then
exit 1
fi
if ! ./tools/dkr_assets_tool -e "$VER" ./assets ./extract-ver ./baseroms . ; then
if ! ./tools/dkr_assets_tool -dkrv $VER extract ; then
exit 1
fi
+410 -410
View File
File diff suppressed because it is too large Load Diff
+40 -3
View File
@@ -17,6 +17,20 @@ typedef enum SpecialMapId {
SPECIAL_MAP_ID_NO_LEVEL = -1,
} SpecialMapId;
typedef enum Character {
CHARACTER_KRUNCH,
CHARACTER_BUMPER,
CHARACTER_TIPTUP,
CHARACTER_CONKER,
CHARACTER_TIMBER,
CHARACTER_BANJO,
CHARACTER_DRUMSTICK,
CHARACTER_PIPSY,
CHARACTER_TT,
CHARACTER_DIDDY,
NUMBER_OF_CHARACTERS
} Character;
typedef enum Vehicle {
VEHICLE_CAR,
VEHICLE_HOVERCRAFT,
@@ -32,7 +46,8 @@ typedef enum Vehicle {
VEHICLE_BUBBLER,
VEHICLE_WIZPIG,
VEHICLE_ROCKET,
VEHICLE_NO_OVERRIDE = -1, // Only used in Object Maps for the setup point.
NUMBER_OF_VEHICLE_TYPES,
NUMBER_OF_PLAYER_VEHICLES = 3
} Vehicle;
@@ -72,12 +87,34 @@ typedef enum RaceType {
RACETYPE_CUTSCENE_1 = 6, // Not sure what the difference between these two are.
RACETYPE_CUTSCENE_2 = 7,
RACETYPE_BOSS = 8,
RACETYPE_CHALLENGE = 64, // For masking
RACETYPE_CHALLENGE_BATTLE = 64,
RACETYPE_CHALLENGE_BANANAS = 65,
RACETYPE_CHALLENGE_EGGS = 66
RACETYPE_CHALLENGE_EGGS = 66,
RACETYPE_CHALLENGE = 0x40 // For masking
} RaceType;
typedef enum ObjectModelType {
OBJECT_MODEL_TYPE_3D_MODEL,
OBJECT_MODEL_TYPE_SPRITE_BILLBOARD,
OBJECT_MODEL_TYPE_VEHICLE_PART,
OBJECT_MODEL_TYPE_UNKNOWN3,
OBJECT_MODEL_TYPE_MISC
} ObjectModelType;
typedef enum WarpFlag {
WARP_FLAG_NORMAL = -1, // Not a boss warp
WARP_FLAG_BOSS_1,
WARP_FLAG_BOSS_2
} WarpFlag;
typedef enum BalloonType {
BALLOON_TYPE_BOOST,
BALLOON_TYPE_MISSILE,
BALLOON_TYPE_TRAP,
BALLOON_TYPE_SHIELD,
BALLOON_TYPE_MAGNET
} BalloonType;
typedef enum HorizontalAlignmentFlags {
HORZ_ALIGN_LEFT = 0,
HORZ_ALIGN_RIGHT = 1,
File diff suppressed because it is too large Load Diff
+135
View File
@@ -0,0 +1,135 @@
#ifndef _OBJECT_BEHAVIORS_H_
#define _OBJECT_BEHAVIORS_H_
enum ObjectBehaviours {
BHV_NONE,
BHV_RACER,
BHV_SCENERY,
BHV_FISH,
BHV_ANIMATOR,
BHV_WEAPON,
BHV_SMOKE,
BHV_EXIT,
BHV_AUDIO,
BHV_AUDIO_LINE,
BHV_CAMERA_CONTROL,
BHV_SETUP_POINT,
BHV_DINO_WHALE,
BHV_CHECKPOINT,
BHV_DOOR,
BHV_FOG_CHANGER,
BHV_AINODE,
BHV_WEAPON_BALLOON,
BHV_WEAPON_2,
BHV_AUDIO_LINE_2,
BHV_UNK_14,
BHV_UNK_15,
BHV_BOMB_EXPLOSION,
BHV_BALLOON_POP,
BHV_UNK_18,
BHV_UNK_19,
BHV_SKY_CONTROL,
BHV_AUDIO_REVERB,
BHV_TORCH_MIST,
BHV_TEXTURE_SCROLL,
BHV_MODECHANGE,
BHV_STOPWATCH_MAN,
BHV_BANANA,
BHV_LIGHT_RGBA,
BHV_UNK_22,
BHV_UNK_23,
BHV_BUOY_PIRATE_SHIP,
BHV_WEATHER,
BHV_BRIDGE_WHALE_RAMP,
BHV_RAMP_SWITCH,
BHV_SEA_MONSTER,
BHV_BONUS,
BHV_UNK_2A,
BHV_LENS_FLARE,
BHV_LENS_FLARE_SWITCH,
BHV_COLLECT_EGG,
BHV_EGG_CREATOR,
BHV_CHARACTER_FLAG,
BHV_UNK_30,
BHV_ANIMATION,
BHV_ANIMATED_OBJECT,
BHV_CAMERA_ANIMATION,
BHV_INFO_POINT,
BHV_CAR_ANIMATION,
BHV_CHARACTER_SELECT,
BHV_TRIGGER,
BHV_VEHICLE_ANIMATION,
BHV_ZIPPER_WATER,
BHV_UNK_3A,
BHV_WAVE_GENERATOR,
BHV_WAVE_POWER,
BHV_BUTTERFLY,
BHV_PARK_WARDEN,
BHV_UNK_3F,
BHV_WORLD_KEY,
BHV_BANANA_SPAWNER,
BHV_TREASURE_SUCKER,
BHV_LOG,
BHV_LAVA_SPURT,
BHV_POS_ARROW,
BHV_HIT_TESTER,
BHV_MIDI_FADE,
BHV_HIT_TESTER_2,
BHV_EFFECT_BOX,
BHV_TROPHY_CABINET,
BHV_BUBBLER,
BHV_FLY_COIN,
BHV_GOLDEN_BALLOON,
BHV_LASER_BOLT,
BHV_LASER_GUN,
BHV_PARK_WARDEN_2,
BHV_ANIMATED_OBJECT_2,
BHV_ZIPPER_GROUND,
BHV_OVERRIDE_POS,
BHV_WIZPIG_SHIP,
BHV_ANIMATED_OBJECT_3,
BHV_ANIMATED_OBJECT_4,
BHV_TAJ_TELEPOINT,
BHV_SILVER_COIN,
BHV_BOOST,
BHV_WARDEN_SMOKE,
BHV_UNK_5B,
BHV_UNK_5C,
BHV_ZIPPER_AIR,
BHV_UNK_5E,
BHV_DYNAMIC_LIGHT_OBJECT_2,
BHV_SNOWBALL,
BHV_SNOWBALL_2,
BHV_TELEPORT,
BHV_ROCKET_SIGNPOST,
BHV_ROCKET_SIGNPOST_2,
BHV_SNOWBALL_3,
BHV_SNOWBALL_4,
BHV_HIT_TESTER_3,
BHV_HIT_TESTER_4,
BHV_RANGE_TRIGGER,
BHV_UNK_6A,
BHV_BOSS_HAZARD_TRIGGER,
BHV_FIREBALL_OCTOWEAPON,
BHV_FROG,
BHV_SILVER_COIN_2,
BHV_TT_DOOR,
BHV_MIDI_FADE_POINT,
BHV_DOOR_OPENER,
BHV_UNK_72,
BHV_PIG_ROCKETEER,
BHV_FIREBALL_OCTOWEAPON_2,
BHV_LEVEL_NAME,
BHV_MIDI_CHANNEL_SET,
BHV_WIZPIG_GHOSTS,
BHV_UNK_78,
BHV_UNK_79,
BHV_UNK_7A,
BHV_UNK_7B,
BHV_UNK_7C,
BHV_UNK_7D,
BHV_UNK_7E,
BHV_UNK_7F
};
#endif
-8
View File
@@ -705,14 +705,6 @@ typedef struct LevelModel {
/* 0x48 */ s32 modelSize;
} LevelModel;
typedef enum {
OBJECT_MODEL_TYPE_3D_MODEL,
OBJECT_MODEL_TYPE_SPRITE_BILLBOARD,
OBJECT_MODEL_TYPE_VEHICLE_PART,
OBJECT_MODEL_TYPE_UNKNOWN3,
OBJECT_MODEL_TYPE_MISC
} ObjectModelType;
typedef struct ObjHeaderParticleEntry {
/* 0x00 */ s32 upper;
/* 0x04 */ s32 lower;
@@ -0,0 +1,12 @@
{
"files": {
"order": [
"ASSET_TEX2D_COMICFANS"
],
"sections": {
"ASSET_TEX2D_COMICFANS": {
"filename": "font/comicfans/comicfans.json"
}
}
}
}
@@ -0,0 +1,8 @@
{
"fonts": {
"ASSET_FONTS_COMICFANS": "game_fonts/ComicFans.meta.json"
},
"fonts-order": [
"ASSET_FONTS_COMICFANS"
]
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,5 @@
{
"name": "Comic Fans Font",
"authors" : ["Example", "Damien Guard"],
"description": "A fun 8x8 font that was created by Damien Guard. See: https://damieng.com/typography/zx-origins/comic-fans/"
}
@@ -0,0 +1,14 @@
{
"compressed": true,
"flags": {
"wrap-s": "CLAMP",
"wrap-t": "CLAMP"
},
"format": "IA4",
"images": [
"comicfans.png"
],
"render-mode": "OPAQUE",
"type": "Texture",
"write-size": true
}

Some files were not shown because too many files have changed in this diff Show More