Remove redundant s2d directory and delete unused files/defines (#457)

This commit is contained in:
thecozies authored and GitHub committed 2022-09-21 20:18:37 -05:00
1 parent 2e701ad9e7
commit de34eb3b84
80 files changed
+13 -18711

No files matched your search

+1 -3
View File
@@ -26,9 +26,7 @@
"VERSION_US=1",
"F3DEX_GBI_2=1",
"F3DZEX_NON_GBI_2=1",
"F3DEX_GBI_SHARED=1",
"NON_MATCHING=1",
"AVOID_UB=1"
"F3DEX_GBI_SHARED=1"
],
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
"cStandard": "gnu17",
-416
View File
@@ -1,416 +0,0 @@
Refresh 15 (mostly a hotfix for RSP microcode selection)
1.) Renamed frame_buffer funcs and _ZBUFFER (#1184)
2.) RSP Microcode Hotfix (#1183)
3.) Label osSetTimer.c (#1182)
4.) Fix styling (#1177)
5.) Rename all `FrameBuffer` variants to `Framebuffer` (#1176)
6.) Remove (WIP) from sh.
7.) Allow both archives and ELF objects to be patched (#1127)
Refresh 14
1.) Label whomp and some object fields (#1174)
2.) Generate MIO0 object files using binutils `ld` instead of `as` (#1173)
3.) Bowser documentation (#1166)
4.) Fix comment syntax in 00_sound_player.0 (#1172)
5.) Rename in-game menu variables (#1163)
6.) Document double red coin sound and JP sound glitch (#1170)
7.) Document different bug in external.c (#1168)
8.) updated names/types of octagonal platform data (#1164)
9.) Label a number of unnamed variables. (#1169)
10.) Document JP PU sound glitch (#1167)
11.) Set model ids to spawn_triangle_break_particles (#1165)
12.) Fix borders in clear_frame_buffer (#1162)
13.) Fix seq header files for 64-bit (#1161)
14.) Game_init.c remaining doc (#1158)
15.) Label a couple static variables in sound_init.c (#1159)
16.) Properly define dialog values (status, flags, cutscenes) (#1153)
17.) Label all of amp's assets. (#1018)
18.) Split audio/synthesis.c into Shindou/non-Shindou files (#1144)
19.) Avoid CC_CHECK warnings when using gcc (#1157)
20.) level_select_menu.c => title_screen.c (#1152)
21.) Use C preprocessor on assembly files (#1126)
22.) Replace output_level_headers.py with sed equivalent (#1109)
23.) Fix CC_CHECK warnings related to unused symbols and UB (#1155)
24.) Define remaining floor lower limit values (#1147)
25.) use r+b mode for libultra.a patch tool (#1148)
26.) Use proper values for gPrevFrameObjectCount ifs (#1146)
27.) Some minor bowser.inc.c labelling. (#1150)
28.) fix king bob-omb texture pointers (#1145)
29.) Split audio/load.c into Shindou/non-Shindou files (#1143)
30.) Small Shindou audio cleanups (#1142)
31.) Fix endians in ALSeqData (#1141)
32.) Document S8 decoder rsp operation and some more (#1139)
33.) Fix Shindou synthesis_process_note fake match (#1140)
34.) More audio documentation, for the new rsp code and other fixes (#1138)
35.) Build fixes for macOS: cpp, clang, recomp, aiff_extract_codebook (#1135)
36.) Add ENABLE_RUMBLE to config.h (#1122)
37.) Reduce recomp memory consumption by using smaller disassembly blocks (#1128)
38.) Makefile fixes (#1123)
39.) Update README.md
40.) Update README.md
41.) Reflect current decompilation status
42.) Allow both archives and ELF objects to be patched (#1127)
43.) Remove WIP mention in README for sh version.
Refresh 13 2
- No more nonmatchings remain for all builds including Shindou.
1.) Shindou OK (#1118)
2.) Match shindou sequence_player_process_sequence (#1117)
3.) Match func_sh_802f4e50 (#1116)
Refresh 13
- No more nonmatchings remain for US, JP, or EU builds. Three(!!!) remain for Shindou (SH).
*) SHINDOU MATCHING (#1081)
*) Makefile gcc fixes (#1114)
1.) Update diff.py (#1113)
2.) Add support for generating C arrays from n64graphics and add Texture typedef (#1032)
3.) Update README and Dockerfile with recomp info (#1105)
4.) Support building tools with MSYS2 (#1112)
5.) Support building tools with clang and macOS (#1106)
6.) Clean tools directory when running distclean target (#1104)
7.) Make build output cleaner (#1095)
8.) Added 2 surface defines to bowser.inc.c (#1111)
9.) fix fake matchings (#1108)
10.) Use statically recompiled IDO instead of qemu-irix (#1099)
11.) Add VERBOSE=1 to Jenkinsfile
12.) updated intro_geo to use layer defines for geo flags (#1090)
13.) Fix F3DZEX (#1097)
14.) layer_transpose should take an s8 (#1093)
15.) Fix tools/ build (#1082)
16.) Relabel and document fish.inc.c (#1077)
17.) Ensure all calls to .py files use $(PYTHON) (#1080)
18.) Name Mario, Peach, and instrument sound files (#1078)
19.) Goddard labeling, part 2 (#1076)
20.) Fix envfx_snow and envfx_bubbles fake matches (#1075)
21.) Use array subscripts instead of pointer math in 2 files (#1074)
22.) refactor Makefile a bit (#1068)
23.) Further improvements on field names (#1059)
24.) Label and document manta_ray.inc.c (#1073)
25.) Fix level_script and behavior fake matches (#1072)
26.) Proper cell defines and more floor lower limit values. (#1065)
27.) Document and re-label some goddard/intro code (#1069)
28.) Match remaining functions (#1070)
29.) match 'spawn_special_objects' (#1071)
30.) Document parts of external.c and format sound defines (#1067)
Refresh 12
1.) Debug box improvements (#1066)
2.) Improve 'geo_render_mirror_mario' (#1064)
3.) Cleanup and small labeling (#1063)
4.) Anim renames and other related renames (#1062)
5.) remove do while 0 and make one line comments consistent (#1061)
6.) fixed typo in segments.h (#1060)
7.) Name unknown fields (from public repo) (#1058)
8.) Change 'void *' to 'struct MainPoolState *' (#1057)
9.) Fix type of freeList (#1056)
10.) Newer version of diff script (#1055)
11.) Add stubbed_printfs based on unused audio strings (#1054)
12.) Fix comment in paintings.c (#1053)
13.) Add defines for hardcoded cell/floor height values (#1051)
14.) Update README.md: Remove GitHub specific Markdown syntax (#1052)
15.) Properly label interation status that handle's Bowser's shockwave attack (#1050)
Refresh 11
1.) Make geo_process_level_of_detail endian-independent (#1049)
2.) Label oMoveFlags and slight cleanup. (#1046)
3.) Avoid UB in synthesis_resample_and_mix_reverb (#1048)
4.) Change some void * to correct type (#1047)
5.) Remove oPathedWaypointsS16 and convert all paths to Trajectory struct. (#1045)
6.) Mr Blizzard documentation, Tox Box Unks (#1042)
7.) Pipe input to textconv. (#1041)
8.) Remove erroneous long double casts from audiofile.cpp (#1039)
9.) Replace fixed dialogID in play_dialog_sound to DIALOG_COUNT (#1040)
Refresh #10.1
1.) Diff update (#1033)
2.) Fix texture dimensions for exclamation boxes (#1034)
3.) Fix armips compilation on Windows by changing order of inclusion files (#1035)
4.) Embed libaudiofile into the repo as a single file (#1036)
5.) Fix some tools issues found while compiling on MSYS2 (#1037)
Refresh #10
1.) GCC 9 noreturn UB fixes (#961)
2.) List supported binutils variants in README.md (#960)
3.) fix fly guy's possible values for target roll
4.) clarify that 1 is an exclusive bound in random_float (#962)
5.) replace unkB8 with prevNumStarsForDialog (#963)
6.) Replace "BulletBillUnkF8" with "BulletBillInitialMoveYaw" (#966)
7.) Renamed more warp behaviors and spawn types (#949)
8.) EU bss cleanups (#965)
9.) Add -fno-zero-initialized-in-bss to GCC CFLAGS (#968)
10.) Use empty .SECONDARY target instead of .PRECIOUS (#964)
11.) Match EU seq_channel_layer_process_script (#969)
12.) Fix version variable overwriting bug for non-matching compilations (#974)
13.) small bhv_collect_star_init labeling (#972)
14.) Align SI DMA command buffers, add more names to osCont code (#973)
15.) Minor for loop fix in playback.c (#976)
16.) Add Docker config (Public #36)
17.) Fix usage output crash for skyconv (#977)
18.) Cleanup tools and their build flags (#978)
19.) Print more detailed file reading error messages in extract_assets (#982)
20.) Remove asmdiff (#983)
21.) Fixed tabledesign makefile bug (#985)
22.) Improve first-diff.py (#987)
23.) Bring in some enhancements such as widescreen enhancements (#981)
24.) Fix background shadow border if widescreen in shade_screen (#988)
25.) Merge common EU sections in osExceptionPreamble (#990)
26.) Introduce the NO_SEGMENTED_MEMORY define (#989)
27.) NO_SEGMENTED_MEMORY comments (#992)
28.) Introduce f3dex2e and a GBI_FLOATS setting (#993)
29.) Audio uses signed 16-bit integers as samples, not unsigned (#995)
30.) Assemble RSP ucode with armips (#970)
31.) Label Mr. Blizzard, Yoshi, Whomp, Wiggler, Wood Piece oFields. (#996)
32.) update crash enhancement (#1003)
33.) Update README.md to use new public Discord server invite
34.) Label variables in act_idle. (#1005)
35.) Fix a typo in camera.h (#1009)
36.) Fixed up profiler.c (#1010)
37.) Add -d to first-diff.py (#1012)
38.) Fix typo in first-diff.py (#1013)
39.) Remove binutils 2.27 dependency check (#1015)
40.) Update armips to v0.11.0 tag and add generator script (#1004)
41.) Extract IPL3 font from ROM (#1011)
42.) Documented audio playback flags (#1021)
43.) Change RSP register notation to dollar-prefixed numbers (#1022)
44.) Only check for QEMU_IRIX in Makefile when compiling with IDO (#1023)
45.) Clean up header files and update function prototypes (#1000)
46.) Named local variables in geo_update_layer_transparency (#1019)
47.) Extract crash screen font textures from EU and SH ROMs (#1025)
48.) Use ACTIVE_FLAG defines where appropriate (#1026)
49.) Changed type of actor collision from s16 to Collision (#1024)
50.) Implement sqrtf in assembly file (#1028)
51.) Rename Struct8032FCE8 as OpenableGrill and identify data members (#1029)
52.) Fix some mistakes in the abi doc (#1031)
53.) The README.md PR (#979)
Refresh #8
1.) Use INT_STATUS_ macros for oInteractStatus (#911)
2.) Update bullet_bill.inc.c (#912)
3.) Make geo.c in levels nonconst to reduce diffs with gcc enhancement patch in future (#913)
4.) Improve process_level_music_dynamics (#915)
5.) add AVOID_UB define for fixing libultra aliasing. (#916)
6.) const hack to TARGET_N64 and tweak ld script (#918)
7.) Replace raw level/course numbers with defines (#919)
8.) Label all graph node flags. (#920)
9.) readme.md capitalization
10.) The Big Function PR (Part 5) (#910)
11.) Label hardware registers (#922)
12.) Match EU synthesis_process_note (#923)
13.) Some quick value changes (#909)
14.) Added sequence player defines (#926)
15.) Shindou diffs 2 [merge game.c and display.c, required for SH] (#927)
16.) Match synthesis_process_notes and use -sopt for synthesis.c (#928)
17.) Fix mips64-binutils for Fedora 31 and similar Linux distros (#931)
18.) Update first-diff.py to work with Shindou (#933)
19.) Labelled behavior_script.c (#929)
20.) shindou diffs up to level_update (#932)
21.) Update diff.py and diff_settings.py to work with SH (#936)
22.) Add some Shindou resources to extract_assets.py (#939)
23.) Label and document gd_math.c (#930)
24.) Label all of Mario's actions. (#941)
25.) Label all particles. (#940)
26.) Renamed death related warpBhvs (#942)
27.) Small Shindou differences (#945)
28.) match player_performed_grab_escape_action in all versions (#943)
29.) add main alignment (aglab2, #947)
30.) Match a bunch of fake EU matchings (#944)
31.) Shindou diffs round 4 (#937)
32.) Easy PAL fake matchings (#946)
33.) Merge object_helpers and object_helpers2 headers (#948)
34.) match cap_check_quicksand (#950)
35.) Shindou crash screen diffs (#938)
36.) Thread6 (#951)
37.) Correct IPL3 function and label addresses (#952)
38.) Add COMPILER flag for Makefile and add official mips gcc support. (#953)
39.) add align to sequence_00 (fixes gcc build) (#957)
40.) Fixed itty bitty typo (#959)
Refresh #7
1.) update README.md (#861)
2.) [eu] fix decompilation bugs in synthesis_process_note (#862)
3.) Label and document Snufit.inc.c (#863)
4.) Label and document Snufit.inc.c (#863)
5.) Match append_bubble_vertex_buffer, append_snowflake_vertex_buffer (#860)
6.) Compile audio/effects.c with -sopt (#870)
7.) Match handle_dialog_text_and_pages (#872)
8.) Remove improperly used LEVEL_SA define. (#875)
9.) Remove unused EU ASM files (#873)
10.) Shindou build flag support (#876)
11.) The Big Function PR (Part 1) (#864)
12.) "Re-document" file_select and star_select for EU (#877)
13.) Document paintings.c (#868)
14.) Minor interaction.c labelling/documentation. (#882)
15.) Match synthesis_execute, prepare_reverb_ring_buffer, func_eu_802e00d8 (#886)
16.) The Big Function PR (Part 2) (#874)
17.) Additional painting documentation (#883)
18.) Some EU audio labelling (#885)
19.) Bring synthesis_do_one_audio_update a bit closer to matching (#887)
20.) Misleading comment, this actually contols Bowser's init action (#889)
21.) Match synthesis_do_one_audio_update (#890)
22.) Remove unneeded if(1) in synthesis_do_one_audio_update (#891)
23.) Match synthesis_resample_and_mix_reverb (#893)
24.) Set LANG=C (#896)
25.) Match note_apply_headset_pan_effects (#897)
26.) Match play_sequence (#898)
27.) Match sequence_channel_enable (#899)
28.) Match sequence_player_process_sequence (#900)
29.) Match (eu) alloc_bank_or_seq (#901)
30.) Match alloc_bank_or_seq (#903)
31.) Update README.md (again)
32.) Documented behaviour/fish.inc.c & blue_fish.inc.c (#894)
33.) Labelled 4 behavior files, made object_helper functions consistent (#881)
34.) Add a make target for .copt (#902)
35.) The Big Function PR (Part 3) (#888)
36.) The Big Function PR (Part 4) (#906)
37.) Rename src/audio/memory.c -> heap.c (#907)
38.) Fix BBH texture (#908)
Refresh #6
1.) Make tools work on MinGW (#804)
2.) Document mario_misc (#628)
3.) add patch_libmalloc.py script to work around compiler crashes (#811)
4.) Label the coffins file. (#829)
5.) Convert enhancements into patches (#827)
6.) Document Tweester.inc.c (#840)
7.) EU OK and cleanup EU (#782)
Refresh #5
1.) mem_error_screen.inc.c updated for C (#775)
2.) updated patch_libultra_math to work directly on libultra.a (#781)
3.) Enhancement: Debug boxes (#783)
4.) Label effects MemoryPool (#784)
5.) Use full-width characters for JP text and rename mislabeled stuff (#772)
6.) Small asset extraction fixes (#785)
7.) Fix incremental asset extraction after the last PR (#790)
8.) Labelled behavior script commands, tidied up behavior scripts and ren…
9.) Document camera.c (#741)
10.) Fix a HMC texture asset (#795)
11.) Fix UB in angle conversion for paintings. Needed for pc-port. (#796)
12.) Fix PSS texture assets (#801)
13.) Fix some camera typos (#802)
Refresh #4
1.) Label screen_transition.c (#737)
2.) Revamp macros (#738)
3.) Simplify the cake makefile logic (#739)
4.) Move zbuffer to C (#742)
5.) Audio blob endian/64-bit fixes (#740)
6.) Ub fixes (#745)
7.) process_level_music_dynamics: slightly better stack and regalloc (#746)
8.) move level order specific definitions out to levels/level_defines.h (#743)
9.) Renamed some mislabelled sound effects (#748)
10.) Very minor white space fixes in Mario.c (#752)
11.) Renamed GRAVITY to OBJ_PHYSICS (#755)
12.) Use defined macros instead of literal values for interactions in behavior_data.c (#754)
13.) iQue Player console detection + full support (#756)
14.) Fix Goddard Mario head for little endian etc. (#757)
15.) Small bits of audio doc (#749)
16.) Update diff script (#750)
17.) Nicer format for course/dialog text, enum for dialog IDs (#753)
18.) first-diff: store most recent mtime during check (#759)
19.) Use Lights1 struct for light values (#760)
20.) Detect mips64-elf in diff.py (#761)
21.) Name display lists in gd renderer.c (#764)
22.) Document a variety of PU type crashes. (#765)
23.) Label object_behaviors. (#716)
24.) Update swoop.inc.c (#767)
25.) Label tilting_pyramid.inc.c (#768)
26.) Label red_coin.inc.c (#770)
27.) Use more level defines (#758)
28.) Named Mario actions 6, 7, and 8 and noted causes of hands-free holding glitch (#769)
Refresh #3
1.) Small bits of sound sample labelling
2.) Append 'b' to fopen calls in n64graphics to satisfy Windows
3.) Document synthesis.c and abi.h
4.) Remove gbi_old.h and use gbi.h instead for F3D_OLD
5.) Fix and change most values used by f3d commands
6.) Convert actors to C
7.) Make extract_assets.py fail on bad baserom
8.) Fix some (pragma-ignored) warnings
9.) Convert trig tables and data/ buffers into C
10.) Document intro behaviors and some of camera.c
11.) Match dma_sample_data
12.) Convert levels, bin, text, goddard_tex_dl to C
13.) Remove .bss size hardcoding
14.) Add mips64 fallback and alt dump option to diff.sh
15.) Convert behavior_data to C
16.) Get rid of the enum in behavior_data.
17.) Change more values used by f3d commands
18.) Document game/skybox.c
19.) Actors levels fixup
20.) Convert Mario animations to C (kind of)
22.) generate skybox data from 248x248 images
23.) 64-bit fixes
24.) Move demo data to C
25.) Change uintptr_t to GeoLayout for actors
26.) Move libc includes to include/libc/
Refresh #2a (hotfix)
Changes from Refresh #2:
1.) Fixed text Makefile dependencies"
Refresh #2
Changes from Refresh #1:
1.) Label src/game/behaviors/boo.inc.c
2.) Verify half of audio_defines.h
3.) Label ingame_menu.c and some dialog stuff
4.) Improve handle_dialog_text_and_pages EU non-matching
5.) Fix texture format for water splash/sparkle
6.) Merge ucode.bin and ucode_unk.bin
7.) 64-bit fixes
8.) [AUDIO] Match func_80316928
9.) Documented bug in Tuxie's mother's code
10.) [AUDIO] Slightly closer matching for process_level_music_dynamics
11.) Name channel scripts in sequence 0
12.) Nicer error message when sha1sum doesn't match
13.) Refactor object fields
14.) Document file_select.c
15.) Document star_select.c
16.) Add uncompressed string support to textconv
17.) Document main_menu geo and leveldata
18.) Document hud.c and rename char textures
19.) Correct gSPTextureRectangle values
20.) Linker script wildcard
- Fixes "undefined reference to x in discarded section y" linker errors.
- Also means that you no longer have to add linker script entries for source files.
21.) Reference qemu-irix package and add project structure
- Installing qemu-irix is as simple as installing the provided Debian package on the GitHub "Releases" tab
(https://github.com/n64decomp/qemu-irix).
- Old qemu-irix installs are unaffected by this change, and it is still possible to install qemu-irix with the older method.
Refresh #1
Changes from initial release:
1.) More README cleanups and documentation
2.) Fix .gitignore in tools/
3.) More README cleanups and corrections
4.) oUnk190 -> oInteractionSubtype
5.) Normalize line endings
6.) Replace bank_sets.s by sequences.json + build magic
7.) Fix tabledesign in .gitignore
8.) Cleaned and documented arrays in audio/
9.) Change minimum Python 3 requirement in README.md to 3.6
10.) Remove whitespace in ingame_menu.c, save_file.c, and star_select.c
11.) Documentation comment style fixed
12.) sm64.map -> sm64.version.map (ex: sm64.us.map)
13.) Decompile EU versions of HUD and obj behaviors
14.) Label ukiki.inc.c and ukiki_cage.inc.c
15.) Add missing OS header includes
16.) Fix alignment issue in model_ids.h
17.) A bunch of behavior changes:
a.) Made styles consistent with function names (ex: BehBehaviorLoop -> beh_behavior_loop)
b.) Split obj_behaviors_2.c into multiple .inc.c files in behaviors/
c.) bhvHauntedRoomCheck -> bhvCoffinManager
18.) Update README.md notes on WSL and add links
19.) Added tidy.sh and also bracing around single-line ifs and loops
-2482
View File
File diff suppressed because it is too large. Load diff
Vendored
-60
View File
@@ -1,60 +0,0 @@
pipeline {
agent any
stages {
stage('Build Tools') {
steps {
sh 'make -j4 -C tools/'
}
}
stage('Extract Assets') {
steps {
sh 'ln -s "$ROMS_DIR/Super Mario 64 (J) [!].z64" baserom.jp.z64'
sh 'ln -s "$ROMS_DIR/Super Mario 64 (U) [!].z64" baserom.us.z64'
sh 'ln -s "$ROMS_DIR/Super Mario 64 (E) (M3) [!].z64" baserom.eu.z64'
sh 'ln -s "$ROMS_DIR/Super Mario 64 - Shindou Edition (J) [!].z64" baserom.sh.z64'
// verify no assets were committed to repo
sh '[ -z "$(find {actors,levels,textures}/ -name \'*.png\')" ]'
sh '[ -z "$(find assets/ -name \'*.m64\' -or \'*.bin\')" ]'
sh './extract_assets.py jp us eu sh'
}
}
stage('Build U Source') {
steps {
sh 'make -j4 VERSION=us VERBOSE=1 COLOR=0'
}
}
stage('Build S Source') {
steps {
sh 'make -j4 VERSION=sh VERBOSE=1 COLOR=0'
}
}
stage('Build E Source') {
steps {
sh 'make -j4 VERSION=eu VERBOSE=1 COLOR=0'
}
}
stage('Build J Source') {
steps {
sh 'make -j4 VERSION=jp VERBOSE=1 COLOR=0'
}
}
stage('Test Enhancements') {
steps {
sh '''
set -e
for f in enhancements/*.patch
do
git clean -fd .
git checkout -- .
echo 'y' | tools/apply_patch.sh "$f"
make -j4 VERSION=us COMPARE=0 VERBOSE=1
done
'''
}
}
}
environment {
QEMU_IRIX = credentials('qemu-irix')
ROMS_DIR = credentials('roms')
}
}
+9 -36
View File
@@ -5,6 +5,8 @@ include util.mk
# Default target
default: all
TARGET_STRING := sm64
# Preprocessor definitions
DEFINES :=
@@ -189,14 +191,12 @@ GCC_GRAPH_NODE_OPT_FLAGS = \
#==============================================================================#
ifeq ($(COMPILER),gcc)
NON_MATCHING := 1
MIPSISET := -mips3
OPT_FLAGS := $(GCC_MAIN_OPT_FLAGS)
COLLISION_OPT_FLAGS = $(GCC_COLLISION_OPT_FLAGS)
MATH_UTIL_OPT_FLAGS = $(GCC_MATH_UTIL_OPT_FLAGS)
GRAPH_NODE_OPT_FLAGS = $(GCC_GRAPH_NODE_OPT_FLAGS)
else ifeq ($(COMPILER),clang)
NON_MATCHING := 1
# clang doesn't support ABI 'o32' for 'mips3'
MIPSISET := -mips2
OPT_FLAGS := $(DEFAULT_OPT_FLAGS)
@@ -205,24 +205,6 @@ else ifeq ($(COMPILER),clang)
GRAPH_NODE_OPT_FLAGS = $(DEFAULT_OPT_FLAGS)
endif
# NON_MATCHING - whether to build a matching, identical copy of the ROM
# 1 - enable some alternate, more portable code that does not produce a matching ROM
# 0 - build a matching ROM
NON_MATCHING ?= 1
$(eval $(call validate-option,NON_MATCHING,0 1))
ifeq ($(TARGET_N64),0)
NON_MATCHING := 1
endif
ifeq ($(NON_MATCHING),1)
DEFINES += NON_MATCHING=1 AVOID_UB=1
endif
TARGET_STRING := sm64
# UNF - whether to use UNFLoader flashcart library
# 1 - includes code in ROM
# 0 - does not
@@ -288,15 +270,6 @@ endif
GZIPVER ?= std
$(eval $(call validate-option,GZIPVER,std libdef))
# GODDARD - whether to use libgoddard (Mario Head)
# 1 - includes code in ROM
# 0 - does not
GODDARD ?= 0
$(eval $(call validate-option,GODDARD,0 1))
ifeq ($(GODDARD),1)
DEFINES += GODDARD=1
endif
# Whether to hide commands or not
VERBOSE ?= 0
ifeq ($(VERBOSE),0)
@@ -706,17 +679,17 @@ $(BUILD_DIR)/levels/%/leveldata.bin: $(BUILD_DIR)/levels/%/leveldata.elf
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
ifeq ($(COMPRESS),gzip)
include gziprules.mk
include compression/gziprules.mk
else ifeq ($(COMPRESS),rnc1)
include rnc1rules.mk
include compression/rnc1rules.mk
else ifeq ($(COMPRESS),rnc2)
include rnc2rules.mk
include compression/rnc2rules.mk
else ifeq ($(COMPRESS),yay0)
include yay0rules.mk
include compression/yay0rules.mk
else ifeq ($(COMPRESS),mio0)
include mio0rules.mk
include compression/mio0rules.mk
else ifeq ($(COMPRESS),uncomp)
include uncomprules.mk
include compression/uncomprules.mk
endif
#==============================================================================#
@@ -891,7 +864,7 @@ endif
$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
$(OBJDUMP) -D $< > $@
.PHONY: all clean distclean default diff test load
.PHONY: all clean distclean default test load
# with no prerequisites, .SECONDARY causes no intermediate target to be removed
.SECONDARY:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-7
View File
@@ -1,7 +0,0 @@
.include "macros.inc"
.section .data
glabel _seinfeldRomStart
.incbin "data/sein800.hvqm"
glabel _seinfeldRomEnd
BIN
View File
Binary file not shown.
-1525
View File
File diff suppressed because it is too large. Load diff
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env python3
def add_custom_arguments(parser):
group = parser.add_mutually_exclusive_group(required=False)
group.add_argument('-j', dest='lang', action='store_const', const='jp',
help="Set version to JP.")
group.add_argument('-u', dest='lang', action='store_const', const='us',
help="Set version to US.")
group.add_argument('-e', dest='lang', action='store_const', const='eu',
help="Set version to EU.")
group.add_argument('-s', dest='lang', action='store_const', const='sh',
help="Set version to SH.")
def apply(config, args):
lang = args.lang or 'us'
config['mapfile'] = f'build/{lang}/sm64.{lang}.map'
config['myimg'] = f'build/{lang}/sm64.{lang}.z64'
config['baseimg'] = f'baserom.{lang}.z64'
config['makeflags'] = [f'VERSION={lang}']
config['source_directories'] = ['src', 'include', 'lib', 'lib/src', 'asm', 'rsp']
-320
View File
@@ -1,320 +0,0 @@
#!/usr/bin/env python3
import os.path
import argparse
from subprocess import check_call
# TODO: -S argument for shifted ROMs
parser = argparse.ArgumentParser(
description="find the first difference(s) between the compiled ROM and the baserom"
)
versionGroup = parser.add_mutually_exclusive_group()
versionGroup.add_argument(
"-j",
"--jp",
help="use original Japanese version",
action="store_const",
const="jp",
dest="version",
)
versionGroup.add_argument(
"-u",
"--us",
help="use United States version",
action="store_const",
const="us",
dest="version",
)
versionGroup.add_argument(
"-e",
"--eu",
help="use European (PAL) version",
action="store_const",
const="eu",
dest="version",
)
versionGroup.add_argument(
"-s",
"--sh",
help="use Shindou (Rumble) version",
action="store_const",
const="sh",
dest="version",
)
parser.add_argument(
"-m", "--make", help="run make before finding difference(s)", action="store_true"
)
parser.add_argument(
"-c",
"--count",
type=int,
default=1,
help="find up to this many instruction difference(s)",
)
parser.add_argument(
"-n", "--by-name", type=str, default="", help="perform a symbol or address lookup"
)
parser.add_argument(
"-d", "--diff", action="store_true", help="run ./diff.py on the result"
)
args = parser.parse_args()
diff_count = args.count
version = args.version
if version is None:
version = "us"
best = 0
for ver in ["us", "jp", "eu", "sh"]:
try:
mtime = os.path.getmtime(f"build/{ver}/sm64.{ver}.z64")
if mtime > best:
best = mtime
version = ver
except Exception:
pass
print("Assuming version " + version)
if args.make:
check_call(["make", "-j4", "VERSION=" + version, "COMPARE=0"])
baseimg = f"baserom.{version}.z64"
basemap = f"sm64.{version}.map"
myimg = f"build/{version}/sm64.{version}.z64"
mymap = f"build/{version}/{basemap}"
if os.path.isfile("expected/" + mymap):
basemap = "expected/" + mymap
required_files = [baseimg, myimg, mymap]
if not os.path.isfile(baseimg):
print(baseimg + " must exist.")
exit(1)
if not os.path.isfile(myimg) or not os.path.isfile(mymap):
print(
myimg
+ " and "
+ mymap
+ " must exist. Try rerunning with --make to build them."
)
exit(1)
mybin = open(myimg, "rb").read()
basebin = open(baseimg, "rb").read()
if len(mybin) != len(basebin):
print("Modified ROM has different size...")
exit(1)
if mybin == basebin:
print("No differences!")
if not args.by_name:
exit(0)
def search_map(rom_addr):
ram_offset = None
last_ram = 0
last_rom = 0
last_fn = "<start of rom>"
last_file = "<no file>"
prev_line = ""
with open(mymap) as f:
for line in f:
if "load address" in line:
# Example: ".boot 0x0000000004000000 0x1000 load address 0x0000000000000000"
if "noload" in line or "noload" in prev_line:
ram_offset = None
continue
ram = int(line[16 : 16 + 18], 0)
rom = int(line[59 : 59 + 18], 0)
ram_offset = ram - rom
continue
prev_line = line
if (
ram_offset is None
or "=" in line
or "*fill*" in line
or " 0x" not in line
):
continue
ram = int(line[16 : 16 + 18], 0)
rom = ram - ram_offset
fn = line.split()[-1]
if "0x" in fn:
ram_offset = None
continue
if rom > rom_addr or (rom_addr & 0x80000000 and ram > rom_addr):
return f"in {last_fn} (ram 0x{last_ram:08x}, rom 0x{last_rom:06x}, {last_file})"
last_ram = ram
last_rom = rom
last_fn = fn
if "/" in fn:
last_file = fn
return "at end of rom?"
def parse_map(fname):
ram_offset = None
cur_file = "<no file>"
syms = {}
prev_sym = None
prev_line = ""
with open(fname) as f:
for line in f:
if "load address" in line:
if "noload" in line or "noload" in prev_line:
ram_offset = None
continue
ram = int(line[16 : 16 + 18], 0)
rom = int(line[59 : 59 + 18], 0)
ram_offset = ram - rom
continue
prev_line = line
if (
ram_offset is None
or "=" in line
or "*fill*" in line
or " 0x" not in line
):
continue
ram = int(line[16 : 16 + 18], 0)
rom = ram - ram_offset
fn = line.split()[-1]
if "0x" in fn:
ram_offset = None
elif "/" in fn:
cur_file = fn
else:
syms[fn] = (rom, cur_file, prev_sym, ram)
prev_sym = fn
return syms
def map_diff():
map1 = parse_map(mymap)
map2 = parse_map(basemap)
min_ram = None
found = None
for sym, addr in map1.items():
if sym not in map2:
continue
if addr[0] != map2[sym][0]:
if min_ram is None or addr[0] < min_ram:
min_ram = addr[0]
found = (sym, addr[1], addr[2])
if min_ram is None:
return False
else:
print()
print(
f"Map appears to have shifted just before {found[0]} ({found[1]}) -- in {found[2]}?"
)
if found[2] is not None and found[2] not in map2:
print()
print(
f"(Base map file {basemap} out of date due to renamed symbols, so result may be imprecise.)"
)
return True
def hexbytes(bs):
return ":".join("{:02x}".format(c) for c in bs)
# For convenience, allow `./first-diff.py <ROM addr | RAM addr | function name>`
# to do a symbol <-> address lookup. This should really be split out into a
# separate script...
if args.by_name:
try:
addr = int(args.by_name, 0)
print(args.by_name, "is", search_map(addr))
except ValueError:
m = parse_map(mymap)
try:
print(
args.by_name,
"is at position",
hex(m[args.by_name][0]),
"in ROM,",
hex(m[args.by_name][3]),
"in RAM",
)
except KeyError:
print("function", args.by_name, "not found")
exit()
found_instr_diff = []
map_search_diff = []
diffs = 0
shift_cap = 1000
for i in range(24, len(mybin), 4):
# (mybin[i:i+4] != basebin[i:i+4], but that's slightly slower in CPython...)
if diffs <= shift_cap and (
mybin[i] != basebin[i]
or mybin[i + 1] != basebin[i + 1]
or mybin[i + 2] != basebin[i + 2]
or mybin[i + 3] != basebin[i + 3]
):
if diffs == 0:
print(f"First difference at ROM addr {hex(i)}, {search_map(i)}")
print(
f"Bytes: {hexbytes(mybin[i : i + 4])} vs {hexbytes(basebin[i : i + 4])}"
)
diffs += 1
if (
len(found_instr_diff) < diff_count
and mybin[i] >> 2 != basebin[i] >> 2
and not search_map(i) in map_search_diff
):
found_instr_diff.append(i)
map_search_diff.append(search_map(i))
if diffs == 0:
print("No differences!")
if not args.by_name:
exit()
definite_shift = diffs > shift_cap
if not definite_shift:
print(str(diffs) + " differing word(s).")
if diffs > 100:
if len(found_instr_diff) > 0:
for i in found_instr_diff:
print(f"Instruction difference at ROM addr {hex(i)}, {search_map(i)}")
print(
f"Bytes: {hexbytes(mybin[i : i + 4])} vs {hexbytes(basebin[i : i + 4])}"
)
if version == "sh":
print("Shifted ROM, as expected.")
else:
if not os.path.isfile(basemap):
if definite_shift:
print("Tons of differences, must be a shifted ROM.")
print(
"To find ROM shifts, copy a clean .map file to "
+ basemap
+ " and rerun this script."
)
exit()
if not map_diff():
print(f"No ROM shift{' (!?)' if definite_shift else ''}")
if args.diff:
diff_args = input("Call ./diff.py with which arguments? ") or "--"
if diff_args[0] != "-":
diff_args = "-" + diff_args
if "w" in diff_args and args.make:
diff_args += "m" # To avoid warnings when passing -w, also pass -m as long as -m was passed to first-diff itself
check_call(
[
"python3",
"diff.py",
f"-{version[0]}",
diff_args,
search_map(found_instr_diff[0]).split()[1],
]
)
-752
View File
@@ -1,752 +0,0 @@
diff --git a/levels/ending/geo.c b/levels/ending/geo.c
index 867bebb..b8e2711 100644
--- a/levels/ending/geo.c
+++ b/levels/ending/geo.c
@@ -21,9 +21,7 @@ const GeoLayout ending_geo_000050[] = {
GEO_OPEN_NODE(),
GEO_NODE_ORTHO(100),
GEO_OPEN_NODE(),
-#ifdef VERSION_EU
GEO_BACKGROUND_COLOR(0x0001),
-#endif
GEO_ASM(0, geo_exec_cake_end_screen),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
diff --git a/levels/ending/leveldata.c b/levels/ending/leveldata.c
index 0ea6be6..bba0a94 100644
--- a/levels/ending/leveldata.c
+++ b/levels/ending/leveldata.c
@@ -250,389 +250,63 @@ const Gfx dl_cake_end_screen_eu_070297D8[] = {
#include "levels/ending/cake.inc.c"
-// 0x07025800 - 0x07025840
-static const Vtx cake_end_vertex_07025800[] = {
- {{{ 0, 220, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 220, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 240, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 240, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025840 - 0x07025880
-static const Vtx cake_end_vertex_07025840[] = {
- {{{ 80, 220, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 220, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 240, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 240, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025880 - 0x070258C0
-static const Vtx cake_end_vertex_07025880[] = {
- {{{ 160, 220, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 220, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 240, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 240, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x070258C0 - 0x07025900
-static const Vtx cake_end_vertex_070258C0[] = {
- {{{ 240, 220, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 220, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 240, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 240, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025900 - 0x07025940
-static const Vtx cake_end_vertex_07025900[] = {
- {{{ 0, 200, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 200, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 220, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 220, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025940 - 0x07025980
-static const Vtx cake_end_vertex_07025940[] = {
- {{{ 80, 200, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 200, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 220, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 220, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025980 - 0x070259C0
-static const Vtx cake_end_vertex_07025980[] = {
- {{{ 160, 200, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 200, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 220, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 220, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x070259C0 - 0x07025A00
-static const Vtx cake_end_vertex_070259C0[] = {
- {{{ 240, 200, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 200, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 220, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 220, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025A00 - 0x07025A40
-static const Vtx cake_end_vertex_07025A00[] = {
- {{{ 0, 180, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 180, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 200, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 200, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025A40 - 0x07025A80
-static const Vtx cake_end_vertex_07025A40[] = {
- {{{ 80, 180, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 180, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 200, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 200, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025A80 - 0x07025AC0
-static const Vtx cake_end_vertex_07025A80[] = {
- {{{ 160, 180, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 180, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 200, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 200, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025AC0 - 0x07025B00
-static const Vtx cake_end_vertex_07025AC0[] = {
- {{{ 240, 180, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 180, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 200, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 200, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025B00 - 0x07025B40
-static const Vtx cake_end_vertex_07025B00[] = {
- {{{ 0, 160, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 160, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 180, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 180, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025B40 - 0x07025B80
-static const Vtx cake_end_vertex_07025B40[] = {
- {{{ 80, 160, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 160, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 180, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 180, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025B80 - 0x07025BC0
-static const Vtx cake_end_vertex_07025B80[] = {
- {{{ 160, 160, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 160, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 180, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 180, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025BC0 - 0x07025C00
-static const Vtx cake_end_vertex_07025BC0[] = {
- {{{ 240, 160, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 160, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 180, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 180, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025C00 - 0x07025C40
-static const Vtx cake_end_vertex_07025C00[] = {
- {{{ 0, 140, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 140, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 160, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 160, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025C40 - 0x07025C80
-static const Vtx cake_end_vertex_07025C40[] = {
- {{{ 80, 140, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 140, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 160, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 160, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025C80 - 0x07025CC0
-static const Vtx cake_end_vertex_07025C80[] = {
- {{{ 160, 140, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 140, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 160, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 160, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025CC0 - 0x07025D00
-static const Vtx cake_end_vertex_07025CC0[] = {
- {{{ 240, 140, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 140, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 160, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 160, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025D00 - 0x07025D40
-static const Vtx cake_end_vertex_07025D00[] = {
- {{{ 0, 120, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 120, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 140, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 140, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025D40 - 0x07025D80
-static const Vtx cake_end_vertex_07025D40[] = {
- {{{ 80, 120, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 120, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 140, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 140, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025D80 - 0x07025DC0
-static const Vtx cake_end_vertex_07025D80[] = {
- {{{ 160, 120, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 120, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 140, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 140, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025DC0 - 0x07025E00
-static const Vtx cake_end_vertex_07025DC0[] = {
- {{{ 240, 120, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 120, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 140, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 140, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025E00 - 0x07025E40
-static const Vtx cake_end_vertex_07025E00[] = {
- {{{ 0, 100, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 100, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 120, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 120, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025E40 - 0x07025E80
-static const Vtx cake_end_vertex_07025E40[] = {
- {{{ 80, 100, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 100, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 120, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 120, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025E80 - 0x07025EC0
-static const Vtx cake_end_vertex_07025E80[] = {
- {{{ 160, 100, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 100, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 120, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 120, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025EC0 - 0x07025F00
-static const Vtx cake_end_vertex_07025EC0[] = {
- {{{ 240, 100, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 100, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 120, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 120, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025F00 - 0x07025F40
-static const Vtx cake_end_vertex_07025F00[] = {
- {{{ 0, 80, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 80, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 100, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 100, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025F40 - 0x07025F80
-static const Vtx cake_end_vertex_07025F40[] = {
- {{{ 80, 80, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 80, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 100, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 100, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025F80 - 0x07025FC0
-static const Vtx cake_end_vertex_07025F80[] = {
- {{{ 160, 80, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 80, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 100, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 100, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07025FC0 - 0x07026000
-static const Vtx cake_end_vertex_07025FC0[] = {
- {{{ 240, 80, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 80, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 100, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 100, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026000 - 0x07026040
-static const Vtx cake_end_vertex_07026000[] = {
- {{{ 0, 60, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 60, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 80, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 80, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026040 - 0x07026080
-static const Vtx cake_end_vertex_07026040[] = {
- {{{ 80, 60, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 60, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 80, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 80, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026080 - 0x070260C0
-static const Vtx cake_end_vertex_07026080[] = {
- {{{ 160, 60, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 60, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 80, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 80, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x070260C0 - 0x07026100
-static const Vtx cake_end_vertex_070260C0[] = {
- {{{ 240, 60, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 60, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 80, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 80, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026100 - 0x07026140
-static const Vtx cake_end_vertex_07026100[] = {
- {{{ 0, 40, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 40, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 60, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 60, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026140 - 0x07026180
-static const Vtx cake_end_vertex_07026140[] = {
- {{{ 80, 40, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 40, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 60, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 60, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026180 - 0x070261C0
-static const Vtx cake_end_vertex_07026180[] = {
- {{{ 160, 40, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 40, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 60, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 60, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x070261C0 - 0x07026200
-static const Vtx cake_end_vertex_070261C0[] = {
- {{{ 240, 40, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 40, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 60, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 60, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026200 - 0x07026240
-static const Vtx cake_end_vertex_07026200[] = {
- {{{ 0, 20, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 20, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 40, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 40, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026240 - 0x07026280
-static const Vtx cake_end_vertex_07026240[] = {
- {{{ 80, 20, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 20, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 40, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 40, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026280 - 0x070262C0
-static const Vtx cake_end_vertex_07026280[] = {
- {{{ 160, 20, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 20, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 40, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 40, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x070262C0 - 0x07026300
-static const Vtx cake_end_vertex_070262C0[] = {
- {{{ 240, 20, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 20, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 40, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 40, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026300 - 0x07026340
-static const Vtx cake_end_vertex_07026300[] = {
- {{{ 0, 0, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 0, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 20, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 0, 20, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026340 - 0x07026380
-static const Vtx cake_end_vertex_07026340[] = {
- {{{ 80, 0, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 0, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 20, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 80, 20, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x07026380 - 0x070263C0
-static const Vtx cake_end_vertex_07026380[] = {
- {{{ 160, 0, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 0, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 20, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 160, 20, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
-
-// 0x070263C0 - 0x07026400
-static const Vtx cake_end_vertex_070263C0[] = {
- {{{ 240, 0, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 0, -1}, 0, { 2528, 608}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 320, 20, -1}, 0, { 2528, 0}, {0xff, 0xff, 0xff, 0xff}}},
- {{{ 240, 20, -1}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
-};
+#define NUM_CAKE_TEXTURES 40
+#define NUM_CAKE_TEXTURES_X 5
+#define NUM_CAKE_TEXTURES_Y (NUM_CAKE_TEXTURES / NUM_CAKE_TEXTURES_X)
+#define CAKE_TEX_WIDTH (320 / NUM_CAKE_TEXTURES_X)
+#define CAKE_TEX_HEIGHT (240 / NUM_CAKE_TEXTURES_Y)
+
+#define MAKE_RECT_VERTICES(i, startX, startY, dx, dy, starts, startt) \
+ {{{2 + (((i) % NUM_CAKE_TEXTURES_X) * (CAKE_TEX_WIDTH - 1) + startX + 0), 240 - 6 - (((i) / NUM_CAKE_TEXTURES_X) * (CAKE_TEX_HEIGHT - 1) + startY + 0), -1}, 0, {(starts + 0) << 5, (startt + 0) << 5}, {0xFF, 0xFF, 0xFF, 0xFF}}},\
+ {{{2 + (((i) % NUM_CAKE_TEXTURES_X) * (CAKE_TEX_WIDTH - 1) + startX + dx), 240 - 6 - (((i) / NUM_CAKE_TEXTURES_X) * (CAKE_TEX_HEIGHT - 1) + startY + 0), -1}, 0, {(starts + dx) << 5, (startt + 0) << 5}, {0xFF, 0xFF, 0xFF, 0xFF}}},\
+ {{{2 + (((i) % NUM_CAKE_TEXTURES_X) * (CAKE_TEX_WIDTH - 1) + startX + 0), 240 - 6 - (((i) / NUM_CAKE_TEXTURES_X) * (CAKE_TEX_HEIGHT - 1) + startY + dy), -1}, 0, {(starts + 0) << 5, (startt + dy) << 5}, {0xFF, 0xFF, 0xFF, 0xFF}}},\
+ {{{2 + (((i) % NUM_CAKE_TEXTURES_X) * (CAKE_TEX_WIDTH - 1) + startX + dx), 240 - 6 - (((i) / NUM_CAKE_TEXTURES_X) * (CAKE_TEX_HEIGHT - 1) + startY + dy), -1}, 0, {(starts + dx) << 5, (startt + dy) << 5}, {0xFF, 0xFF, 0xFF, 0xFF}}}
+
+#define MAKE_TEXT_VERTICES(i) \
+ MAKE_RECT_VERTICES(i, 0, 0, CAKE_TEX_WIDTH - 1, CAKE_TEX_HEIGHT - 1, 0, 0)
+
+#define MAKE_ROW_VERTICES(row) \
+ MAKE_TEXT_VERTICES(row * NUM_CAKE_TEXTURES_X + 0), \
+ MAKE_TEXT_VERTICES(row * NUM_CAKE_TEXTURES_X + 1), \
+ MAKE_TEXT_VERTICES(row * NUM_CAKE_TEXTURES_X + 2), \
+ MAKE_TEXT_VERTICES(row * NUM_CAKE_TEXTURES_X + 3), \
+ MAKE_TEXT_VERTICES(row * NUM_CAKE_TEXTURES_X + 4)
+
+const Vtx cake_verts[] = {
+ MAKE_ROW_VERTICES(0),
+ MAKE_ROW_VERTICES(1),
+ MAKE_ROW_VERTICES(2),
+ MAKE_ROW_VERTICES(3),
+ MAKE_ROW_VERTICES(4),
+ MAKE_ROW_VERTICES(5),
+ MAKE_ROW_VERTICES(6),
+ MAKE_ROW_VERTICES(7),
+};
+
+#define LOAD_CAKE_TEXTURE(i) \
+ gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_data + (CAKE_TEX_WIDTH * CAKE_TEX_HEIGHT * 2 * (i))), \
+ gsDPLoadSync(), \
+ gsDPLoadBlock(G_TX_LOADTILE, 0, 0, \
+ (((CAKE_TEX_WIDTH)*(CAKE_TEX_HEIGHT) + G_IM_SIZ_16b_INCR) >> G_IM_SIZ_16b_SHIFT)-1, \
+ CALC_DXT(CAKE_TEX_WIDTH, G_IM_SIZ_16b_BYTES))
+
+#define LOAD_CAKE_VERTICES(i) \
+ gsSPVertex(cake_verts + 4 * (i), 4, 0)
+
+#define CAKE_TRIS(i) \
+ LOAD_CAKE_TEXTURE(i), \
+ gsSP2Triangles(0, 2, 1, 0x0, 1, 2, 3, 0x0)
+
+#define CAKE_RECT(i) \
+ LOAD_CAKE_VERTICES(i), \
+ CAKE_TRIS(i) \
+
+#define CAKE_ROW(row) \
+ CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 0),\
+ CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 1),\
+ CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 2),\
+ CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 3),\
+ CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 4)
// 0x07026400 - 0x07027350
const Gfx dl_cake_end_screen[] = {
@@ -640,198 +314,27 @@ const Gfx dl_cake_end_screen[] = {
gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB),
gsDPSetRenderMode(G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
-
- gsDPLoadTextureBlock(cake_end_texture_0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025800, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_1, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025840, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_2, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025880, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_3, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_070258C0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_4, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025900, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_5, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025940, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_6, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025980, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_7, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_070259C0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_8, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025A00, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_9, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025A40, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_10, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025A80, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_11, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025AC0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_12, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025B00, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_13, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025B40, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_14, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025B80, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_15, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025BC0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_16, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025C00, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_17, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025C40, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_18, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025C80, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_19, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025CC0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_20, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025D00, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_21, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025D40, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_22, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025D80, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_23, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025DC0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_24, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025E00, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_25, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025E40, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_26, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025E80, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_27, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025EC0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_28, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025F00, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_29, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025F40, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_30, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025F80, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_31, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07025FC0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_32, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026000, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_33, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026040, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_34, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026080, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_35, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_070260C0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_36, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026100, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_37, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026140, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_38, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026180, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_39, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_070261C0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_40, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026200, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_41, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026240, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_42, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026280, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_43, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_070262C0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_44, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026300, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_45, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026340, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_46, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_07026380, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
-
- gsDPLoadTextureBlock(cake_end_texture_47, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPVertex(cake_end_vertex_070263C0, 4, 0),
- gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
+
+ gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0,
+ G_TX_LOADTILE, 0,
+ G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD),
+ gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, (((CAKE_TEX_WIDTH * G_IM_SIZ_16b_LINE_BYTES)+7)>>3), 0,
+ G_TX_RENDERTILE, 0,
+ G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD),
+ gsDPSetTileSize(G_TX_RENDERTILE, 0, 0,
+ (CAKE_TEX_WIDTH - 1) << G_TEXTURE_IMAGE_FRAC,
+ (CAKE_TEX_HEIGHT - 1) << G_TEXTURE_IMAGE_FRAC),
+
+ CAKE_ROW(0),
+ CAKE_ROW(1),
+ CAKE_ROW(2),
+ CAKE_ROW(3),
+ CAKE_ROW(4),
+ CAKE_ROW(5),
+ CAKE_ROW(6),
+ CAKE_ROW(7),
gsDPPipeSync(),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
diff --git a/tools/skyconv.c b/tools/skyconv.c
index b515373..1fdf027 100644
--- a/tools/skyconv.c
+++ b/tools/skyconv.c
@@ -47,8 +47,8 @@ static const ImageProps IMAGE_PROPERTIES[ImageType_MAX][2] = {
{256, 256, 32, 32, 8, 8, true, true},
},
[Cake] = {
- {316, 228, 79, 19, 4, 12, false, false},
- {320, 240, 80, 20, 4, 12, false, false},
+ {316, 228, 63, 29, 5, 8, false, false},
+ {320, 240, 64, 30, 5, 8, false, false},
},
[CakeEU] = {
{320, 224, 64, 32, 5, 7, false, false},
@@ -62,7 +62,7 @@ typedef struct {
static const TableDimension TABLE_DIMENSIONS[ImageType_MAX] = {
[Skybox] = {8, 10},
- [Cake] = {4, 12},
+ [Cake] = {5, 8},
[CakeEU] = {5, 7},
};
@@ -104,15 +104,26 @@ static void split_tile(int col, int row, rgba *image, bool expanded) {
int tileWidth = props.tileWidth;
int tileHeight = props.tileHeight;
int imageWidth = props.imageWidth;
+ int imageHeight = props.imageHeight;
int numCols = props.numCols;
int expandedWidth = IMAGE_PROPERTIES[type][true].tileWidth;
+ rgba black = {0, 0, 0, 0};
+
for (int y = 0; y < tileHeight; y++) {
for (int x = 0; x < tileWidth; x++) {
int ny = row * tileHeight + y;
int nx = col * tileWidth + x;
- tiles[row * numCols + col].px[y * expandedWidth + x] = image[(ny * imageWidth + nx)];
+ if (nx < imageWidth && ny < imageHeight)
+ {
+ tiles[row * numCols + col].px[y * expandedWidth + x] = image[(ny * imageWidth + nx)];
+ }
+ else
+ {
+ tiles[row * numCols + col].px[y * expandedWidth + x] = black;
+ }
+
}
}
}
@@ -339,11 +350,12 @@ static void write_cake_c() {
}
int numTiles = TABLE_DIMENSIONS[type].cols * TABLE_DIMENSIONS[type].rows;
+ fprintf(cFile, "ALIGNED8 static const Texture cake_end_texture_%sdata[] = {\n", euSuffx);
for (int i = 0; i < numTiles; ++i) {
- fprintf(cFile, "ALIGNED8 static const Texture cake_end_texture_%s%d[] = {\n", euSuffx, i);
print_raw_data(cFile, &tiles[i]);
- fputs("};\n\n", cFile);
+ fputc('\n', cFile);
}
+ fputs("};\n\n", cFile);
fclose(cFile);
}
-6
View File
@@ -7,12 +7,6 @@
#define GLOBAL_ASM(...)
#endif
#if !defined(__sgi) && (!defined(NON_MATCHING) || !defined(AVOID_UB))
// asm-process isn't supported outside of IDO, and undefined behavior causes
// crashes.
#error Matching build is only possible on IDO; please build with NON_MATCHING=1.
#endif
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define GLUE(a, b) a ## b
-1
View File
@@ -62,7 +62,6 @@
#include "levels/bbh/areas/1/macro.inc.c"
#include "levels/bbh/staircase_step/collision.inc.c"
#include "levels/bbh/tilting_trap_platform/collision.inc.c"
#include "levels/bbh/tumbling_platform_far/collision.inc.c"
#include "levels/bbh/tumbling_platform_near/collision.inc.c"
#include "levels/bbh/moving_bookshelf/collision.inc.c"
#include "levels/bbh/mesh_elevator/collision.inc.c"
@@ -1,2 +0,0 @@
// Blank File
-1
View File
@@ -9,7 +9,6 @@
#include "dialog_ids.h"
#include "make_const_nonconst.h"
#include "levels/castle_courtyard/texture.inc.c"
#include "levels/castle_courtyard/areas/1/1/model.inc.c"
#include "levels/castle_courtyard/areas/1/spire/model.inc.c"
#include "levels/castle_courtyard/areas/1/2/model.inc.c"
-2
View File
@@ -1,2 +0,0 @@
// Blank File
@@ -1,2 +0,0 @@
// Blank File
@@ -1,2 +0,0 @@
// Blank File
-2
View File
@@ -80,8 +80,6 @@
#include "levels/castle_inside/areas/3/room.inc.c"
#include "levels/castle_inside/trap_door/collision.inc.c"
#include "levels/castle_inside/star_door/collision.inc.c"
#include "levels/castle_inside/clock_minute_hand/collision.inc.c"
#include "levels/castle_inside/clock_hour_hand/collision.inc.c"
#include "levels/castle_inside/water_level_pillar/collision.inc.c"
#include "levels/castle_inside/areas/3/trajectory.inc.c"
#include "levels/castle_inside/areas/3/movtext.inc.c"
-1
View File
@@ -8,7 +8,6 @@
#include "textures.h"
#include "make_const_nonconst.h"
#include "levels/sa/texture.inc.c"
#include "levels/sa/areas/1/1/model.inc.c"
#include "levels/sa/areas/1/2/model.inc.c"
#include "levels/sa/areas/1/collision.inc.c"
-2
View File
@@ -1,2 +0,0 @@
// Blank File
-2
View File
@@ -1,2 +0,0 @@
// Blank File
-2
View File
@@ -1,2 +0,0 @@
// Blank File
-1
View File
@@ -22,6 +22,5 @@
#include "levels/ssl/spindel/geo.inc.c"
#include "levels/ssl/moving_pyramid_wall/geo.inc.c"
#include "levels/ssl/pyramid_elevator/geo.inc.c"
#include "levels/ssl/eyerok_col/geo.inc.c"
#include "levels/ssl/areas/2/geo.inc.c"
#include "levels/ssl/areas/3/geo.inc.c"
-1
View File
@@ -38,7 +38,6 @@
#include "levels/ssl/spindel/model.inc.c"
#include "levels/ssl/moving_pyramid_wall/model.inc.c"
#include "levels/ssl/pyramid_elevator/model.inc.c"
#include "levels/ssl/eyerok_col/model.inc.c" // Blank file
#include "levels/ssl/areas/2/collision.inc.c"
#include "levels/ssl/areas/3/collision.inc.c"
#include "levels/ssl/areas/2/macro.inc.c"
-2
View File
@@ -1,2 +0,0 @@
// Blank File
-1
View File
@@ -15,4 +15,3 @@
#include "levels/totwc/cloud/model.inc.c"
#include "levels/totwc/areas/1/collision.inc.c"
#include "levels/totwc/areas/1/macro.inc.c"
#include "levels/totwc/cloud/collision.inc.c" // Blank File
-2
View File
@@ -1,2 +0,0 @@
// Blank File
-2
View File
@@ -42,7 +42,5 @@
#include "levels/ttc/elevator_platform/collision.inc.c"
#include "levels/ttc/clock_hand/collision.inc.c"
#include "levels/ttc/spinner/collision.inc.c"
#include "levels/ttc/small_gear/collision.inc.c"
#include "levels/ttc/large_gear/collision.inc.c"
#include "levels/ttc/areas/1/macro.inc.c"
#include "levels/ttc/areas/1/movtext.inc.c"
-2
View File
@@ -1,2 +0,0 @@
// Blank File
-13
View File
@@ -1,13 +0,0 @@
#!/bin/bash
shopt -s globstar
if [ "$#" -ne "2" ];
then
echo "usage: $0 old_name new_name"
exit 1
fi
#echo "Replace $1 with $2?"
#read
grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/*.patch lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.{c,h} actors/**/*.{c,h} src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"
-40
View File
@@ -1,40 +0,0 @@
#ifndef GD_BAD_DECLARATIONS_H
#define GD_BAD_DECLARATIONS_H
#include "gd_types.h"
/**
* @file bad_declarations.h
*
* Match incorrect type promotion for two declared functions.
*
* There is an issue with the compiled code for these function calls in files
* outside of the files in which they were defined: instead of passing f32's,
* the caller passes f64's.
*
* The only possible reason I can come up with for this behavior is that
* goddard only declared (not prototyped) his functions in the headers,
* and didn't include the header in the function's defining .c file.
* (Even IDO 5.3 cares about illegal promotion of types!) This results in
* default argument promotion, which is incorrect in this case.
*
* Since that's an awful practice to emulate, include this file (first!) to prevent
* the proper prototypes of these functions from being seen by files with the
* the incorrectly compiled calls.
*/
#ifndef AVOID_UB
#define GD_USE_BAD_DECLARATIONS
/* shape_helper.h */
extern struct ObjFace *make_face_with_colour();
/* should be: make_face_with_colour(f32, f32, f32) */
/* old_menu.h */
extern struct ObjLabel *make_label();
/* should be: make_label(struct ObjValPtr *, char *, s32, f32, f32, f32) */
#endif /* !AVOID_UB */
#endif // GD_BAD_DECLARATIONS_H
-6
View File
@@ -153,9 +153,7 @@ void remove_all_memtrackers(void) {
sMemTrackers[i].total = 0.0f;
}
#ifdef AVOID_UB
sNumActiveMemTrackers = 0;
#endif
}
/**
@@ -459,11 +457,7 @@ void fatal_printf(const char *fmt, ...) {
gd_printf("%s", va_arg(vl, char *));
break;
case 'c':
#ifdef AVOID_UB
gd_printf("%c", (char)va_arg(vl, int));
#else
gd_printf("%c", va_arg(vl, char));
#endif
break;
case 'x':
gd_printf("%x", va_arg(vl, s32));
+1 -10
View File
@@ -1124,12 +1124,7 @@ void unref_8017AEDC(struct ObjGroup *grp) {
* @bug Nothing is returned if the DL is created
* @note Contains string literals that suggest a removed `printf` call
*/
#ifdef AVOID_UB
void
#else
s32
#endif
create_shape_gddl(struct ObjShape *s) {
void create_shape_gddl(struct ObjShape *s) {
struct ObjShape *shape = s; // 24
s32 shapedl; // 20
UNUSED s32 enddl; // 1C
@@ -1137,11 +1132,7 @@ create_shape_gddl(struct ObjShape *s) {
create_shape_mtl_gddls(shape);
shapedl = gd_startdisplist(7);
if (shapedl == 0) {
#ifdef AVOID_UB
return;
#else
return -1;
#endif
}
setup_lights();
-6
View File
@@ -1,7 +1,6 @@
#include <PR/ultratypes.h>
#include <stdio.h>
#include "bad_declarations.h"
#include "debug_utils.h"
#include "draw_objects.h"
#include "dynlist_proc.h"
@@ -626,12 +625,7 @@ struct GdObj *d_makeobj(enum DObjTypes type, DynObjName name) {
case D_DATA_GRP:
d_makeobj(D_GROUP, name);
((struct ObjGroup *) sDynListCurObj)->linkType = 1;
//! @bug Returns garbage when making `D_DATA_GRP` object
#ifdef AVOID_UB
return NULL;
#else
return;
#endif
case D_CAMERA:
dobj = &make_camera(0, NULL)->header;
break;
-12
View File
@@ -347,10 +347,7 @@ struct ObjZone *make_zone(struct ObjGroup *a0, struct GdBoundingBox *bbox, struc
newZone->unk2C = a2;
newZone->unk30 = a0;
//! @bug Created `ObjZone` is not returned
#ifdef AVOID_UB
return newZone;
#endif
}
/* @ 22AF70 for 0x60 */
@@ -942,10 +939,7 @@ struct GdObj *func_8017E2F0(struct GdObj *obj, enum ObjTypeFlag type) {
return obj;
}
//! @bug Nothing is returned if a GdObj of `type` is not found
#ifdef AVOID_UB
return NULL;
#endif
}
/**
@@ -964,14 +958,8 @@ s32 apply_to_obj_types_in_group(s32 types, applyproc_t func, struct ObjGroup *gr
fnAppliedCount = 0;
//! @bug When `group` pointer is NULL, garbage is returned, not the
//! count of `fn` calls
if (group == NULL) {
#ifdef AVOID_UB
return fnAppliedCount;
#else
return;
#endif
}
if (group->linkType & 1) { // compressed data, not an Obj
-3
View File
@@ -11,9 +11,6 @@ struct ObjGadget *make_gadget(UNUSED s32 a0, s32 a1);
void reset_gadget(struct ObjGadget *gdgt);
void reset_gadgets_in_grp(struct ObjGroup *grp);
// see bad_declarations.h
#ifndef GD_USE_BAD_DECLARATIONS
struct ObjLabel *make_label(struct ObjValPtr *ptr, char *str, s32 a2, f32 x, f32 y, f32 z);
#endif
#endif // GD_OLD_MENU_H
+1 -15
View File
@@ -1471,12 +1471,8 @@ struct GdDisplayList *create_child_gdl(s32 id, struct GdDisplayList *srcDl) {
newDl = alloc_displaylist(id);
newDl->parent = srcDl;
cpy_remaining_gddl(newDl, srcDl);
//! @bug No return statement, despite return value being used.
//! Goddard lucked out that `v0` return from alloc_displaylist()
//! is not overwriten, as that pointer is what should be returned
#ifdef AVOID_UB
return newDl;
#endif
}
/* 24B7F8 -> 24BA48; orig name: func_8019D028 */
@@ -2799,14 +2795,7 @@ s32 setup_view_buffers(const char *name, struct ObjView *view, UNUSED s32 ulx, U
view->parent = D_801A86E0;
}
//! @bug No actual return, but the return value is used.
//! There is no obvious value to return. Since the function
//! doesn't use four of its parameters, this function may have
//! had a fair amount of its code commented out. In game, the
//! returned value is always 0, so the fix returns that value
#ifdef AVOID_UB
return 0;
#endif
}
/* 252AF8 -> 252BAC; orig name: _InitControllers */
@@ -2838,10 +2827,7 @@ void stub_renderer_6(UNUSED struct GdObj *obj) {
* @return an identifier of the menu just defined
*/
long defpup(UNUSED const char *menufmt, ...) {
//! @bug no return; function was stubbed
#ifdef AVOID_UB
return 0;
#endif
}
/**
-3
View File
@@ -25,9 +25,6 @@ void animate_mario_head_normal(struct ObjAnimator *self);
s32 load_mario_head(void (*aniFn)(struct ObjAnimator *));
void load_shapes2(void);
// see bad_declarations.h
#ifndef GD_USE_BAD_DECLARATIONS
struct ObjFace* make_face_with_colour(f32 r, f32 g, f32 b);
#endif
#endif // GD_SHAPE_HELPER_H
+1 -1
View File
@@ -19,7 +19,7 @@ I_DIRS = src include/n64/PR include/n64 include/libc include .
FULL_I_DIRS = $(addprefix $(INCLUDE_BASE),$(I_DIRS))
I_FLAGS = $(foreach i,$(FULL_I_DIRS),-I$(i))
TARGET_CFLAGS = -nostdinc -I include/libc -DTARGET_N64 -DF3DEX_GBI_2 -DNON_MATCHING -DAVOID_UB
TARGET_CFLAGS = -nostdinc -I include/libc -DTARGET_N64 -DF3DEX_GBI_2
CFLAGS := -Wall $(TARGET_CFLAGS) $(I_FLAGS) -fno-stack-protector -march=vr4300 -mtune=vr4300 -mfix4300 -mabi=32 -mno-shared -G 0 -fno-PIC -mno-abicalls -fno-zero-initialized-in-bss -fno-toplevel-reorder -Wno-missing-braces
-45
View File
@@ -1,45 +0,0 @@
# Makefile for s2d_engine.a
TARGET = libs2d_engine.a
default: all
BUILD_DIR ?= build
DUMMY != mkdir -p $(BUILD_DIR)
C_FILES = $(wildcard ./*.c)
O_FILES = $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o))
CROSS := mips-linux-gnu-
CC = $(CROSS)gcc
AR = $(CROSS)ar
INCLUDE_BASE := ../../
I_DIRS = src include/n64/PR include/n64 include/libc include .
FULL_I_DIRS = $(addprefix $(INCLUDE_BASE),$(I_DIRS))
I_FLAGS = $(foreach i,$(FULL_I_DIRS),-I$(i))
TARGET_CFLAGS = -nostdinc -I include/libc -DTARGET_N64 -DF3DEX_GBI_2 -DNON_MATCHING -DAVOID_UB
CFLAGS := -Wall $(TARGET_CFLAGS) $(I_FLAGS) -fno-stack-protector -march=vr4300 -mtune=vr4300 -mfix4300 -mabi=32 -mno-shared -G 0 -fno-PIC -mno-abicalls -fno-zero-initialized-in-bss -fno-toplevel-reorder -Wno-missing-braces
all: $(BUILD_DIR)/$(TARGET)
clean:
rm -r build/
COPY_DIR := none
ifneq ($(MAKECMDGOALS),clean)
ifeq ($(COPY_DIR),none)
$(error S2DEX Text Engine: No COPY_DIR defined!)
endif
endif
$(BUILD_DIR)/$(TARGET): $(O_FILES)
$(AR) rcs -o $@ $(O_FILES)
cp $@ $(COPY_DIR)
$(BUILD_DIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
-54
View File
@@ -1,54 +0,0 @@
# S2DEX Text Engine
## How to "Install"
- Clone this repo into a folder in your SM64 decomp or homebrew repo
- Include that folder in your makefile's `SRC_DIRS`
- Add that folder to the linker script (`sm64.ld`) or specfile
- Wherever you're including your font (I use actors/group0.c for SM64), insert:
```c
#include "src/s2d_engine/config.h"
#include FONT_C_FILE
```
- You're ready to use S2DEX Text Engine!
## Simple Usage (Sample Program)
```c
#include "s2d_engine/init.h"
#include "s2d_engine/s2d_draw.h"
#include "s2d_engine/s2d_print.h"
char myString[] = "This is a " SCALE "200" "test string!\n"
"Supports a bunch of standard " ROTATE "-36" "escape characters!\n"
"\tIncluding " COLOR "255 0 0 0" "Colorful text!\n"
COLOR "255 255 255 0" DROPSHADOW "And look at these shadows!";
// ...
void render_game(void) {
// do game rendering and stuff
// ...
// initialized S2DEX; only needed once before all prints
s2d_init();
// Allows you to print from anywhere in the game
// as long as this is run directly afterwards
s2d_handle_deferred();
// reloads the original microcode; only needed once after all prints
s2d_stop();
}
void some_actor_function(void) {
s2d_print_deferred(50, 50, myString); // It's that easy!
}
```
## Command Usage
(All numbers must be in base 10)
- `SCALE "N"` - Scales text by an percentage (`25` for 25%, `200` for 200%, `-50` for upside down at 50%, etc.)
- `TRANSLATE "X Y"` - Moves the rest of the string to the specified X and Y position
- `COLOR "R G B A"` - Sets the text color to the specified value
- `DROPSHADOW` - Toggles a drop shadow that shares the color of the current text
- `ROTATE "N"` - (Deprecated due to plugin incompatibility) Rotates each glyph by N degrees (Can be negative, useful for italics)
-98
View File
@@ -1,98 +0,0 @@
#include <ultra64.h>
#ifndef S2D_CONFIG_H
#define S2D_CONFIG_H
/**
* SET YOUR FONT NAME HERE
*/
#ifndef FONTNAME
#define FONTNAME impact
#endif
/***********
* Helpful defines to change
***********/
#define BASE_SCALE 1.0f
/******************************
*
* ONLY CHANGE THE BELOW CONTENTS IF YOU'RE DEVELOPING
* FOR A GAME THAT ISN'T SM64
*
*****************************/
// magic macros and font header inclusion
#define GLUE(a, b) a##b
#define GLUE2(a, b) GLUE(a, b)
#define STR(x) #x
#define STR2(x) STR(x)
#define __headername(hd) fonts/hd.h
#define __fontinclude(f) src/s2d_engine/fonts/f.c
#define _FONT_HEADER STR2(__headername(FONTNAME))
#define FONT_C_FILE STR2(__fontinclude(FONTNAME))
#include _FONT_HEADER
// get your font symbols defined here
#define s2d_font GLUE2(FONTNAME, _obj)
#define s2d_dropshadow GLUE2(FONTNAME, _obj_dropshadow)
#define s2d_tex GLUE2(FONTNAME, _tex)
#define s2d_kerning_table GLUE2(FONTNAME, _kerning_table)
extern char s2d_kerning_table[];
// Debug: bypass custom matrix setup
#define s2d_mat GLUE2(FONTNAME, _mtx)
// Homebrew users: use this to rename your gdl head
#define gdl_head gDisplayListHead
extern Gfx *gdl_head;
#include "src/game/game_init.h"
#define CONTROLLER_INPUT gPlayer1Controller->buttonPressed
#define CONTROLLER_HELD_INPUT gPlayer1Controller->buttonDown
// Other games/Homebrew users: change these values
// an allocator function of the format void *alloc(size_t bytes)
#define alloc alloc_display_list
extern void *alloc(size_t);
// your init functions for the RDP/RSP
#define my_rdp_init my_rdp_init
#define my_rsp_init my_rsp_init
extern void my_rsp_init(void);
extern void my_rdp_init(void);
// The frame timer that is used to time s2d_type_print
#define s2d_timer gGlobalTimer
extern u32 s2d_timer;
// The equivalent vsprintf in your game (defaults to libultra _Printf)
#define vsprintf(dst, str, fmt, args) _Printf(proutSprintf, dst, fmt, args)
extern char *proutSprintf(char *dst, const char *src, size_t count);
// tab glyph width and height
#define TAB_WIDTH_H TEX_WIDTH * 2
#define TAB_WIDTH_V TEX_WIDTH / 2
// Set these to optimize s2d texture "cache"
#define TEX_WIDTH 16
#define TEX_HEIGHT 16
#define TEX_BITDEPTH 8
#define seg2virt segmented_to_virtual
#define IS_RUNNING_ON_EMULATOR (IO_READ(DPC_PIPEBUSY_REG) == 0)
// Texture resolution (pixels on the texture per pixel on the framebuffer)
#define TEX_RES 1
#define _NUM_CACHE (4096 / (TEX_WIDTH * TEX_HEIGHT * (TEX_BITDEPTH / 8)))
#endif
-15
View File
@@ -1,15 +0,0 @@
#ifndef DEBUG_H
#define DEBUG_H
// #define init_cond (CONTROLLER_HELD_INPUT & R_CBUTTONS)
// #define tex_cond (CONTROLLER_HELD_INPUT & D_CBUTTONS)
// #define mtx_cond (CONTROLLER_HELD_INPUT & L_TRIG)
// #define spr_cond (CONTROLLER_HELD_INPUT & U_JPAD)
// #define deinit_cond (CONTROLLER_HELD_INPUT & U_CBUTTONS)
#define tex_cond (1)
#define mtx_cond (1)
#define spr_cond (1)
#define init_cond (1)
#define deinit_cond (1)
#endif
-92
View File
@@ -1,92 +0,0 @@
#include "config.h"
#include <ultra64.h>
#include "mtx.h"
#include "debug.h"
#include "s2d_draw.h"
#define s(sprite) ((uObjSprite *)seg2virt(&sprite))
#define t(texture) ((uObjTxtr *)seg2virt(&texture))
void f3d_rdp_init(void) {
gDPPipeSync(gdl_head++);
gDPSetCycleType(gdl_head++, G_CYC_1CYCLE);
gDPSetRenderMode(gdl_head++, G_RM_XLU_SPRITE, G_RM_XLU_SPRITE2);
gDPSetTextureLUT(gdl_head++, G_TT_NONE);
gDPSetTexturePersp(gdl_head++, G_TP_NONE);
gDPSetCombineLERP(gdl_head++,
0, 0, 0, ENVIRONMENT,
0, 0, 0, TEXEL0,
0, 0, 0, ENVIRONMENT,
0, 0, 0, TEXEL0
);
}
void setup_f3d_texture(int idx) {
gDPPipeSync(gdl_head++);
gDPSetEnvColor(gdl_head++, s2d_red, s2d_green, s2d_blue, s2d_alpha);
gDPLoadTextureBlock(
gdl_head++,
t(s2d_tex[idx])->block.image,
s(s2d_font)->s.imageFmt,
G_IM_SIZ_8b,
s(s2d_font)->s.imageW >> 5,
s(s2d_font)->s.imageH >> 5,
s(s2d_font)->s.imagePal,
G_TX_WRAP,
G_TX_WRAP,
G_TX_NOMASK,
G_TX_NOMASK,
G_TX_NOLOD,
G_TX_NOLOD);
gDPLoadSync(gdl_head++);
}
#define CLAMP_0(x) ((x < 0) ? 0 : x)
void texrect(int x, int y, float scale) {
#define qs510(n) ((s16)((n)*0x0400))
gSPScisTextureRectangle (
gdl_head++,
x << 2,
y << 2,
(u32)(x + ((f32) ((s(s2d_font)->s.imageW >> 5) - 1) * scale)) << 2,
(u32)(y + ((f32) ((s(s2d_font)->s.imageH >> 5) - 1) * scale)) << 2,
G_TX_RENDERTILE,
0,
0,
qs510(1.0f / myScale), qs510(1.0f / myScale));
}
void draw_f3d_dropshadow(char c, int x, int y, uObjMtx *ds) {
setup_f3d_texture(c);
if (s2d_red != 0
&& s2d_green != 0
&& s2d_blue != 0
) {
gDPPipeSync(gdl_head++);
gDPSetEnvColor(gdl_head++,
CLAMP_0(s2d_red - 100),
CLAMP_0(s2d_green - 100),
CLAMP_0(s2d_blue - 100),
s2d_alpha);
texrect(x, y, myScale);
gDPPipeSync(gdl_head++);
gDPSetEnvColor(gdl_head++, s2d_red, s2d_green, s2d_blue, s2d_alpha);
}
}
void draw_f3d_glyph(char c, int x, int y, uObjMtx *mt) {
setup_f3d_texture(c);
texrect(x, y, myScale);
gDPPipeSync(gdl_head++);
}
#undef s
#undef t
@@ -1,32 +0,0 @@
#include <ultra64.h>
// jk i dont think this file is needed lol
// update: it was needed :(
// update 2: gu.h already has macros for this :(
// hopefully I'll only need s15.16
// ^ clueless
// Q to float
// To convert a number from Qm.n format to floating point:
// Convert the number to floating point as if it were an integer, in other words remove the binary point
// Multiply by 2^−n
f32 qtof(int q, int decimal_n) {
f32 mul = (1.0f / (float) (1 << decimal_n));
return ((float)q) * mul;
}
// Float to Q
// To convert a number from floating point to Qm.n format:
// Multiply the floating point number by 2^n
// Round to the nearest integer
int ftoq(f32 f, int decimal_n) {
f *= (float) (1 << decimal_n);
return (int)f;
}
-5
View File
@@ -1,5 +0,0 @@
#include <ultra64.h>
extern f32 qtof(int q);
extern int ftoq(f32 f);
File diff suppressed because it is too large. Load diff
-136
View File
@@ -1,136 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gs2dex.h>
extern uObjTxtr comicsans_tex[];
extern uObjMtx comicsans_mtx;
extern uObjSprite comicsans_obj;
extern void call_comicsans_sprite_dl(int idx, int x, int y, uObjMtx *buffer, int buf_idx);
extern u8 comicsans_tex_0[];
extern u8 comicsans_tex_1[];
extern u8 comicsans_tex_2[];
extern u8 comicsans_tex_3[];
extern u8 comicsans_tex_4[];
extern u8 comicsans_tex_5[];
extern u8 comicsans_tex_6[];
extern u8 comicsans_tex_7[];
extern u8 comicsans_tex_8[];
extern u8 comicsans_tex_9[];
extern u8 comicsans_tex_10[];
extern u8 comicsans_tex_11[];
extern u8 comicsans_tex_12[];
extern u8 comicsans_tex_13[];
extern u8 comicsans_tex_14[];
extern u8 comicsans_tex_15[];
extern u8 comicsans_tex_16[];
extern u8 comicsans_tex_17[];
extern u8 comicsans_tex_18[];
extern u8 comicsans_tex_19[];
extern u8 comicsans_tex_20[];
extern u8 comicsans_tex_21[];
extern u8 comicsans_tex_22[];
extern u8 comicsans_tex_23[];
extern u8 comicsans_tex_24[];
extern u8 comicsans_tex_25[];
extern u8 comicsans_tex_26[];
extern u8 comicsans_tex_27[];
extern u8 comicsans_tex_28[];
extern u8 comicsans_tex_29[];
extern u8 comicsans_tex_30[];
extern u8 comicsans_tex_31[];
extern u8 comicsans_tex_32[];
extern u8 comicsans_tex_33[];
extern u8 comicsans_tex_34[];
extern u8 comicsans_tex_35[];
extern u8 comicsans_tex_36[];
extern u8 comicsans_tex_37[];
extern u8 comicsans_tex_38[];
extern u8 comicsans_tex_39[];
extern u8 comicsans_tex_40[];
extern u8 comicsans_tex_41[];
extern u8 comicsans_tex_42[];
extern u8 comicsans_tex_43[];
extern u8 comicsans_tex_44[];
extern u8 comicsans_tex_45[];
extern u8 comicsans_tex_46[];
extern u8 comicsans_tex_47[];
extern u8 comicsans_tex_48[];
extern u8 comicsans_tex_49[];
extern u8 comicsans_tex_50[];
extern u8 comicsans_tex_51[];
extern u8 comicsans_tex_52[];
extern u8 comicsans_tex_53[];
extern u8 comicsans_tex_54[];
extern u8 comicsans_tex_55[];
extern u8 comicsans_tex_56[];
extern u8 comicsans_tex_57[];
extern u8 comicsans_tex_58[];
extern u8 comicsans_tex_59[];
extern u8 comicsans_tex_60[];
extern u8 comicsans_tex_61[];
extern u8 comicsans_tex_62[];
extern u8 comicsans_tex_63[];
extern u8 comicsans_tex_64[];
extern u8 comicsans_tex_65[];
extern u8 comicsans_tex_66[];
extern u8 comicsans_tex_67[];
extern u8 comicsans_tex_68[];
extern u8 comicsans_tex_69[];
extern u8 comicsans_tex_70[];
extern u8 comicsans_tex_71[];
extern u8 comicsans_tex_72[];
extern u8 comicsans_tex_73[];
extern u8 comicsans_tex_74[];
extern u8 comicsans_tex_75[];
extern u8 comicsans_tex_76[];
extern u8 comicsans_tex_77[];
extern u8 comicsans_tex_78[];
extern u8 comicsans_tex_79[];
extern u8 comicsans_tex_80[];
extern u8 comicsans_tex_81[];
extern u8 comicsans_tex_82[];
extern u8 comicsans_tex_83[];
extern u8 comicsans_tex_84[];
extern u8 comicsans_tex_85[];
extern u8 comicsans_tex_86[];
extern u8 comicsans_tex_87[];
extern u8 comicsans_tex_88[];
extern u8 comicsans_tex_89[];
extern u8 comicsans_tex_90[];
extern u8 comicsans_tex_91[];
extern u8 comicsans_tex_92[];
extern u8 comicsans_tex_93[];
extern u8 comicsans_tex_94[];
extern u8 comicsans_tex_95[];
extern u8 comicsans_tex_96[];
extern u8 comicsans_tex_97[];
extern u8 comicsans_tex_98[];
extern u8 comicsans_tex_99[];
extern u8 comicsans_tex_100[];
extern u8 comicsans_tex_101[];
extern u8 comicsans_tex_102[];
extern u8 comicsans_tex_103[];
extern u8 comicsans_tex_104[];
extern u8 comicsans_tex_105[];
extern u8 comicsans_tex_106[];
extern u8 comicsans_tex_107[];
extern u8 comicsans_tex_108[];
extern u8 comicsans_tex_109[];
extern u8 comicsans_tex_110[];
extern u8 comicsans_tex_111[];
extern u8 comicsans_tex_112[];
extern u8 comicsans_tex_113[];
extern u8 comicsans_tex_114[];
extern u8 comicsans_tex_115[];
extern u8 comicsans_tex_116[];
extern u8 comicsans_tex_117[];
extern u8 comicsans_tex_118[];
extern u8 comicsans_tex_119[];
extern u8 comicsans_tex_120[];
extern u8 comicsans_tex_121[];
extern u8 comicsans_tex_122[];
extern u8 comicsans_tex_123[];
extern u8 comicsans_tex_124[];
extern u8 comicsans_tex_125[];
extern u8 comicsans_tex_126[];
extern u8 comicsans_tex_127[];
extern uObjSprite comicsans_obj_dropshadow;
File diff suppressed because it is too large. Load diff
-136
View File
@@ -1,136 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gs2dex.h>
extern uObjTxtr delfino_tex[];
extern uObjMtx delfino_mtx;
extern uObjSprite delfino_obj;
extern void call_delfino_sprite_dl(int idx, int x, int y, uObjMtx *buffer, int buf_idx);
extern u8 delfino_tex_0[];
extern u8 delfino_tex_1[];
extern u8 delfino_tex_2[];
extern u8 delfino_tex_3[];
extern u8 delfino_tex_4[];
extern u8 delfino_tex_5[];
extern u8 delfino_tex_6[];
extern u8 delfino_tex_7[];
extern u8 delfino_tex_8[];
extern u8 delfino_tex_9[];
extern u8 delfino_tex_10[];
extern u8 delfino_tex_11[];
extern u8 delfino_tex_12[];
extern u8 delfino_tex_13[];
extern u8 delfino_tex_14[];
extern u8 delfino_tex_15[];
extern u8 delfino_tex_16[];
extern u8 delfino_tex_17[];
extern u8 delfino_tex_18[];
extern u8 delfino_tex_19[];
extern u8 delfino_tex_20[];
extern u8 delfino_tex_21[];
extern u8 delfino_tex_22[];
extern u8 delfino_tex_23[];
extern u8 delfino_tex_24[];
extern u8 delfino_tex_25[];
extern u8 delfino_tex_26[];
extern u8 delfino_tex_27[];
extern u8 delfino_tex_28[];
extern u8 delfino_tex_29[];
extern u8 delfino_tex_30[];
extern u8 delfino_tex_31[];
extern u8 delfino_tex_32[];
extern u8 delfino_tex_33[];
extern u8 delfino_tex_34[];
extern u8 delfino_tex_35[];
extern u8 delfino_tex_36[];
extern u8 delfino_tex_37[];
extern u8 delfino_tex_38[];
extern u8 delfino_tex_39[];
extern u8 delfino_tex_40[];
extern u8 delfino_tex_41[];
extern u8 delfino_tex_42[];
extern u8 delfino_tex_43[];
extern u8 delfino_tex_44[];
extern u8 delfino_tex_45[];
extern u8 delfino_tex_46[];
extern u8 delfino_tex_47[];
extern u8 delfino_tex_48[];
extern u8 delfino_tex_49[];
extern u8 delfino_tex_50[];
extern u8 delfino_tex_51[];
extern u8 delfino_tex_52[];
extern u8 delfino_tex_53[];
extern u8 delfino_tex_54[];
extern u8 delfino_tex_55[];
extern u8 delfino_tex_56[];
extern u8 delfino_tex_57[];
extern u8 delfino_tex_58[];
extern u8 delfino_tex_59[];
extern u8 delfino_tex_60[];
extern u8 delfino_tex_61[];
extern u8 delfino_tex_62[];
extern u8 delfino_tex_63[];
extern u8 delfino_tex_64[];
extern u8 delfino_tex_65[];
extern u8 delfino_tex_66[];
extern u8 delfino_tex_67[];
extern u8 delfino_tex_68[];
extern u8 delfino_tex_69[];
extern u8 delfino_tex_70[];
extern u8 delfino_tex_71[];
extern u8 delfino_tex_72[];
extern u8 delfino_tex_73[];
extern u8 delfino_tex_74[];
extern u8 delfino_tex_75[];
extern u8 delfino_tex_76[];
extern u8 delfino_tex_77[];
extern u8 delfino_tex_78[];
extern u8 delfino_tex_79[];
extern u8 delfino_tex_80[];
extern u8 delfino_tex_81[];
extern u8 delfino_tex_82[];
extern u8 delfino_tex_83[];
extern u8 delfino_tex_84[];
extern u8 delfino_tex_85[];
extern u8 delfino_tex_86[];
extern u8 delfino_tex_87[];
extern u8 delfino_tex_88[];
extern u8 delfino_tex_89[];
extern u8 delfino_tex_90[];
extern u8 delfino_tex_91[];
extern u8 delfino_tex_92[];
extern u8 delfino_tex_93[];
extern u8 delfino_tex_94[];
extern u8 delfino_tex_95[];
extern u8 delfino_tex_96[];
extern u8 delfino_tex_97[];
extern u8 delfino_tex_98[];
extern u8 delfino_tex_99[];
extern u8 delfino_tex_100[];
extern u8 delfino_tex_101[];
extern u8 delfino_tex_102[];
extern u8 delfino_tex_103[];
extern u8 delfino_tex_104[];
extern u8 delfino_tex_105[];
extern u8 delfino_tex_106[];
extern u8 delfino_tex_107[];
extern u8 delfino_tex_108[];
extern u8 delfino_tex_109[];
extern u8 delfino_tex_110[];
extern u8 delfino_tex_111[];
extern u8 delfino_tex_112[];
extern u8 delfino_tex_113[];
extern u8 delfino_tex_114[];
extern u8 delfino_tex_115[];
extern u8 delfino_tex_116[];
extern u8 delfino_tex_117[];
extern u8 delfino_tex_118[];
extern u8 delfino_tex_119[];
extern u8 delfino_tex_120[];
extern u8 delfino_tex_121[];
extern u8 delfino_tex_122[];
extern u8 delfino_tex_123[];
extern u8 delfino_tex_124[];
extern u8 delfino_tex_125[];
extern u8 delfino_tex_126[];
extern u8 delfino_tex_127[];
extern uObjSprite delfino_obj_dropshadow;
File diff suppressed because it is too large. Load diff
-136
View File
@@ -1,136 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gs2dex.h>
extern uObjTxtr impact_tex[];
extern uObjMtx impact_mtx;
extern uObjSprite impact_obj;
extern void call_impact_sprite_dl(int idx, int x, int y, uObjMtx *buffer, int buf_idx);
extern u8 impact_tex_0[];
extern u8 impact_tex_1[];
extern u8 impact_tex_2[];
extern u8 impact_tex_3[];
extern u8 impact_tex_4[];
extern u8 impact_tex_5[];
extern u8 impact_tex_6[];
extern u8 impact_tex_7[];
extern u8 impact_tex_8[];
extern u8 impact_tex_9[];
extern u8 impact_tex_10[];
extern u8 impact_tex_11[];
extern u8 impact_tex_12[];
extern u8 impact_tex_13[];
extern u8 impact_tex_14[];
extern u8 impact_tex_15[];
extern u8 impact_tex_16[];
extern u8 impact_tex_17[];
extern u8 impact_tex_18[];
extern u8 impact_tex_19[];
extern u8 impact_tex_20[];
extern u8 impact_tex_21[];
extern u8 impact_tex_22[];
extern u8 impact_tex_23[];
extern u8 impact_tex_24[];
extern u8 impact_tex_25[];
extern u8 impact_tex_26[];
extern u8 impact_tex_27[];
extern u8 impact_tex_28[];
extern u8 impact_tex_29[];
extern u8 impact_tex_30[];
extern u8 impact_tex_31[];
extern u8 impact_tex_32[];
extern u8 impact_tex_33[];
extern u8 impact_tex_34[];
extern u8 impact_tex_35[];
extern u8 impact_tex_36[];
extern u8 impact_tex_37[];
extern u8 impact_tex_38[];
extern u8 impact_tex_39[];
extern u8 impact_tex_40[];
extern u8 impact_tex_41[];
extern u8 impact_tex_42[];
extern u8 impact_tex_43[];
extern u8 impact_tex_44[];
extern u8 impact_tex_45[];
extern u8 impact_tex_46[];
extern u8 impact_tex_47[];
extern u8 impact_tex_48[];
extern u8 impact_tex_49[];
extern u8 impact_tex_50[];
extern u8 impact_tex_51[];
extern u8 impact_tex_52[];
extern u8 impact_tex_53[];
extern u8 impact_tex_54[];
extern u8 impact_tex_55[];
extern u8 impact_tex_56[];
extern u8 impact_tex_57[];
extern u8 impact_tex_58[];
extern u8 impact_tex_59[];
extern u8 impact_tex_60[];
extern u8 impact_tex_61[];
extern u8 impact_tex_62[];
extern u8 impact_tex_63[];
extern u8 impact_tex_64[];
extern u8 impact_tex_65[];
extern u8 impact_tex_66[];
extern u8 impact_tex_67[];
extern u8 impact_tex_68[];
extern u8 impact_tex_69[];
extern u8 impact_tex_70[];
extern u8 impact_tex_71[];
extern u8 impact_tex_72[];
extern u8 impact_tex_73[];
extern u8 impact_tex_74[];
extern u8 impact_tex_75[];
extern u8 impact_tex_76[];
extern u8 impact_tex_77[];
extern u8 impact_tex_78[];
extern u8 impact_tex_79[];
extern u8 impact_tex_80[];
extern u8 impact_tex_81[];
extern u8 impact_tex_82[];
extern u8 impact_tex_83[];
extern u8 impact_tex_84[];
extern u8 impact_tex_85[];
extern u8 impact_tex_86[];
extern u8 impact_tex_87[];
extern u8 impact_tex_88[];
extern u8 impact_tex_89[];
extern u8 impact_tex_90[];
extern u8 impact_tex_91[];
extern u8 impact_tex_92[];
extern u8 impact_tex_93[];
extern u8 impact_tex_94[];
extern u8 impact_tex_95[];
extern u8 impact_tex_96[];
extern u8 impact_tex_97[];
extern u8 impact_tex_98[];
extern u8 impact_tex_99[];
extern u8 impact_tex_100[];
extern u8 impact_tex_101[];
extern u8 impact_tex_102[];
extern u8 impact_tex_103[];
extern u8 impact_tex_104[];
extern u8 impact_tex_105[];
extern u8 impact_tex_106[];
extern u8 impact_tex_107[];
extern u8 impact_tex_108[];
extern u8 impact_tex_109[];
extern u8 impact_tex_110[];
extern u8 impact_tex_111[];
extern u8 impact_tex_112[];
extern u8 impact_tex_113[];
extern u8 impact_tex_114[];
extern u8 impact_tex_115[];
extern u8 impact_tex_116[];
extern u8 impact_tex_117[];
extern u8 impact_tex_118[];
extern u8 impact_tex_119[];
extern u8 impact_tex_120[];
extern u8 impact_tex_121[];
extern u8 impact_tex_122[];
extern u8 impact_tex_123[];
extern u8 impact_tex_124[];
extern u8 impact_tex_125[];
extern u8 impact_tex_126[];
extern u8 impact_tex_127[];
extern uObjSprite impact_obj_dropshadow;
File diff suppressed because it is too large. Load diff
-136
View File
@@ -1,136 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gs2dex.h>
extern uObjTxtr papyrus_tex[];
extern uObjMtx papyrus_mtx;
extern uObjSprite papyrus_obj;
extern void call_papyrus_sprite_dl(int idx, int x, int y, uObjMtx *buffer, int buf_idx);
extern u8 papyrus_tex_0[];
extern u8 papyrus_tex_1[];
extern u8 papyrus_tex_2[];
extern u8 papyrus_tex_3[];
extern u8 papyrus_tex_4[];
extern u8 papyrus_tex_5[];
extern u8 papyrus_tex_6[];
extern u8 papyrus_tex_7[];
extern u8 papyrus_tex_8[];
extern u8 papyrus_tex_9[];
extern u8 papyrus_tex_10[];
extern u8 papyrus_tex_11[];
extern u8 papyrus_tex_12[];
extern u8 papyrus_tex_13[];
extern u8 papyrus_tex_14[];
extern u8 papyrus_tex_15[];
extern u8 papyrus_tex_16[];
extern u8 papyrus_tex_17[];
extern u8 papyrus_tex_18[];
extern u8 papyrus_tex_19[];
extern u8 papyrus_tex_20[];
extern u8 papyrus_tex_21[];
extern u8 papyrus_tex_22[];
extern u8 papyrus_tex_23[];
extern u8 papyrus_tex_24[];
extern u8 papyrus_tex_25[];
extern u8 papyrus_tex_26[];
extern u8 papyrus_tex_27[];
extern u8 papyrus_tex_28[];
extern u8 papyrus_tex_29[];
extern u8 papyrus_tex_30[];
extern u8 papyrus_tex_31[];
extern u8 papyrus_tex_32[];
extern u8 papyrus_tex_33[];
extern u8 papyrus_tex_34[];
extern u8 papyrus_tex_35[];
extern u8 papyrus_tex_36[];
extern u8 papyrus_tex_37[];
extern u8 papyrus_tex_38[];
extern u8 papyrus_tex_39[];
extern u8 papyrus_tex_40[];
extern u8 papyrus_tex_41[];
extern u8 papyrus_tex_42[];
extern u8 papyrus_tex_43[];
extern u8 papyrus_tex_44[];
extern u8 papyrus_tex_45[];
extern u8 papyrus_tex_46[];
extern u8 papyrus_tex_47[];
extern u8 papyrus_tex_48[];
extern u8 papyrus_tex_49[];
extern u8 papyrus_tex_50[];
extern u8 papyrus_tex_51[];
extern u8 papyrus_tex_52[];
extern u8 papyrus_tex_53[];
extern u8 papyrus_tex_54[];
extern u8 papyrus_tex_55[];
extern u8 papyrus_tex_56[];
extern u8 papyrus_tex_57[];
extern u8 papyrus_tex_58[];
extern u8 papyrus_tex_59[];
extern u8 papyrus_tex_60[];
extern u8 papyrus_tex_61[];
extern u8 papyrus_tex_62[];
extern u8 papyrus_tex_63[];
extern u8 papyrus_tex_64[];
extern u8 papyrus_tex_65[];
extern u8 papyrus_tex_66[];
extern u8 papyrus_tex_67[];
extern u8 papyrus_tex_68[];
extern u8 papyrus_tex_69[];
extern u8 papyrus_tex_70[];
extern u8 papyrus_tex_71[];
extern u8 papyrus_tex_72[];
extern u8 papyrus_tex_73[];
extern u8 papyrus_tex_74[];
extern u8 papyrus_tex_75[];
extern u8 papyrus_tex_76[];
extern u8 papyrus_tex_77[];
extern u8 papyrus_tex_78[];
extern u8 papyrus_tex_79[];
extern u8 papyrus_tex_80[];
extern u8 papyrus_tex_81[];
extern u8 papyrus_tex_82[];
extern u8 papyrus_tex_83[];
extern u8 papyrus_tex_84[];
extern u8 papyrus_tex_85[];
extern u8 papyrus_tex_86[];
extern u8 papyrus_tex_87[];
extern u8 papyrus_tex_88[];
extern u8 papyrus_tex_89[];
extern u8 papyrus_tex_90[];
extern u8 papyrus_tex_91[];
extern u8 papyrus_tex_92[];
extern u8 papyrus_tex_93[];
extern u8 papyrus_tex_94[];
extern u8 papyrus_tex_95[];
extern u8 papyrus_tex_96[];
extern u8 papyrus_tex_97[];
extern u8 papyrus_tex_98[];
extern u8 papyrus_tex_99[];
extern u8 papyrus_tex_100[];
extern u8 papyrus_tex_101[];
extern u8 papyrus_tex_102[];
extern u8 papyrus_tex_103[];
extern u8 papyrus_tex_104[];
extern u8 papyrus_tex_105[];
extern u8 papyrus_tex_106[];
extern u8 papyrus_tex_107[];
extern u8 papyrus_tex_108[];
extern u8 papyrus_tex_109[];
extern u8 papyrus_tex_110[];
extern u8 papyrus_tex_111[];
extern u8 papyrus_tex_112[];
extern u8 papyrus_tex_113[];
extern u8 papyrus_tex_114[];
extern u8 papyrus_tex_115[];
extern u8 papyrus_tex_116[];
extern u8 papyrus_tex_117[];
extern u8 papyrus_tex_118[];
extern u8 papyrus_tex_119[];
extern u8 papyrus_tex_120[];
extern u8 papyrus_tex_121[];
extern u8 papyrus_tex_122[];
extern u8 papyrus_tex_123[];
extern u8 papyrus_tex_124[];
extern u8 papyrus_tex_125[];
extern u8 papyrus_tex_126[];
extern u8 papyrus_tex_127[];
extern uObjSprite papyrus_obj_dropshadow;
File diff suppressed because it is too large. Load diff
@@ -1,136 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gs2dex.h>
extern uObjTxtr timesnewroman_tex[];
extern uObjMtx timesnewroman_mtx;
extern uObjSprite timesnewroman_obj;
extern void call_timesnewroman_sprite_dl(int idx, int x, int y, uObjMtx *buffer, int buf_idx);
extern u8 timesnewroman_tex_0[];
extern u8 timesnewroman_tex_1[];
extern u8 timesnewroman_tex_2[];
extern u8 timesnewroman_tex_3[];
extern u8 timesnewroman_tex_4[];
extern u8 timesnewroman_tex_5[];
extern u8 timesnewroman_tex_6[];
extern u8 timesnewroman_tex_7[];
extern u8 timesnewroman_tex_8[];
extern u8 timesnewroman_tex_9[];
extern u8 timesnewroman_tex_10[];
extern u8 timesnewroman_tex_11[];
extern u8 timesnewroman_tex_12[];
extern u8 timesnewroman_tex_13[];
extern u8 timesnewroman_tex_14[];
extern u8 timesnewroman_tex_15[];
extern u8 timesnewroman_tex_16[];
extern u8 timesnewroman_tex_17[];
extern u8 timesnewroman_tex_18[];
extern u8 timesnewroman_tex_19[];
extern u8 timesnewroman_tex_20[];
extern u8 timesnewroman_tex_21[];
extern u8 timesnewroman_tex_22[];
extern u8 timesnewroman_tex_23[];
extern u8 timesnewroman_tex_24[];
extern u8 timesnewroman_tex_25[];
extern u8 timesnewroman_tex_26[];
extern u8 timesnewroman_tex_27[];
extern u8 timesnewroman_tex_28[];
extern u8 timesnewroman_tex_29[];
extern u8 timesnewroman_tex_30[];
extern u8 timesnewroman_tex_31[];
extern u8 timesnewroman_tex_32[];
extern u8 timesnewroman_tex_33[];
extern u8 timesnewroman_tex_34[];
extern u8 timesnewroman_tex_35[];
extern u8 timesnewroman_tex_36[];
extern u8 timesnewroman_tex_37[];
extern u8 timesnewroman_tex_38[];
extern u8 timesnewroman_tex_39[];
extern u8 timesnewroman_tex_40[];
extern u8 timesnewroman_tex_41[];
extern u8 timesnewroman_tex_42[];
extern u8 timesnewroman_tex_43[];
extern u8 timesnewroman_tex_44[];
extern u8 timesnewroman_tex_45[];
extern u8 timesnewroman_tex_46[];
extern u8 timesnewroman_tex_47[];
extern u8 timesnewroman_tex_48[];
extern u8 timesnewroman_tex_49[];
extern u8 timesnewroman_tex_50[];
extern u8 timesnewroman_tex_51[];
extern u8 timesnewroman_tex_52[];
extern u8 timesnewroman_tex_53[];
extern u8 timesnewroman_tex_54[];
extern u8 timesnewroman_tex_55[];
extern u8 timesnewroman_tex_56[];
extern u8 timesnewroman_tex_57[];
extern u8 timesnewroman_tex_58[];
extern u8 timesnewroman_tex_59[];
extern u8 timesnewroman_tex_60[];
extern u8 timesnewroman_tex_61[];
extern u8 timesnewroman_tex_62[];
extern u8 timesnewroman_tex_63[];
extern u8 timesnewroman_tex_64[];
extern u8 timesnewroman_tex_65[];
extern u8 timesnewroman_tex_66[];
extern u8 timesnewroman_tex_67[];
extern u8 timesnewroman_tex_68[];
extern u8 timesnewroman_tex_69[];
extern u8 timesnewroman_tex_70[];
extern u8 timesnewroman_tex_71[];
extern u8 timesnewroman_tex_72[];
extern u8 timesnewroman_tex_73[];
extern u8 timesnewroman_tex_74[];
extern u8 timesnewroman_tex_75[];
extern u8 timesnewroman_tex_76[];
extern u8 timesnewroman_tex_77[];
extern u8 timesnewroman_tex_78[];
extern u8 timesnewroman_tex_79[];
extern u8 timesnewroman_tex_80[];
extern u8 timesnewroman_tex_81[];
extern u8 timesnewroman_tex_82[];
extern u8 timesnewroman_tex_83[];
extern u8 timesnewroman_tex_84[];
extern u8 timesnewroman_tex_85[];
extern u8 timesnewroman_tex_86[];
extern u8 timesnewroman_tex_87[];
extern u8 timesnewroman_tex_88[];
extern u8 timesnewroman_tex_89[];
extern u8 timesnewroman_tex_90[];
extern u8 timesnewroman_tex_91[];
extern u8 timesnewroman_tex_92[];
extern u8 timesnewroman_tex_93[];
extern u8 timesnewroman_tex_94[];
extern u8 timesnewroman_tex_95[];
extern u8 timesnewroman_tex_96[];
extern u8 timesnewroman_tex_97[];
extern u8 timesnewroman_tex_98[];
extern u8 timesnewroman_tex_99[];
extern u8 timesnewroman_tex_100[];
extern u8 timesnewroman_tex_101[];
extern u8 timesnewroman_tex_102[];
extern u8 timesnewroman_tex_103[];
extern u8 timesnewroman_tex_104[];
extern u8 timesnewroman_tex_105[];
extern u8 timesnewroman_tex_106[];
extern u8 timesnewroman_tex_107[];
extern u8 timesnewroman_tex_108[];
extern u8 timesnewroman_tex_109[];
extern u8 timesnewroman_tex_110[];
extern u8 timesnewroman_tex_111[];
extern u8 timesnewroman_tex_112[];
extern u8 timesnewroman_tex_113[];
extern u8 timesnewroman_tex_114[];
extern u8 timesnewroman_tex_115[];
extern u8 timesnewroman_tex_116[];
extern u8 timesnewroman_tex_117[];
extern u8 timesnewroman_tex_118[];
extern u8 timesnewroman_tex_119[];
extern u8 timesnewroman_tex_120[];
extern u8 timesnewroman_tex_121[];
extern u8 timesnewroman_tex_122[];
extern u8 timesnewroman_tex_123[];
extern u8 timesnewroman_tex_124[];
extern u8 timesnewroman_tex_125[];
extern u8 timesnewroman_tex_126[];
extern u8 timesnewroman_tex_127[];
extern uObjSprite timesnewroman_obj_dropshadow;
File diff suppressed because it is too large. Load diff
-136
View File
@@ -1,136 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gs2dex.h>
extern uObjTxtr ubuntu_tex[];
extern uObjMtx ubuntu_mtx;
extern uObjSprite ubuntu_obj;
extern void call_ubuntu_sprite_dl(int idx, int x, int y, uObjMtx *buffer, int buf_idx);
extern u8 ubuntu_tex_0[];
extern u8 ubuntu_tex_1[];
extern u8 ubuntu_tex_2[];
extern u8 ubuntu_tex_3[];
extern u8 ubuntu_tex_4[];
extern u8 ubuntu_tex_5[];
extern u8 ubuntu_tex_6[];
extern u8 ubuntu_tex_7[];
extern u8 ubuntu_tex_8[];
extern u8 ubuntu_tex_9[];
extern u8 ubuntu_tex_10[];
extern u8 ubuntu_tex_11[];
extern u8 ubuntu_tex_12[];
extern u8 ubuntu_tex_13[];
extern u8 ubuntu_tex_14[];
extern u8 ubuntu_tex_15[];
extern u8 ubuntu_tex_16[];
extern u8 ubuntu_tex_17[];
extern u8 ubuntu_tex_18[];
extern u8 ubuntu_tex_19[];
extern u8 ubuntu_tex_20[];
extern u8 ubuntu_tex_21[];
extern u8 ubuntu_tex_22[];
extern u8 ubuntu_tex_23[];
extern u8 ubuntu_tex_24[];
extern u8 ubuntu_tex_25[];
extern u8 ubuntu_tex_26[];
extern u8 ubuntu_tex_27[];
extern u8 ubuntu_tex_28[];
extern u8 ubuntu_tex_29[];
extern u8 ubuntu_tex_30[];
extern u8 ubuntu_tex_31[];
extern u8 ubuntu_tex_32[];
extern u8 ubuntu_tex_33[];
extern u8 ubuntu_tex_34[];
extern u8 ubuntu_tex_35[];
extern u8 ubuntu_tex_36[];
extern u8 ubuntu_tex_37[];
extern u8 ubuntu_tex_38[];
extern u8 ubuntu_tex_39[];
extern u8 ubuntu_tex_40[];
extern u8 ubuntu_tex_41[];
extern u8 ubuntu_tex_42[];
extern u8 ubuntu_tex_43[];
extern u8 ubuntu_tex_44[];
extern u8 ubuntu_tex_45[];
extern u8 ubuntu_tex_46[];
extern u8 ubuntu_tex_47[];
extern u8 ubuntu_tex_48[];
extern u8 ubuntu_tex_49[];
extern u8 ubuntu_tex_50[];
extern u8 ubuntu_tex_51[];
extern u8 ubuntu_tex_52[];
extern u8 ubuntu_tex_53[];
extern u8 ubuntu_tex_54[];
extern u8 ubuntu_tex_55[];
extern u8 ubuntu_tex_56[];
extern u8 ubuntu_tex_57[];
extern u8 ubuntu_tex_58[];
extern u8 ubuntu_tex_59[];
extern u8 ubuntu_tex_60[];
extern u8 ubuntu_tex_61[];
extern u8 ubuntu_tex_62[];
extern u8 ubuntu_tex_63[];
extern u8 ubuntu_tex_64[];
extern u8 ubuntu_tex_65[];
extern u8 ubuntu_tex_66[];
extern u8 ubuntu_tex_67[];
extern u8 ubuntu_tex_68[];
extern u8 ubuntu_tex_69[];
extern u8 ubuntu_tex_70[];
extern u8 ubuntu_tex_71[];
extern u8 ubuntu_tex_72[];
extern u8 ubuntu_tex_73[];
extern u8 ubuntu_tex_74[];
extern u8 ubuntu_tex_75[];
extern u8 ubuntu_tex_76[];
extern u8 ubuntu_tex_77[];
extern u8 ubuntu_tex_78[];
extern u8 ubuntu_tex_79[];
extern u8 ubuntu_tex_80[];
extern u8 ubuntu_tex_81[];
extern u8 ubuntu_tex_82[];
extern u8 ubuntu_tex_83[];
extern u8 ubuntu_tex_84[];
extern u8 ubuntu_tex_85[];
extern u8 ubuntu_tex_86[];
extern u8 ubuntu_tex_87[];
extern u8 ubuntu_tex_88[];
extern u8 ubuntu_tex_89[];
extern u8 ubuntu_tex_90[];
extern u8 ubuntu_tex_91[];
extern u8 ubuntu_tex_92[];
extern u8 ubuntu_tex_93[];
extern u8 ubuntu_tex_94[];
extern u8 ubuntu_tex_95[];
extern u8 ubuntu_tex_96[];
extern u8 ubuntu_tex_97[];
extern u8 ubuntu_tex_98[];
extern u8 ubuntu_tex_99[];
extern u8 ubuntu_tex_100[];
extern u8 ubuntu_tex_101[];
extern u8 ubuntu_tex_102[];
extern u8 ubuntu_tex_103[];
extern u8 ubuntu_tex_104[];
extern u8 ubuntu_tex_105[];
extern u8 ubuntu_tex_106[];
extern u8 ubuntu_tex_107[];
extern u8 ubuntu_tex_108[];
extern u8 ubuntu_tex_109[];
extern u8 ubuntu_tex_110[];
extern u8 ubuntu_tex_111[];
extern u8 ubuntu_tex_112[];
extern u8 ubuntu_tex_113[];
extern u8 ubuntu_tex_114[];
extern u8 ubuntu_tex_115[];
extern u8 ubuntu_tex_116[];
extern u8 ubuntu_tex_117[];
extern u8 ubuntu_tex_118[];
extern u8 ubuntu_tex_119[];
extern u8 ubuntu_tex_120[];
extern u8 ubuntu_tex_121[];
extern u8 ubuntu_tex_122[];
extern u8 ubuntu_tex_123[];
extern u8 ubuntu_tex_124[];
extern u8 ubuntu_tex_125[];
extern u8 ubuntu_tex_126[];
extern u8 ubuntu_tex_127[];
extern uObjSprite ubuntu_obj_dropshadow;
-24
View File
@@ -1,24 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
#include "config.h"
#include "init.h"
#include "debug.h"
#include "s2d_error.h"
void s2d_init(void) {
s2d_error_y = TEX_HEIGHT;
if (IS_RUNNING_ON_EMULATOR)
gSPLoadUcode(gdl_head++, s2d_text, s2d_data);
}
void s2d_stop(void) {
if (IS_RUNNING_ON_EMULATOR) {
gSPLoadUcode(gdl_head++, zex_text, zex_data);
if deinit_cond {
my_rdp_init();
my_rsp_init();
}
}
s2d_reset_defer_index();
}
-14
View File
@@ -1,14 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
#include "config.h"
#define s2d_text gspS2DEX2_fifoTextStart
#define s2d_data gspS2DEX2_fifoDataStart
#define zex_text gspF3DZEX2_PosLight_fifoTextStart
#define zex_data gspF3DZEX2_PosLight_fifoDataStart
extern void s2d_init(void);
extern void s2d_stop(void);
-95
View File
@@ -1,95 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
#include <PR/gu.h>
#include "config.h"
#define ftoq FTOFIX32
#define qtof FIX32TOF
#define qu510(n) ((u16)((n)*0x0400))
void mat2_dst_mul(uObjMtx *dst, uObjMtx *m1, uObjMtx *m2) {
dst->m.A = ftoq((qtof(m1->m.A) * qtof(m2->m.A)) + (qtof(m1->m.B) * qtof(m2->m.C)));
dst->m.B = ftoq((qtof(m1->m.A) * qtof(m2->m.B)) + (qtof(m1->m.B) * qtof(m2->m.D)));
dst->m.C = ftoq((qtof(m1->m.C) * qtof(m2->m.A)) + (qtof(m1->m.D) * qtof(m2->m.C)));
dst->m.D = ftoq((qtof(m1->m.C) * qtof(m2->m.B)) + (qtof(m1->m.D) * qtof(m2->m.D)));
}
void mat2_dst_add(uObjMtx *dst, uObjMtx *m1, uObjMtx *m2) {
dst->m.A = (m1->m.A + m2->m.A);
dst->m.B = (m1->m.B + m2->m.B);
dst->m.C = (m1->m.C + m2->m.C);
dst->m.D = (m1->m.D + m2->m.D);
}
void mat2_copy(uObjMtx *dst, uObjMtx *src) {
dst->m.A = src->m.A;
dst->m.B = src->m.B;
dst->m.C = src->m.C;
dst->m.D = src->m.D;
dst->m.X = src->m.X;
dst->m.Y = src->m.Y;
dst->m.BaseScaleX = src->m.BaseScaleX;
dst->m.BaseScaleY = src->m.BaseScaleY;
}
void mat2_ident(uObjMtx *dst, float scale) {
dst->m.A = FTOFIX32(scale);
dst->m.D = FTOFIX32(scale);
dst->m.B = 0;
dst->m.C = 0;
dst->m.X = 0;
dst->m.Y = 0;
dst->m.BaseScaleX = qu510(scale);
dst->m.BaseScaleY = qu510(scale);
}
// cos -sin sin cos
void mat2_rotate(uObjMtx *dst, f32 degrees) {
dst->m.A = ftoq(cosf(degrees));
dst->m.B = ftoq(sinf(degrees));
dst->m.C = ftoq(-sinf(degrees));
dst->m.D = ftoq(cosf(degrees));
}
void mat2_mul(uObjMtx *m1, uObjMtx *m2) {
mat2_dst_mul(m1, m1, m2);
}
void mat2_add(uObjMtx *m1, uObjMtx *m2) {
mat2_dst_mul(m1, m1, m2);
}
void mat2_scale(uObjMtx *dst, int scale) {
dst->m.A *= scale;
dst->m.D *= scale;
dst->m.BaseScaleX *= scale;
dst->m.BaseScaleY *= scale;
}
#define FTOFIX16(x) (long)((x) * (float)(1 << 2))
#define FIX16TOF(x) ((float)(x) * (1.0f / (float)(1 << 2)))
void mat2_translate(uObjMtx *m, int x, int y) {
m->m.X = x<<2;
m->m.Y = y<<2;
}
void mat2_translate_vec(uObjMtx *m, f32 degrees, f32 mag) {
m->m.X += FTOFIX16(mag * cosf(degrees));
m->m.Y += FTOFIX16(mag * sinf(degrees));
}
typedef float Mat4[4][4];
void gu_to_gs2dex(uObjMtx *m1, Mat4 m2) {
m1->m.A = m1->m.BaseScaleX = FTOFIX32(m2[0][0]);
m1->m.B = FTOFIX32(m2[0][1]);
m1->m.C = FTOFIX32(m2[1][0]);
m1->m.D = m1->m.BaseScaleY = FTOFIX32(m2[1][1]);
m1->m.X = FTOFIX16(m2[3][0]);
m1->m.Y = FTOFIX16(m2[3][1]);
}
-25
View File
@@ -1,25 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
#include <PR/gu.h>
// #include "stack.h"
typedef float Mat4[4][4];
extern void mat2_dst_mul(uObjMtx *dst, uObjMtx *m1, uObjMtx *m2);
extern void mat2_dst_add(uObjMtx *dst, uObjMtx *m1, uObjMtx *m2);
extern void mat2_ident(uObjMtx *dst, float scale);
extern void mat2_mul(uObjMtx *m1, uObjMtx *m2);
extern void mat2_add(uObjMtx *m1, uObjMtx *m2);
extern void mat2_scale(uObjMtx *dst, int scale);
extern void get_final_mat(uObjMtx *dst);
extern void mat2_translate(uObjMtx *m, int x, int y);
extern void mat2_rotate(uObjMtx *dst, f32 degrees);
extern void mat2_translate_vec(uObjMtx *m, f32 degrees, f32 mag);
-39
View File
@@ -1,39 +0,0 @@
#include "config.h"
#include "s2d_error.h"
#include "s2d_print.h"
#define S2D_BUFFERSIZE 100
struct s2d_pos {
int x;
int y;
};
static struct s2d_pos s2d_positions[S2D_BUFFERSIZE];
static char *s2d_charBuffer[S2D_BUFFERSIZE];
static int s2d_charBuffer_index = 0;
void s2d_reset_defer_index(void) {
s2d_charBuffer_index = 0;
}
// TODO: these DO NOT work
// pls debug :)
void s2d_print_deferred(int x, int y, const char *str) {
s2d_charBuffer[s2d_charBuffer_index] = str;
s2d_positions[s2d_charBuffer_index].x = x;
s2d_positions[s2d_charBuffer_index].y = y;
s2d_charBuffer_index++;
}
void s2d_handle_deferred(void) {
for (int i = 0; i < s2d_charBuffer_index; i++) {
s2d_print_alloc(
s2d_positions[i].x,
s2d_positions[i].y,
ALIGN_LEFT,
s2d_charBuffer[i]
);
}
}
-86
View File
@@ -1,86 +0,0 @@
#include "config.h"
#include <ultra64.h>
#include "mtx.h"
#include "debug.h"
float myScale = 1.0f;
int myDegrees = 0;
uObjMtx final_mtx, rot_mtx;
int s2d_red = 255, s2d_green = 255, s2d_blue = 255, s2d_alpha = 255;
int drop_shadow = FALSE;
int drop_x = 0;
int drop_y = 0;
Gfx s2d_text_init_dl[] = {
gsDPPipeSync(),
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureConvert(G_TC_FILT),
gsDPSetAlphaCompare(G_AC_THRESHOLD),
gsDPSetBlendColor(0, 0, 0, 0x01),
gsDPSetCombineLERP(
0, 0, 0, ENVIRONMENT,
0, 0, 0, TEXEL0,
0, 0, 0, ENVIRONMENT,
0, 0, 0, TEXEL0
),
gsSPEndDisplayList(),
};
void s2d_rdp_init(void) {
gDPPipeSync(gdl_head++);
gDPSetTextureFilter(gdl_head++, G_TF_POINT);
gDPSetCycleType(gdl_head++, G_CYC_1CYCLE);
gDPSetRenderMode(gdl_head++, G_RM_XLU_SPRITE, G_RM_XLU_SPRITE2);
if (init_cond) {
gSPDisplayList(gdl_head++, s2d_text_init_dl);
gSPObjRenderMode(gdl_head++, G_OBJRM_XLU);
}
}
void setup_s2d_texture(int idx) {
gDPPipeSync(gdl_head++);
gDPSetEnvColor(gdl_head++, s2d_red, s2d_green, s2d_blue, s2d_alpha);
gSPObjLoadTxtr(gdl_head++, &s2d_tex[idx]);
}
void mtx_pipeline(uObjMtx *m, int x, int y) {
gDPPipeSync(gdl_head++);
mat2_ident(m, 1.0f / myScale);
mat2_translate(m, x, y);
gSPObjSubMatrix(gdl_head++, &m->m.X);
}
#define CLAMP_0(x) ((x < 0) ? 0 : x)
void draw_s2d_dropshadow(char c, int x, int y, uObjMtx *ds) {
if (mtx_cond) mtx_pipeline(ds, x, y);
if (tex_cond) setup_s2d_texture(c);
if (s2d_red != 0
&& s2d_green != 0
&& s2d_blue != 0
) {
gDPPipeSync(gdl_head++);
gDPSetEnvColor(gdl_head++,
CLAMP_0(s2d_red - 100),
CLAMP_0(s2d_green - 100),
CLAMP_0(s2d_blue - 100),
s2d_alpha);
if (spr_cond) gSPObjRectangleR(gdl_head++, &s2d_font);
gDPSetEnvColor(gdl_head++, s2d_red, s2d_green, s2d_blue, s2d_alpha);
}
}
void draw_s2d_glyph(char c, int x, int y, uObjMtx *mt) {
if (mtx_cond) mtx_pipeline(mt, x, y);
if (tex_cond) setup_s2d_texture(c);
if (spr_cond) gSPObjRectangleR(gdl_head++, &s2d_font);
}
-23
View File
@@ -1,23 +0,0 @@
#ifndef S2D_DRAW_H
#define S2D_DRAW_H
#include <ultra64.h>
extern float myScale;
extern int myDegrees;
extern int drop_shadow;
extern int drop_x, drop_y;
extern uObjMtx final_mtx, rot_mtx;
extern int s2d_red, s2d_green, s2d_blue, s2d_alpha;
extern void s2d_rdp_init(void);
extern void setup_font_texture(int idx);
extern void mtx_pipeline(uObjMtx *m, int x, int y);
extern void draw_s2d_glyph(char c, int x, int y, uObjMtx *mt);
extern void draw_s2d_shadow(char c, int x, int y, uObjMtx *ds);
#endif
-23
View File
@@ -1,23 +0,0 @@
#include "config.h"
#include "s2d_print.h"
#include "s2d_error.h"
int s2d_error_y = TEX_HEIGHT;
int s2d_check_align(int align) {
if (align < ALIGN_LEFT || align > ALIGN_RIGHT) {
s2d_print_alloc(TEX_WIDTH, s2d_error_y, ALIGN_LEFT, "ERROR: invalid alignment");
s2d_error_y += TEX_HEIGHT;
return -1;
}
return 0;
}
int s2d_check_str(const char *str) {
if (str == NULL || ((u32)str & 0x80000000) == 0) {
s2d_print_alloc(TEX_WIDTH, s2d_error_y, ALIGN_LEFT, "ERROR: bad string, or no string specified");
s2d_error_y += TEX_HEIGHT;
return -1;
}
return 0;
}
-9
View File
@@ -1,9 +0,0 @@
#ifndef S2D_ERROR_H
#define S2D_ERROR_H
extern int s2d_check_align(int align);
extern int s2d_check_str(const char *str);
extern int s2d_error_y;
#endif
Whitespace-only changes.
-352
View File
@@ -1,352 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
#include <PR/gu.h>
#include <stdarg.h>
#include "config.h"
#include "s2d_draw.h"
#include "s2d_print.h"
#include "s2d_ustdlib.h"
#include "s2d_error.h"
static int s2d_width(const char *str, int line, int len);
enum S2DPrintModes {
MODE_DRAW_DROPSHADOW,
MODE_DRAW_NORMALTEXT,
};
static int s2d_snprint(int x, int y, int align, const char *str, uObjMtx *buf, int len, int mode) {
char *p = str;
int tmp_len = 0;
int orig_x = x;
int orig_y = y;
int line = 0;
char button = '\0';
if (*p == '\0') return;
if (IS_RUNNING_ON_EMULATOR) {
s2d_rdp_init();
} else {
f3d_rdp_init();
}
// resets parameters
s2d_red = s2d_green = s2d_blue = 255;
s2d_alpha = 255;
drop_shadow = FALSE;
switch (align) {
case ALIGN_CENTER:
x = orig_x - s2d_width(str, line, len) / 2;
break;
case ALIGN_RIGHT:
x = orig_x - s2d_width(str, line, len);
}
do {
char current_char = *p;
switch (current_char) {
case CH_SCALE:
CH_SKIP(p);
myScale = (f32)s2d_atoi(p, &p) / 100.0f;
break;
case CH_ROT:
CH_SKIP(p);
myDegrees = s2d_atoi(p, &p);
break;
case CH_TRANSLATE:
CH_SKIP(p);
orig_x = s2d_atoi(p, &p);
line++;
switch (align) {
case ALIGN_LEFT:
x = orig_x;
break;
case ALIGN_CENTER:
x = orig_x - s2d_width(str, line, len) / 2;
break;
case ALIGN_RIGHT:
x = orig_x - s2d_width(str, line, len);
}
CH_SKIP(p);
CH_SKIP(p);
orig_y = s2d_atoi(p, &p);
y = orig_y;
break;
case CH_COLOR:
CH_SKIP(p);
s2d_red = s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
s2d_green = s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
s2d_blue = s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
s2d_alpha = s2d_atoi(p, &p);
break;
case CH_DROPSHADOW:
drop_shadow = 1;
// WIP: drop shadow custom offset
// TODO: unique offset per string; fix negative offsets
CH_SKIP(p);
drop_x = s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
drop_y = s2d_atoi(p, &p);
break;
case CH_BUTTON:
if (len - tmp_len == 1) break;
if (len - tmp_len > 2) {
CH_SKIP(p);
break;
}
button = p[1];
CH_SKIP(p);
switch (button) {
case 'A':
if (!(CONTROLLER_HELD_INPUT & A_BUTTON)) return 1;
break;
case 'B':
if (!(CONTROLLER_HELD_INPUT & B_BUTTON)) return 1;
break;
case 'Z':
if (!(CONTROLLER_HELD_INPUT & Z_TRIG)) return 1;
break;
case 'L':
if (!(CONTROLLER_HELD_INPUT & L_TRIG)) return 1;
break;
case 'R':
if (!(CONTROLLER_HELD_INPUT & R_TRIG)) return 1;
break;
case 'S':
if (!(CONTROLLER_HELD_INPUT & START_BUTTON)) return 1;
break;
}
break;
case '\n':
line++;
switch (align) {
case ALIGN_LEFT:
x = orig_x;
break;
case ALIGN_CENTER:
x = orig_x - s2d_width(str, line, len) / 2;
break;
case ALIGN_RIGHT:
x = orig_x - s2d_width(str, line, len);
}
y += TEX_HEIGHT / TEX_RES;
break;
case '\t':
x += TAB_WIDTH_H / TEX_RES;
break;
case '\v':
x += TAB_WIDTH_V / TEX_RES;
y += TEX_HEIGHT / TEX_RES;
break;
// case CH_SEPARATOR:
// CH_SKIP(p);
// break;
case CH_RESET:
s2d_red = s2d_green = s2d_blue = 255;
s2d_alpha = 255;
drop_shadow = FALSE;
drop_x = 0;
drop_y = 0;
myScale = 1;
myDegrees = 0;
break;
default:
if (current_char != '\0' && current_char != CH_SEPARATOR) {
char *tbl = segmented_to_virtual(s2d_kerning_table);
if (IS_RUNNING_ON_EMULATOR) {
if (drop_shadow && mode == MODE_DRAW_DROPSHADOW) {
draw_s2d_dropshadow(current_char, x + drop_x, y + drop_y, (buf++));
} else if (mode == MODE_DRAW_NORMALTEXT) {
draw_s2d_glyph(current_char, x, y, (buf++));
}
} else {
if (drop_shadow && mode == MODE_DRAW_DROPSHADOW) {
draw_f3d_dropshadow(current_char, x + drop_x, y + drop_y, (buf++));
} else if (mode == MODE_DRAW_NORMALTEXT) {
draw_f3d_glyph(current_char, x, y, (buf++));
}
}
(x += (tbl[(int) current_char] * (BASE_SCALE * myScale)));
}
}
if (*p == '\0') break;
p++;
tmp_len++;
} while (tmp_len < len);
myScale = 1.0f;
myDegrees = 0;
drop_shadow = FALSE;
drop_x = 0;
drop_y = 0;
return 0;
}
static int s2d_string_has_dropshadow(const char *str) {
char *p = str;
int result = FALSE;
do {if (*p == CH_DROPSHADOW) result = TRUE;} while (*(++p) != '\0');
return result;
}
// deprecated
void s2d_print(int x, int y, int align, const char *str, uObjMtx *buf) {
if (s2d_check_align(align) != 0) return;
if (s2d_check_str(str) != 0) return;
s2d_snprint(x, y, align, str, buf, s2d_strlen(str), MODE_DRAW_DROPSHADOW);
s2d_snprint(x, y, align, str, buf, s2d_strlen(str), MODE_DRAW_NORMALTEXT);
}
void s2d_print_alloc(int x, int y, int align, const char *str) {
int len;
if (s2d_check_align(align) != 0) return;
if (s2d_check_str(str) != 0) return;
len = s2d_strlen(str);
if (s2d_string_has_dropshadow(str)) {
uObjMtx *b = alloc(sizeof(uObjMtx) * len);
s2d_snprint(x, y, align, str, b, len, MODE_DRAW_DROPSHADOW);
}
uObjMtx *b2 = alloc(sizeof(uObjMtx) * len);
s2d_snprint(x, y, align, str, b2, len, MODE_DRAW_NORMALTEXT);
}
// deprecated
void s2d_type_print(int x, int y, int align, const char *str, uObjMtx *buf, int *pos) {
int len;
if (s2d_check_align(align) != 0) return;
if (s2d_check_str(str) != 0) return;
len = s2d_strlen(str);
s2d_snprint(x, y, align, str, buf, *pos, MODE_DRAW_DROPSHADOW);
int result = s2d_snprint(x, y, align, str, buf, *pos, MODE_DRAW_NORMALTEXT);
if (s2d_timer % 2 == 0) {
if (*pos < len && result != 1) {
(*pos)++;
}
}
}
void s2d_type_print_alloc(int x, int y, int align, const char *str, int *pos) {
int len;
if (s2d_check_align(align) != 0) return;
if (s2d_check_str(str) != 0) return;
len = s2d_strlen(str);
uObjMtx *b = alloc(sizeof(uObjMtx) * (*pos));
if (s2d_string_has_dropshadow(str)) {
uObjMtx *b_d = alloc(sizeof(uObjMtx) * (*pos));
s2d_snprint(x, y, align, str, b_d, *pos, MODE_DRAW_DROPSHADOW);
}
int result = s2d_snprint(x, y, align, str, b, *pos, MODE_DRAW_NORMALTEXT);
if (s2d_timer % 2 == 0) {
if (*pos < len && result != 1) {
(*pos)++;
}
}
}
// broken atm
static int s2d_width(const char *str, int line, int len) {
char *p = str;
int tmp_len = 0;
int curLine = 0;
int width = 0;
int scale = 1;
if (*p == '\0') return width;
do {
char current_char = *p;
switch (current_char) {
case CH_SCALE:
CH_SKIP(p);
scale = s2d_atoi(p, &p);
break;
case CH_ROT:
CH_SKIP(p);
s2d_atoi(p, &p);
break;
case CH_TRANSLATE:
CH_SKIP(p);
s2d_atoi(p, &p);
curLine++;
CH_SKIP(p);
CH_SKIP(p);
s2d_atoi(p, &p);
break;
case CH_COLOR:
CH_SKIP(p);
s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
s2d_atoi(p, &p);
CH_SKIP(p); CH_SKIP(p);
s2d_atoi(p, &p);
break;
case CH_DROPSHADOW:
case CH_RESET:
break;
case '\n':
curLine++;
break;
case '\t':
if (curLine == line)
width += TAB_WIDTH_H / TEX_RES;
break;
case '\v':
if (curLine == line)
width += TAB_WIDTH_V / TEX_RES;
break;
default:
if (current_char != '\0' && curLine == line)
width += s2d_kerning_table[(int) current_char] * scale;
}
if (*p == '\0') break;
p++;
tmp_len++;
} while (tmp_len < len && curLine <= line);
return width;
}
// void s2d_vsprint(int x, int y, int align, uObjMtx *buf, const char *str, ...) {
// int last_chr;
// va_list args;
// char *dst = alloc(s2d_strlen(str) * 2);
// va_start(args, str);
// last_chr = vsprintf(dst, str, str, args);
// if (last_chr >= 0) {
// dst[last_chr] = '\0';
// }
// s2d_print(x, y, align, dst, buf);
// }
-35
View File
@@ -1,35 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
#define SCALE "\x80" // SCALE (an integer percentage; 100 -> 100%, 25 -> 25%, etc.)
#define ROTATE "\x81" // ROTATE (degrees) // TODO: maybe add axis?
#define TRANSLATE "\x82" // TRANSLATE (x) (y)
#define COLOR "\x83" // COLOR (r) (g) (b) (a)
#define DROPSHADOW "\x84" // DROPSHADOW (no args)
#define BACKGROUND "\x85" // BACKGROUND (w) (h) (alpha)
#define SEPARATOR "\x86"
#define RESET "\x87"
#define BUTTON "\x88"
#define CH_SCALE '\x80'
#define CH_ROT '\x81'
#define CH_TRANSLATE '\x82'
#define CH_COLOR '\x83'
#define CH_DROPSHADOW '\x84'
#define CH_BACKGROUND '\x85'
#define CH_SEPARATOR '\x86'
#define CH_RESET '\x87'
#define CH_BUTTON '\x88'
// ASCII standard escape codes
#define CH_NEWLINE '\n'
#define CH_GET_NEXT(x) (*(++x))
#define CH_SKIP(x) {x++;}
#define ALIGN_LEFT 0
#define ALIGN_CENTER 1
#define ALIGN_RIGHT 2
extern void s2d_print_alloc(int x, int y, int align, const char *str);
extern void s2d_type_print(int x, int y, int align, const char *str, uObjMtx *buf, int *pos);
-55
View File
@@ -1,55 +0,0 @@
// ustdlib means un-standard library
// i'm going to abuse so much of my power here lol
#include "s2d_print.h"
// int s2d_atoi(char *s, char **s2) {
// int ret = 0;
// int isNegative = (*s == '-');
// if (isNegative) {
// s++;
// (*s2)++;
// }
// while (*s != '\0' && *s != ' ' && *s >= '0' && *s <= '9') {
// ret *= 10;
// ret += *s - '0';
// s++;
// (*s2)++;
// }
// if (isNegative) ret *= -1;
// return ret;
// }
int s2d_atoi(char *s, char **s2) {
int ret = 0;
int isNegative = (*s == '-');
if (isNegative) {
s++;
(*s2)++;
}
for (; *s != '\0' && *s != ' ' && *s != CH_SEPARATOR && *s >= '0' && *s <= '9'; s++) {
ret *= 10;
if (*s >= '0' && *s <= '9')
ret += *s - '0';
else break;
if (!(*(s+1) != '\0' && *(s+1) != CH_SEPARATOR && *(s+1) != ' ' && *(s+1) >= '0' && *(s+1) <= '9')) break;
(*s2)++;
}
if (isNegative) ret *= -1;
return ret;
}
int s2d_ilen(char *s) {
int ret = 0;
char *p = s;
while (*p >= '0' && *p <= '9' && *p != CH_SEPARATOR) {
ret++;
p++;
}
return ret;
}
int s2d_strlen(char *s) {
int result = 0;
char *p = s;
do {result++;} while (*(++p) != '\0');
return result;
}
-5
View File
@@ -1,5 +0,0 @@
extern int s2d_atoi(char *s, char **s2);
extern int s2d_ilen(char *s);
extern int s2d_strlen(char *s);
@@ -1,227 +0,0 @@
// int s2d_atoi(char *s, char **s2) {
// int ret = 0;
// int isNegative = (*s == '-');
// if (isNegative) {s++; (*s2)++;}
// for (; *s != '\0' && *s != ' ' && *s >= '0' && *s <= '9'; s++) {
// ret *= 10;
// if (*s >= '0' && *s <= '9')
// ret += *s - '0';
// else break;
// if (!(*(s+1) != '\0' && *(s+1) != ' ' && *(s+1) >= '0' && *(s+1) <= '9')) break;
// (*s2)++;
// }
// if (isNegative) ret *= -1;
// return ret;
// }
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SCALE "\x80" // SCALE (some scale)
#define ROTATE "\x81" // ROTATE (degrees) // TODO: maybe add axis?
#define TRANSLATE "\x82" // TRANSLATE (x) (y)
#define CH_SCALE '\x80'
#define CH_ROT '\x81'
#define CH_TRANSLATE '\x82'
#define CH_GET_NEXT(x) (*(++x))
#define CH_SKIP(x) ((++x))
int saved_degrees = 0;
int myScale = 1;
int myDegrees = 0;
char *t = "TEST CRINGE";
int s2d_atoi(char *s, char **s2) {
int ret = 0;
int isNegative = (*s == '-');
if (isNegative) {
s++;
(*s2)++;
}
for (; *s != '\0' && *s != ' ' && *s >= '0' && *s <= '9'; s++) {
ret *= 10;
if (*s >= '0' && *s <= '9')
ret += *s - '0';
else break;
if (!(*(s+1) != '\0' && *(s+1) != ' ' && *(s+1) >= '0' && *(s+1) <= '9')) break;
(*s2)++;
}
if (isNegative) ret *= -1;
return ret;
}
extern unsigned int gGlobalTimer;
void s2d_print(int x, int y, char *str) {
char *p = str;
int tx = 0, ty = 0;
// int r = 0, g = 0, b = 0, a = 0;
if (*p == '\0') return;
do {
char r = *p;
int s, rd;
switch (r) {
case CH_SCALE:
CH_SKIP(p);
s = s2d_atoi(p, &p);
myScale = s;
break;
case CH_ROT:
CH_SKIP(p);
rd = s2d_atoi(p, &p);
saved_degrees = rd;
myDegrees = rd;
break;
case CH_TRANSLATE:
CH_SKIP(p);
x = s2d_atoi(p, &p);
CH_SKIP(p);
CH_SKIP(p);
y = s2d_atoi(p, &p);
break;
// case CH_COLOR:
// CH_SKIP(p);
// s2d_red = s2d_atoi(p, &p);
// CH_SKIP(p); CH_SKIP(p);
// s2d_green = s2d_atoi(p, &p);
// CH_SKIP(p); CH_SKIP(p);
// s2d_blue = s2d_atoi(p, &p);
// CH_SKIP(p); CH_SKIP(p);
// s2d_alpha = s2d_atoi(p, &p);
// break;
// break;
default:
break;
// if (myDegrees == 0)
// // draw_s2d_glyph(r, (x += (8 * myScale)) + tx, y + ty, (buf++));
// else
// draw_s2d_glyph(r, (x += ((8 * myScale))) + tx, y + ty, (buf++));
}
p++;
// myDegrees += saved_degrees;
} while (*p != '\0');
myScale = 1;
myDegrees = 0;
saved_degrees = 0;
tx = 0;
ty = 0;
}
int s2d_ilen(char *s) {
int ret = 0;
char *p = s;
while (*p >= '0' && *p <= '9') {
ret++;
p++;
}
return ret;
}
int s2d_atoi2(char *s) {
int ret = 0;
int isNegative = (*s == '-');
if (isNegative) {
s++;
}
for (; *s != '\0' && *s != ' ' && *s >= '0' && *s <= '9'; s++) {
ret *= 10;
if (*s >= '0' && *s <= '9')
ret += *s - '0';
else break;
if (!(*(s+1) != '\0' && *(s+1) != ' ' && *(s+1) >= '0' && *(s+1) <= '9')) break;
}
// (*s2)--;
if (isNegative) ret *= -1;
return ret;
}
void s2d_type_print(int x, int y, char *str, int *pos) {
char *temp_str = str;
char tmp = temp_str[*pos];
int len = strlen(str);
char current_transformation;
int cur_transform_index;
switch(tmp) {
case CH_SCALE:
current_transformation = CH_SCALE;
cur_transform_index = *pos;
// temp_str[*pos] = ' ';
printf("SCALE %c %d\n", str[*pos + 1], s2d_ilen(str + *pos + 1));
(*pos) += s2d_ilen(str + *pos+2) + 1;
break;
case CH_ROT:
printf("ROTATE %s %d\n", str + *pos + 1, s2d_ilen(str + *pos + 1));
(*pos) += s2d_ilen(str + *pos + 2);
break;
}
// temp_str[*pos] = '\0';
// s2d_print(x, y, temp_str);
// // temp_str[cur_transform_index] = current_transformation;
// temp_str[*pos] = tmp;
// if (gGlobalTimer % 5 == 0) {
if (*pos < len)
(*pos)++;
// }
printf("%d %c\n", *pos, str[*pos]);
}
char sss[] = SCALE "2";
// SCALE "4"
// "big chungus";
char myS[] = "small test"
ROTATE "2"
"big test"
ROTATE "26"
"italic chungus";
char my2[] = "small test"
ROTATE "2"
"big test"
ROTATE "0000046"
"big italic chungus"
ROTATE "124335";
int pos = 0;
int main(void) {
// printf("%d\n", s2d_atoi(s, &s));
// printf("%s\n", s);
// s2d_print(0,0, t);
char laStrBuf[0x100];
char ff[0x100];
sprintf(ff,
"%s %d:"
TRANSLATE "134 93" "%s:"
, "Floor", 213, "Seed");
sprintf(
laStrBuf,
"%s"
TRANSLATE "138 93" "%s"
TRANSLATE "138 110" "%s"
TRANSLATE "138 130" "%s"
, "The Basement", "LLRRABAB", "Continue", "End Run");
while (pos != strlen(laStrBuf)) {
// s2d_type_print(0, 0, myS, &pos);
printf("%d %s\n",s2d_ilen(laStrBuf + pos), laStrBuf + pos);
pos++;
}
pos = 0;
while (pos != strlen(ff)) {
// s2d_type_print(0, 0, myS, &pos);
printf("%d %s\n",s2d_ilen(ff + pos), ff + pos);
pos++;
}
// laStrBuf[strlen(laStrBuf)] = "\x1";
// laStrBuf[strlen(laStrBuf)+1] = "\x1";
// printf("%s\n", laStrBuf);
// printf("%d\n", s2d_ilen(sss + 1));
}