From 8ca700982dc70315bad46d0f3eb9f3f78485d09a Mon Sep 17 00:00:00 2001 From: blameitontherobot <63158504+blameitontherobot@users.noreply.github.com> Date: Tue, 11 Aug 2020 23:33:16 +0100 Subject: [PATCH 1/5] Custom Title Screen Logo still wip, just adds the words "render96" with a subtitle of "super mario 64" --- levels/intro/blue.rgba16.png | Bin 0 -> 114 bytes levels/intro/darkerblue.rgba16.png | Bin 0 -> 114 bytes levels/intro/grey.rgba16.png | Bin 0 -> 114 bytes levels/intro/header.h | 12 +- levels/intro/leveldata.c | 2541 +++++++++++++++++++++++++++- levels/intro/white.rgba16.png | Bin 0 -> 112 bytes src/game/segment7.h | 2 +- src/menu/intro_geo.c | 4 +- 8 files changed, 2538 insertions(+), 21 deletions(-) create mode 100644 levels/intro/blue.rgba16.png create mode 100644 levels/intro/darkerblue.rgba16.png create mode 100644 levels/intro/grey.rgba16.png create mode 100644 levels/intro/white.rgba16.png diff --git a/levels/intro/blue.rgba16.png b/levels/intro/blue.rgba16.png new file mode 100644 index 0000000000000000000000000000000000000000..d4c3840e4a48cbdbb38f9ba65a330019702da72e GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9EFZXnDkGR4^uD5&D; z;uvBfn4BW;`~Un#rUNdGaT~4$GD}Ff9ZoReahRF-;4&k_`o&BpC7RquK=llsu6{1- HoD!Mv&(j2C8T9boFyt I=akR{0GMeW=>Px# literal 0 HcmV?d00001 diff --git a/levels/intro/grey.rgba16.png b/levels/intro/grey.rgba16.png new file mode 100644 index 0000000000000000000000000000000000000000..fefd340b6d0e9e1f6c9678b5d8f63d4a163af1af GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9EFZXnDkGR4^uD5&D; z;uvBfn4FW7^XI$+W5OZ_{fO5q7C;$fc8$B=!BMMmL@q##f=gQu&X%Q~lo FCIHjB8C?JX literal 0 HcmV?d00001 diff --git a/src/game/segment7.h b/src/game/segment7.h index 6692ac6..14fc039 100644 --- a/src/game/segment7.h +++ b/src/game/segment7.h @@ -24,7 +24,7 @@ extern const u8 eu_course_strings_de_table[]; #endif // from intro_segment7 -extern Gfx *intro_seg7_dl_0700B3A0; +extern Gfx *titletest_test_mesh; extern Gfx *intro_seg7_dl_0700C6A0; extern f32 intro_seg7_table_0700C790[]; extern f32 intro_seg7_table_0700C880[]; diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 37c6752..1d3be07 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -112,7 +112,7 @@ Gfx *geo_title_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context) { } guScale(scaleMat, scaleX, scaleY, scaleZ); gSPMatrix(displayListIter++, scaleMat, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH); - gSPDisplayList(displayListIter++, &intro_seg7_dl_0700B3A0); + gSPDisplayList(displayListIter++, &titletest_test_mesh); gSPPopMatrix(displayListIter++, G_MTX_MODELVIEW); gSPEndDisplayList(displayListIter); gTitleZoomCounter++; @@ -142,7 +142,7 @@ Gfx *geo_fade_transition(s32 sp40, struct GraphNode *sp44, UNUSED void *context) if (0) { } } - gSPDisplayList(displayListIter++, &intro_seg7_dl_0700C6A0); + //gSPDisplayList(displayListIter++, &intro_seg7_dl_0700C6A0); gSPEndDisplayList(displayListIter); if (gTitleZoomCounter >= 0x13) { gTitleFadeCounter += 0x1a; From b2025d95324c4365822e8c94518a207dd9c2325d Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Tue, 11 Aug 2020 19:44:11 -0500 Subject: [PATCH 2/5] Fixed md5 validation --- tools/mkzip.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/mkzip.py b/tools/mkzip.py index 07f2857..ffe0153 100644 --- a/tools/mkzip.py +++ b/tools/mkzip.py @@ -30,8 +30,7 @@ with open(sys.argv[1], 'r') as f: for (fname, aname) in lst: path = os.path.join(sys.argv[2], aname) old_md5 = md5(fname); - new_md5 = md5(path); - if not os.path.exists(path) or old_md5 != new_md5: + if not os.path.exists(path) or os.path.exists(path) and old_md5 != md5(path): os.makedirs(os.path.dirname(path), exist_ok=True) copyfile(fname, path) print("Copying: " + path) From 0ca30fbd7e37d95b5020aab418f9412c8a039e5b Mon Sep 17 00:00:00 2001 From: Filipianosol Date: Fri, 14 Aug 2020 02:31:37 +0200 Subject: [PATCH 3/5] Improve title bar --- Makefile | 10 ++++++---- src/pc/pc_main.c | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 62ea99c..12c74cd 100644 --- a/Makefile +++ b/Makefile @@ -136,12 +136,14 @@ TARGET := sm64.$(VERSION) VERSION_CFLAGS := -D$(VERSION_DEF) -D_LANGUAGE_C VERSION_ASFLAGS := --defsym $(VERSION_DEF)=1 -# Stuff for showing the git hash in the intro on nightly builds +# Stuff for showing the git hash in the intro # From https://stackoverflow.com/questions/44038428/include-git-commit-hash-and-or-branch-name-in-c-c-source +GIT_HASH=`git rev-parse --short HEAD` +COMPILE_TIME=`date -u +'%Y-%m-%d %H:%M:%S UTC'` +VERSION_CFLAGS += -DGIT_HASH="\"$(GIT_HASH)\"" -DCOMPILE_TIME="\"$(COMPILE_TIME)\"" + ifeq ($(shell git rev-parse --abbrev-ref HEAD),nightly) - GIT_HASH=`git rev-parse --short HEAD` - COMPILE_TIME=`date -u +'%Y-%m-%d %H:%M:%S UTC'` - VERSION_CFLAGS += -DNIGHTLY -DGIT_HASH="\"$(GIT_HASH)\"" -DCOMPILE_TIME="\"$(COMPILE_TIME)\"" + VERSION_CFLAGS += -DNIGHTLY endif # Microcode diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index ed6ee74..5de4f09 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -213,9 +213,11 @@ void main_func(void) { #endif char window_title[96] = - "Super Mario 64 EX (" RAPI_NAME ")" + "Super Mario 64 Render96ex (" RAPI_NAME ")" #ifdef NIGHTLY " nightly " GIT_HASH + #else + " " GIT_HASH #endif ; From ae1eaab79c78bc66ace4775b33c8ce124955cf04 Mon Sep 17 00:00:00 2001 From: DorfDork Date: Tue, 18 Aug 2020 06:55:51 -0500 Subject: [PATCH 4/5] Added LEGACY_RES Flag --- Makefile | 77 ++++++++------------------------------------------ tools/mkzip.py | 31 ++++++++++++-------- 2 files changed, 31 insertions(+), 77 deletions(-) diff --git a/Makefile b/Makefile index 12c74cd..5dcc4d2 100644 --- a/Makefile +++ b/Makefile @@ -43,9 +43,7 @@ TEXTURE_FIX ?= 0 # Enable extended options menu by default EXT_OPTIONS_MENU ?= 1 # Disable text-based save-files by default -TEXTSAVES ?= 0 -# Load resources from external files -EXTERNAL_DATA ?= 0 +TEXTSAVES ?= 1 # Enable Discord Rich Presence DISCORDRPC ?= 0 @@ -65,8 +63,7 @@ AUDIO_API ?= SDL2 # Controller backends (can have multiple, space separated): SDL2 CONTROLLER_API ?= SDL2 -# Misc settings for EXTERNAL_DATA - +LEGACY_RES ?= 0 BASEDIR ?= res # Automatic settings for PC port(s) @@ -412,7 +409,7 @@ RPC_LIBS := ifeq ($(DISCORDRPC),1) ifeq ($(WINDOWS_BUILD),1) RPC_LIBS := lib/discord/libdiscord-rpc.dll - else ifeq ($(OSX_BUILD),1) + else ifeq ($(OSX_BUILD),1) # needs testing RPC_LIBS := lib/discord/libdiscord-rpc.dylib else @@ -595,14 +592,14 @@ ifeq ($(LEGACY_GL),1) CFLAGS += -DLEGACY_GL endif +# TODO: Remove -DEXTERNAL_DATA + # Load external textures -ifeq ($(EXTERNAL_DATA),1) - CC_CHECK += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" - CFLAGS += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" - # tell skyconv to write names instead of actual texture data and save the split tiles so we can use them later - SKYTILE_DIR := $(BUILD_DIR)/textures/skybox_tiles - SKYCONV_ARGS := --store-names --write-tiles "$(SKYTILE_DIR)" -endif +CC_CHECK += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" +CFLAGS += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" +# tell skyconv to write names instead of actual texture data and save the split tiles so we can use them later +SKYTILE_DIR := $(BUILD_DIR)/textures/skybox_tiles +SKYCONV_ARGS := --store-names --write-tiles "$(SKYTILE_DIR)" ASFLAGS := -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) @@ -670,8 +667,6 @@ else CP := cp endif -ifeq ($(EXTERNAL_DATA),1) - BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/ BASEPACK_LST := $(BUILD_DIR)/basepack.lst @@ -696,9 +691,7 @@ $(BASEPACK_LST): $(EXE) # prepares the resource ZIP with base data $(BASEPACK_PATH): $(BASEPACK_LST) - @$(PYTHON) $(TOOLS_DIR)/mkzip.py $(BASEPACK_LST) $(BASEPACK_PATH) - -endif + @$(PYTHON) $(TOOLS_DIR)/mkzip.py $(BASEPACK_LST) $(BASEPACK_PATH) $(LEGACY_RES) clean: $(RM) -r $(BUILD_DIR_BASE) @@ -797,42 +790,6 @@ ifeq ($(DISCORDRPC),1) endif endif -################################################################ -# TEXTURE GENERATION # -################################################################ - -# RGBA32, RGBA16, IA16, IA8, IA4, IA1, I8, I4 - -ifeq ($(EXTERNAL_DATA),1) - -$(BUILD_DIR)/%: %.png - $(ZEROTERM) "$(patsubst %.png,%,$^)" > $@ - -else - -$(BUILD_DIR)/%: %.png - $(N64GRAPHICS) -i $@ -g $< -f $(lastword $(subst ., ,$@)) - -endif - -$(BUILD_DIR)/%.inc.c: $(BUILD_DIR)/% %.png - hexdump -v -e '1/1 "0x%X,"' $< > $@ - echo >> $@ - -ifeq ($(EXTERNAL_DATA),0) - -# Color Index CI8 -$(BUILD_DIR)/%.ci8: %.ci8.png - $(N64GRAPHICS_CI) -i $@ -g $< -f ci8 - -# Color Index CI4 -$(BUILD_DIR)/%.ci4: %.ci4.png - $(N64GRAPHICS_CI) -i $@ -g $< -f ci4 - -endif - -################################################################ - # compressed segment generation # PC Area @@ -875,19 +832,9 @@ $(SOUND_BIN_DIR)/%.m64: $(SOUND_BIN_DIR)/%.o $(SOUND_BIN_DIR)/%.o: $(SOUND_BIN_DIR)/%.s $(AS) $(ASFLAGS) -o $@ $< -ifeq ($(EXTERNAL_DATA),1) - $(SOUND_BIN_DIR)/%.inc.c: $(SOUND_BIN_DIR)/% $(ZEROTERM) "$(patsubst $(BUILD_DIR)/%,%,$^)" | hexdump -v -e '1/1 "0x%X,"' > $@ -else - -$(SOUND_BIN_DIR)/%.inc.c: $(SOUND_BIN_DIR)/% - hexdump -v -e '1/1 "0x%X,"' $< > $@ - echo >> $@ - -endif - $(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl.inc.c $(SOUND_BIN_DIR)/sound_data.tbl.inc.c $(SOUND_BIN_DIR)/sequences.bin.inc.c $(SOUND_BIN_DIR)/bank_sets.inc.c $(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h @@ -985,4 +932,4 @@ MAKEFLAGS += --no-builtin-rules -include $(DEP_FILES) -print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true +print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true \ No newline at end of file diff --git a/tools/mkzip.py b/tools/mkzip.py index ffe0153..7359bc8 100644 --- a/tools/mkzip.py +++ b/tools/mkzip.py @@ -14,8 +14,8 @@ def md5(fname): hash_md5.update(chunk) return hash_md5.hexdigest() -if len(sys.argv) < 3: - print('usage: mkzip ') +if len(sys.argv) < 4: + print('usage: mkzip ') sys.exit(1) lst = [] @@ -26,13 +26,20 @@ with open(sys.argv[1], 'r') as f: continue tok = line.split() lst.append((tok[0], tok[1])) - - for (fname, aname) in lst: - path = os.path.join(sys.argv[2], aname) - old_md5 = md5(fname); - if not os.path.exists(path) or os.path.exists(path) and old_md5 != md5(path): - os.makedirs(os.path.dirname(path), exist_ok=True) - copyfile(fname, path) - print("Copying: " + path) - else: - print("Skipping: " + path + " - MD5: "+md5(fname)) + if not sys.argv[3] or not sys.argv[3] == "1": + for (fname, aname) in lst: + path = os.path.join(sys.argv[2], aname) + old_md5 = md5(fname) + if not os.path.exists(path) or os.path.exists(path) and old_md5 != md5(path): + os.makedirs(os.path.dirname(path), exist_ok=True) + copyfile(fname, path) + print("Copying: " + path) + else: + print("Skipping: " + path + " - MD5: "+md5(fname)) + else: + zipPath = os.path.join(sys.argv[2], "awesome-legacy.zip") + print("Using Legacy System") + with zipfile.ZipFile(zipPath, 'w', allowZip64=False) as zipf: + for (fname, aname) in lst: + zipf.write(fname, arcname=aname) + print("Legacy - Copying: " + aname) \ No newline at end of file From 2b9330e3f9d315b31fad88613dbf0a669abbc08e Mon Sep 17 00:00:00 2001 From: DorfDork Date: Tue, 18 Aug 2020 07:04:03 -0500 Subject: [PATCH 5/5] Update to makefile for legacy --- Makefile | 72 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5dcc4d2..8884b7d 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,9 @@ TEXTURE_FIX ?= 0 # Enable extended options menu by default EXT_OPTIONS_MENU ?= 1 # Disable text-based save-files by default -TEXTSAVES ?= 1 +TEXTSAVES ?= 0 +# Load resources from external files +EXTERNAL_DATA ?= 0 # Enable Discord Rich Presence DISCORDRPC ?= 0 @@ -63,6 +65,8 @@ AUDIO_API ?= SDL2 # Controller backends (can have multiple, space separated): SDL2 CONTROLLER_API ?= SDL2 +# Misc settings for EXTERNAL_DATA + LEGACY_RES ?= 0 BASEDIR ?= res @@ -409,7 +413,7 @@ RPC_LIBS := ifeq ($(DISCORDRPC),1) ifeq ($(WINDOWS_BUILD),1) RPC_LIBS := lib/discord/libdiscord-rpc.dll - else ifeq ($(OSX_BUILD),1) + else ifeq ($(OSX_BUILD),1) # needs testing RPC_LIBS := lib/discord/libdiscord-rpc.dylib else @@ -592,14 +596,14 @@ ifeq ($(LEGACY_GL),1) CFLAGS += -DLEGACY_GL endif -# TODO: Remove -DEXTERNAL_DATA - # Load external textures -CC_CHECK += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" -CFLAGS += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" -# tell skyconv to write names instead of actual texture data and save the split tiles so we can use them later -SKYTILE_DIR := $(BUILD_DIR)/textures/skybox_tiles -SKYCONV_ARGS := --store-names --write-tiles "$(SKYTILE_DIR)" +ifeq ($(EXTERNAL_DATA),1) + CC_CHECK += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" + CFLAGS += -DEXTERNAL_DATA -DFS_BASEDIR="\"$(BASEDIR)\"" + # tell skyconv to write names instead of actual texture data and save the split tiles so we can use them later + SKYTILE_DIR := $(BUILD_DIR)/textures/skybox_tiles + SKYCONV_ARGS := --store-names --write-tiles "$(SKYTILE_DIR)" +endif ASFLAGS := -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) @@ -667,6 +671,8 @@ else CP := cp endif +ifeq ($(EXTERNAL_DATA),1) + BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/ BASEPACK_LST := $(BUILD_DIR)/basepack.lst @@ -693,6 +699,8 @@ $(BASEPACK_LST): $(EXE) $(BASEPACK_PATH): $(BASEPACK_LST) @$(PYTHON) $(TOOLS_DIR)/mkzip.py $(BASEPACK_LST) $(BASEPACK_PATH) $(LEGACY_RES) +endif + clean: $(RM) -r $(BUILD_DIR_BASE) @@ -790,6 +798,42 @@ ifeq ($(DISCORDRPC),1) endif endif +################################################################ +# TEXTURE GENERATION # +################################################################ + +# RGBA32, RGBA16, IA16, IA8, IA4, IA1, I8, I4 + +ifeq ($(EXTERNAL_DATA),1) + +$(BUILD_DIR)/%: %.png + $(ZEROTERM) "$(patsubst %.png,%,$^)" > $@ + +else + +$(BUILD_DIR)/%: %.png + $(N64GRAPHICS) -i $@ -g $< -f $(lastword $(subst ., ,$@)) + +endif + +$(BUILD_DIR)/%.inc.c: $(BUILD_DIR)/% %.png + hexdump -v -e '1/1 "0x%X,"' $< > $@ + echo >> $@ + +ifeq ($(EXTERNAL_DATA),0) + +# Color Index CI8 +$(BUILD_DIR)/%.ci8: %.ci8.png + $(N64GRAPHICS_CI) -i $@ -g $< -f ci8 + +# Color Index CI4 +$(BUILD_DIR)/%.ci4: %.ci4.png + $(N64GRAPHICS_CI) -i $@ -g $< -f ci4 + +endif + +################################################################ + # compressed segment generation # PC Area @@ -832,9 +876,19 @@ $(SOUND_BIN_DIR)/%.m64: $(SOUND_BIN_DIR)/%.o $(SOUND_BIN_DIR)/%.o: $(SOUND_BIN_DIR)/%.s $(AS) $(ASFLAGS) -o $@ $< +ifeq ($(EXTERNAL_DATA),1) + $(SOUND_BIN_DIR)/%.inc.c: $(SOUND_BIN_DIR)/% $(ZEROTERM) "$(patsubst $(BUILD_DIR)/%,%,$^)" | hexdump -v -e '1/1 "0x%X,"' > $@ +else + +$(SOUND_BIN_DIR)/%.inc.c: $(SOUND_BIN_DIR)/% + hexdump -v -e '1/1 "0x%X,"' $< > $@ + echo >> $@ + +endif + $(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl.inc.c $(SOUND_BIN_DIR)/sound_data.tbl.inc.c $(SOUND_BIN_DIR)/sequences.bin.inc.c $(SOUND_BIN_DIR)/bank_sets.inc.c $(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h