Add ending and gallery data

This commit is contained in:
y.demaisonregne 2023-05-28 20:28:09 +02:00
parent b19517aee4
commit 0b2cd6fe56
12 changed files with 2451 additions and 247 deletions

View File

@ -3,6 +3,7 @@
This is a work in progress decompilation of Metroid - Zero Mission.
2575/2721 functions decompiled (94.63%, 146 left)
0x30d767/0x76b014 bytes of data not in blobs (41.15%, 0x45d8ad left)
Progress can be seen here : https://docs.google.com/spreadsheets/d/1X8XarD5evY8ZI7r_GQqh1pYmdVMbBcINYfRBUlogmKY/edit#gid=0
**This decomp is not shiftable, don't use it as a base to work on anything**

View File

@ -733,6 +733,113 @@ fusion_gallery/image9_bottom.tt;368;0x548728;4
fusion_gallery/image10_top.tt;551;0x548ce8;4
fusion_gallery/image10_bottom.tt;368;0x549584;4
# Ending and gallery
ending/ImageText.pal;224;0x549b44;2
ending/CreditsCharacters.pal;48;0x54a6d4;2
ending/CreditsChozoWall.pal;240;0x54a734;2
ending/Image_0.pal;256;0x54a914;2
ending/Image_1.pal;256;0x54ab14;2
ending/Image_2.pal;256;0x54ad14;2
ending/Image_3.pal;256;0x54af14;2
ending/Image_4.pal;256;0x54b114;2
ending/Image_5.pal;256;0x54b314;2
ending/Image_6.pal;256;0x54b514;2
ending/Image_7.pal;256;0x54b714;2
ending/Posing.pal;208;0x54b914;2
ending/Posing_White1.pal;80;0x54bab4;2
ending/Posing_White2.pal;80;0x54bb54;2
ending/Posing_White3.pal;80;0x54bbf4;2
ending/Posing_White4.pal;80;0x54bc94;2
ending/UnlockedOptions.pal;16;0x54bd34;2
ending/CreditsCharacters.gfx.lz;615;0x54e2f0;4
ending/Image_Top_0.gfx.lz;6186;0x54ec8c;4
ending/Image_Top_0.tt;577;0x554d34;4
ending/Image_Bottom_0.gfx.lz;3525;0x555638;4
ending/Image_Bottom_0.tt;398;0x558d4c;4
ending/Image_Top_1.gfx.lz;5578;0x559384;4
ending/Image_Top_1.tt;577;0x55eaac;4
ending/Image_Bottom_1.gfx.lz;3339;0x55f3b0;4
ending/Image_Bottom_1.tt;577;0x5627dc;4
ending/Image_Top_2.gfx.lz;6259;0x5630e0;4
ending/Image_Top_2.tt;577;0x5692ac;4
ending/Image_Bottom_2.gfx.lz;3178;0x569bb0;4
ending/Image_Bottom_2.tt;577;0x56cd58;4
ending/Image_Top_3.gfx.lz;5289;0x56d65c;4
ending/Image_Top_3.tt;577;0x572900;4
ending/Image_Bottom_3.gfx.lz;2789;0x573204;4
ending/Image_Bottom_3.tt;577;0x575d98;4
ending/Image_Top_4.gfx.lz;5900;0x57669c;4
ending/Image_Top_4.tt;577;0x57c2cc;4
ending/Image_Bottom_4.gfx.lz;3029;0x57cbd0;4
ending/Image_Bottom_4.tt;577;0x57fb24;4
ending/Image_Top_5.gfx.lz;5080;0x580428;4
ending/Image_Top_5.tt;577;0x585388;4
ending/Image_Bottom_5.gfx.lz;3899;0x585c8c;4
ending/Image_Bottom_5.tt;577;0x589978;4
ending/Image_Top_6.gfx.lz;5748;0x58a27c;4
ending/Image_Top_6.tt;577;0x58fc4c;4
ending/Image_Bottom_6.gfx.lz;2932;0x590550;4
ending/Image_Bottom_6.tt;577;0x593320;4
ending/Image_Top_7.gfx.lz;6818;0x593c24;4
ending/Image_Top_7.tt;577;0x59a6ac;4
ending/Image_Bottom_7.gfx.lz;3901;0x59afb0;4
ending/Image_Bottom_7.tt;577;0x59eca4;4
ending/Text.gfx.lz;803;0x59f5a8;4
ending/TextJap.gfx.lz;511;0x5a0234;4
ending/Numbers_Upper.gfx;640;0x5a0a30;1
ending/Numbers_Lower.gfx;640;0x5a0cb0;1
ending/NumbersMisc.gfx.lz;218;0x5a0f30;4
ending/SamusPosingSpaceBackground.gfx.lz;2938;0x5a1298;4
ending/SamusPosingSpaceBackground.tt;412;0x5a4080;4
ending/EndingLight.gfx.lz;743;0x5a46f0;4
ending/EndingLight.tt;145;0x5a528c;4
ending/SamusPosing_1.gfx.lz;1481;0x5a54d0;4
ending/SamusPosing_1.tt;209;0x5a6bf4;4
ending/SamusPosing_2.gfx.lz;1562;0x5a6f38;4
ending/SamusPosing_2.tt;230;0x5a87a0;4
ending/SamusPosing_3.gfx.lz;1712;0x5a8b38;4
ending/SamusPosing_3.tt;238;0x5aa5f8;4
ending/SamusPosing_4.gfx.lz;1692;0x5aa9b0;4
ending/SamusPosing_4.tt;221;0x5ac420;4
ending/SamusPosing_5.gfx.lz;1279;0x5ac794;4
ending/SamusPosing_5.tt;181;0x5adb90;4
ending/SamusPosingSuitless.gfx.lz;1167;0x5ade64;4
ending/SamusPosingSuitless.tt;135;0x5af0a0;4
ending/SamusPosingFullSuit.gfx.lz;1557;0x5af2bc;4
ending/SamusPosingFullSuit.tt;226;0x5b0b10;4
ending/SamusPosingHelmetOff.gfx.lz;1568;0x5b0e98;4
ending/SamusPosingHelmetOff.tt;226;0x5b2718;4
ending/CreditsChozoWallBackground.gfx.lz;7710;0x5b2aa0;4
ending/CreditsChozoWallBackground.tt;551;0x5ba318;4
ending/CreditsChozoWallBottom.gfx.lz;3909;0x5babb4;4
ending/CreditsChozoWallBottom.tt;307;0x5be8c8;4
ending/CreditsChozoWallBottomZoomed.gfx.lz;5160;0x5bed94;4
ending/CreditsChozoWallBottomZoomed.tt;368;0x5c3e34;4
ending/CreditsChozoDrawing.gfx.lz;4770;0x5c43f4;4
ending/CreditsChozoDrawing.tt;368;0x5c8e7c;4
ending/UnlockedOptions.tt;127;0x5c943c;4
# Animated tiles
animated_tiles/Tiles.gfx;12800;0x74f8b4;1
@ -2454,7 +2561,7 @@ Blob_40dd0b_40e0c4.bin;953;0x40dd0b;1
Blob_415460_446d68.bin;203016;0x415460;1
Blob_454818_45f45c.bin;44100;0x454818;1
Blob_479400_4bfee4.bin;289508;0x479400;1
Blob_549b44_74f8b4.bin;2121072;0x549b44;1
Blob_5c9638_74f8b4.bin;1598076;0x5c9638;1
Blob_754bd0_75e6a8.bin;39640;0x754bd0;1
Blob_75fae4_75fd78.bin;660;0x75fae4;1
Blob_7602d4_760420.bin;332;0x7602d4;1

View File

@ -8,12 +8,22 @@
#define ENDING_IMAGE_OAM_SET_YOUR_RATE 1
#define ENDING_IMAGE_OAM_SET_COLLECTING 2
#define ENDING_IMAGE_LINE_CLEAR_TIME 0
#define ENDING_IMAGE_LINE_TIMER 1
#define ENDING_IMAGE_LINE_YOUR_RATE 2
#define ENDING_IMAGE_LINE_COLLECTING 3
#define ENDING_IMAGE_LINE_PERCENTAGE 4
#define ENDING_IMAGE_LINE_NEXT_MISSION 5
#define CREDIT_LINE_TYPE_BLUE 0
#define CREDIT_LINE_TYPE_RED 1
#define CREDIT_LINE_TYPE_WHITE_BIG 2
#define CREDIT_LINE_TYPE_WHITE_SMALL 3
#define CREDIT_LINE_TYPE_UNK_5 5
#define CREDIT_LINE_TYPE_END 6
#define CREDIT_LINE_TYPE_ALL_RIGHTS 10
#define CREDIT_LINE_TYPE_THE_COPYRIGHT 11
#define CREDIT_LINE_TYPE_SCENARIO 12
#define CREDIT_LINE_TYPE_RESERVED 13
#define NUMBER_OF_ENDING_IMAGES 8

View File

@ -2,19 +2,18 @@
#define ENDING_AND_GALLERY_DATA_H
#include "types.h"
#include "constants/ending_and_gallery.h"
#include "structs/ending_and_gallery.h"
#define NUMBER_OF_ENDING_IMAGES 8
#include "macros.h"
extern const u16 sEndingImageTextPAL[14 * 16];
// ...
extern const u32 sEndingImageNumbersMiscGfx[218];
// ...
extern const u16 sEndingImage_549eec[19];
extern const u16 sEndingImageOam_NewRecord[OAM_DATA_SIZE(6)];
// ...
@ -31,19 +30,18 @@ extern const u16 sEndingPosingPAL_White4[5 * 16];
extern const u16 sUnlockedOptionsPAL[1 * 16];
extern const struct EndingImageOam sEndingImageOam_54bd54[6];
extern const struct EndingImageOam sEndingImageOam_FullLines_English[6];
extern const struct EndingImageOam sEndingImageOam_ClearTime_English[9];
extern const struct EndingImageOam sEndingImageOam_YourRate_English[11];
extern const struct EndingImageOam sEndingImageOam_Collecting_English[17];
extern const struct EndingImageOam sEndingImageOam_54bf58[6];
extern const struct EndingImageOam sEndingImageOam_FullLines_Hiragana[6];
extern const struct EndingImageOam sEndingImageOam_ClearTime_Hiragana[6];
extern const struct EndingImageOam sEndingImageOam_YourRate_Hiragana[11];
extern const struct EndingImageOam sEndingImageOam_Collecting_Hiragana[17];
extern const struct EndingImageOam sEndingImageOam_Collecting_Hiragana[11];
extern const u32* const sEndingImagesTopHalfGfxPointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesLowerHalfGfxPointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesTopHalfTileTablePointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesLowerHalfTileTablePointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesTopGfxPointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesBottomGfxPointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesTopTileTablePointers[NUMBER_OF_ENDING_IMAGES];
extern const u32* const sEndingImagesHalfTileTablePointers[NUMBER_OF_ENDING_IMAGES];
extern const u16* const sEndingImagesPalPointers[NUMBER_OF_ENDING_IMAGES];
extern const struct CreditsEntry sCredits[240];
@ -51,7 +49,7 @@ extern const struct CreditsEntry sCredits[240];
extern const u16* const sEndingWhitePalPointers[4];
extern const u8 sEndingImage_54e2dc[8];
extern const u8 sEndingImage_54e2e4[12];
extern const u8 sEndingImageNewRecordPalettes[12];
extern const u32 sCreditsCharactersGfx[615];
@ -63,10 +61,9 @@ extern const u32 sEndingImageTextJapGfx[511];
extern const u8 sEndingImageNumbersGfx_Upper[10 * 64];
extern const u8 sEndingImageNumbersGfx_Lower[10 * 64];
extern const u32 sEndingNumbersMiscGX[218];
extern const u32 sEndingImageNumbersMiscGfx[218];
extern const u32 sEndingSamusPosingSpaceBackgroundGfx[2938];
extern const u32 sEndingSamusPosingSpaceBackgroundTileTable[412];
extern const u32 sEndingSamusPosingSpaceBackgroundTileTable[412];
extern const u32 sEndingLightGfx[743];
extern const u32 sEndingLightTileTable[145];

View File

@ -41,7 +41,7 @@ struct EndingData {
u8 unk_124[6];
u8 unk_12A[17];
u8 padding_13B[6];
u8 unk_141;
u8 hasNewRecord;
u8 endingLettersSpawnDelay[6];
u8 unk_148[17];
u8 padding_159[7];
@ -51,7 +51,7 @@ struct EndingData {
u8 unk_178;
u8 unk_179;
u8 padding_17A[3];
u8 unk_17D;
u8 newRecordPaletteTimer;
u16 oamXPositions[30];
u16 oamYPositions[30];
const u16* oamFramePointers[30];

View File

@ -689,7 +689,8 @@ SECTIONS {
src/data/intro_data.o(.rodata);
/* 479400-4bfee4 */
src/data/fusion_gallery_data.o(.rodata);
/* 549b44-74f8b4 */
src/data/ending_and_gallery_data.o(.rodata);
/* 5c9638-74f8b4 */
src/data/animated_tiles_data.o(.rodata);
src/data/shortcut_pointers.o(.rodata);
/* 754bd0-75e6a8 */

File diff suppressed because it is too large Load Diff

View File

@ -187,82 +187,80 @@ const struct FusionGalleryImageEntry sFusionGalleryData[NUMBER_OF_FUSION_GALLERY
},
};
/*static*/ const u32 sFusionGallery_TopGfx_0[5628] = INCBIN_U32("data/fusion_gallery/image0_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_0[3191] = INCBIN_U32("data/fusion_gallery/image0_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_0[5628] = INCBIN_U32("data/fusion_gallery/image0_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_0[3191] = INCBIN_U32("data/fusion_gallery/image0_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_1[5900] = INCBIN_U32("data/fusion_gallery/image1_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_1[2986] = INCBIN_U32("data/fusion_gallery/image1_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_1[5900] = INCBIN_U32("data/fusion_gallery/image1_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_1[2986] = INCBIN_U32("data/fusion_gallery/image1_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_2[5731] = INCBIN_U32("data/fusion_gallery/image2_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_2[3293] = INCBIN_U32("data/fusion_gallery/image2_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_2[5731] = INCBIN_U32("data/fusion_gallery/image2_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_2[3293] = INCBIN_U32("data/fusion_gallery/image2_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_3[6364] = INCBIN_U32("data/fusion_gallery/image3_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_3[3818] = INCBIN_U32("data/fusion_gallery/image3_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_3[6364] = INCBIN_U32("data/fusion_gallery/image3_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_3[3818] = INCBIN_U32("data/fusion_gallery/image3_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_4[6851] = INCBIN_U32("data/fusion_gallery/image4_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_4[3504] = INCBIN_U32("data/fusion_gallery/image4_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_4[6851] = INCBIN_U32("data/fusion_gallery/image4_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_4[3504] = INCBIN_U32("data/fusion_gallery/image4_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopTileTable_0[551] = INCBIN_U32("data/fusion_gallery/image0_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_0[368] = INCBIN_U32("data/fusion_gallery/image0_bottom.tt");
static const u32 sFusionGallery_TopTileTable_0[551] = INCBIN_U32("data/fusion_gallery/image0_top.tt");
static const u32 sFusionGallery_BottomTileTable_0[368] = INCBIN_U32("data/fusion_gallery/image0_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_1[551] = INCBIN_U32("data/fusion_gallery/image1_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_1[368] = INCBIN_U32("data/fusion_gallery/image1_bottom.tt");
static const u32 sFusionGallery_TopTileTable_1[551] = INCBIN_U32("data/fusion_gallery/image1_top.tt");
static const u32 sFusionGallery_BottomTileTable_1[368] = INCBIN_U32("data/fusion_gallery/image1_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_2[551] = INCBIN_U32("data/fusion_gallery/image2_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_2[368] = INCBIN_U32("data/fusion_gallery/image2_bottom.tt");
static const u32 sFusionGallery_TopTileTable_2[551] = INCBIN_U32("data/fusion_gallery/image2_top.tt");
static const u32 sFusionGallery_BottomTileTable_2[368] = INCBIN_U32("data/fusion_gallery/image2_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_3[551] = INCBIN_U32("data/fusion_gallery/image3_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_3[369] = INCBIN_U32("data/fusion_gallery/image3_bottom.tt");
static const u32 sFusionGallery_TopTileTable_3[551] = INCBIN_U32("data/fusion_gallery/image3_top.tt");
static const u32 sFusionGallery_BottomTileTable_3[369] = INCBIN_U32("data/fusion_gallery/image3_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_4[551] = INCBIN_U32("data/fusion_gallery/image4_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_4[369] = INCBIN_U32("data/fusion_gallery/image4_bottom.tt");
static const u32 sFusionGallery_TopTileTable_4[551] = INCBIN_U32("data/fusion_gallery/image4_top.tt");
static const u32 sFusionGallery_BottomTileTable_4[369] = INCBIN_U32("data/fusion_gallery/image4_bottom.tt");
/*static*/ const u32 sFusionGallery_TopGfx_11[5936] = INCBIN_U32("data/fusion_gallery/image11_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_11[3930] = INCBIN_U32("data/fusion_gallery/image11_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_11[5936] = INCBIN_U32("data/fusion_gallery/image11_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_11[3930] = INCBIN_U32("data/fusion_gallery/image11_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_12[5604] = INCBIN_U32("data/fusion_gallery/image12_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_12[3582] = INCBIN_U32("data/fusion_gallery/image12_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_12[5604] = INCBIN_U32("data/fusion_gallery/image12_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_12[3582] = INCBIN_U32("data/fusion_gallery/image12_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_5[6633] = INCBIN_U32("data/fusion_gallery/image5_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_5[3277] = INCBIN_U32("data/fusion_gallery/image5_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_5[6633] = INCBIN_U32("data/fusion_gallery/image5_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_5[3277] = INCBIN_U32("data/fusion_gallery/image5_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_6[6754] = INCBIN_U32("data/fusion_gallery/image6_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_6[3419] = INCBIN_U32("data/fusion_gallery/image6_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_6[6754] = INCBIN_U32("data/fusion_gallery/image6_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_6[3419] = INCBIN_U32("data/fusion_gallery/image6_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_7[6977] = INCBIN_U32("data/fusion_gallery/image7_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_7[4372] = INCBIN_U32("data/fusion_gallery/image7_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_7[6977] = INCBIN_U32("data/fusion_gallery/image7_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_7[4372] = INCBIN_U32("data/fusion_gallery/image7_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_8[6417] = INCBIN_U32("data/fusion_gallery/image8_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_8[3919] = INCBIN_U32("data/fusion_gallery/image8_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_8[6417] = INCBIN_U32("data/fusion_gallery/image8_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_8[3919] = INCBIN_U32("data/fusion_gallery/image8_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_9[6918] = INCBIN_U32("data/fusion_gallery/image9_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_9[4360] = INCBIN_U32("data/fusion_gallery/image9_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_9[6918] = INCBIN_U32("data/fusion_gallery/image9_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_9[4360] = INCBIN_U32("data/fusion_gallery/image9_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopGfx_10[5764] = INCBIN_U32("data/fusion_gallery/image10_top.gfx.lz");
/*static*/ const u32 sFusionGallery_BottomGfx_10[2273] = INCBIN_U32("data/fusion_gallery/image10_bottom.gfx.lz");
static const u32 sFusionGallery_TopGfx_10[5764] = INCBIN_U32("data/fusion_gallery/image10_top.gfx.lz");
static const u32 sFusionGallery_BottomGfx_10[2273] = INCBIN_U32("data/fusion_gallery/image10_bottom.gfx.lz");
/*static*/ const u32 sFusionGallery_TopTileTable_11[551] = INCBIN_U32("data/fusion_gallery/image11_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_11[368] = INCBIN_U32("data/fusion_gallery/image11_bottom.tt");
static const u32 sFusionGallery_TopTileTable_11[551] = INCBIN_U32("data/fusion_gallery/image11_top.tt");
static const u32 sFusionGallery_BottomTileTable_11[368] = INCBIN_U32("data/fusion_gallery/image11_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_12[550] = INCBIN_U32("data/fusion_gallery/image12_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_12[368] = INCBIN_U32("data/fusion_gallery/image12_bottom.tt");
static const u32 sFusionGallery_TopTileTable_12[550] = INCBIN_U32("data/fusion_gallery/image12_top.tt");
static const u32 sFusionGallery_BottomTileTable_12[368] = INCBIN_U32("data/fusion_gallery/image12_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_5[551] = INCBIN_U32("data/fusion_gallery/image5_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_5[369] = INCBIN_U32("data/fusion_gallery/image5_bottom.tt");
static const u32 sFusionGallery_TopTileTable_5[551] = INCBIN_U32("data/fusion_gallery/image5_top.tt");
static const u32 sFusionGallery_BottomTileTable_5[369] = INCBIN_U32("data/fusion_gallery/image5_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_6[551] = INCBIN_U32("data/fusion_gallery/image6_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_6[368] = INCBIN_U32("data/fusion_gallery/image6_bottom.tt");
static const u32 sFusionGallery_TopTileTable_6[551] = INCBIN_U32("data/fusion_gallery/image6_top.tt");
static const u32 sFusionGallery_BottomTileTable_6[368] = INCBIN_U32("data/fusion_gallery/image6_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_7[551] = INCBIN_U32("data/fusion_gallery/image7_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_7[369] = INCBIN_U32("data/fusion_gallery/image7_bottom.tt");
static const u32 sFusionGallery_TopTileTable_7[551] = INCBIN_U32("data/fusion_gallery/image7_top.tt");
static const u32 sFusionGallery_BottomTileTable_7[369] = INCBIN_U32("data/fusion_gallery/image7_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_8[551] = INCBIN_U32("data/fusion_gallery/image8_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_8[369] = INCBIN_U32("data/fusion_gallery/image8_bottom.tt");
static const u32 sFusionGallery_TopTileTable_8[551] = INCBIN_U32("data/fusion_gallery/image8_top.tt");
static const u32 sFusionGallery_BottomTileTable_8[369] = INCBIN_U32("data/fusion_gallery/image8_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_9[550] = INCBIN_U32("data/fusion_gallery/image9_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_9[368] = INCBIN_U32("data/fusion_gallery/image9_bottom.tt");
static const u32 sFusionGallery_TopTileTable_9[550] = INCBIN_U32("data/fusion_gallery/image9_top.tt");
static const u32 sFusionGallery_BottomTileTable_9[368] = INCBIN_U32("data/fusion_gallery/image9_bottom.tt");
/*static*/ const u32 sFusionGallery_TopTileTable_10[551] = INCBIN_U32("data/fusion_gallery/image10_top.tt");
/*static*/ const u32 sFusionGallery_BottomTileTable_10[368] = INCBIN_U32("data/fusion_gallery/image10_bottom.tt");
/*static*/ const u8 sTempArray_549b44[0x205d70] = INCBIN_U8("data/Blob_549b44_74f8b4.bin");
static const u32 sFusionGallery_TopTileTable_10[551] = INCBIN_U32("data/fusion_gallery/image10_top.tt");
static const u32 sFusionGallery_BottomTileTable_10[368] = INCBIN_U32("data/fusion_gallery/image10_bottom.tt");

View File

@ -62,18 +62,18 @@ void EndingImageLoadTextOAM(u32 set)
}
else
{
ENDING_DATA.oamLength = ARRAY_SIZE(sEndingImageOam_YourRate_Hiragana) + 6;
ENDING_DATA.oamLength = ARRAY_SIZE(sEndingImageOam_Collecting_Hiragana) + 6;
for (i = 0; i < ARRAY_SIZE(sEndingImageOam_YourRate_Hiragana); i++)
for (i = 0; i < ARRAY_SIZE(sEndingImageOam_Collecting_Hiragana); i++)
{
ENDING_DATA.unk_124[i + 6] = sEndingImageOam_YourRate_Hiragana[i].unk_0;
ENDING_DATA.endingLettersSpawnDelay[i + 6] = sEndingImageOam_YourRate_Hiragana[i].spawnDelay;
ENDING_DATA.unk_160[i + 6] = sEndingImageOam_YourRate_Hiragana[i].unk_2;
ENDING_DATA.unk_124[i + 6] = sEndingImageOam_Collecting_Hiragana[i].unk_0;
ENDING_DATA.endingLettersSpawnDelay[i + 6] = sEndingImageOam_Collecting_Hiragana[i].spawnDelay;
ENDING_DATA.unk_160[i + 6] = sEndingImageOam_Collecting_Hiragana[i].unk_2;
ENDING_DATA.oamXPositions[i + 6] = sEndingImageOam_YourRate_Hiragana[i].xPosition;
ENDING_DATA.oamYPositions[i + 6] = sEndingImageOam_YourRate_Hiragana[i].yPosition;
ENDING_DATA.oamXPositions[i + 6] = sEndingImageOam_Collecting_Hiragana[i].xPosition;
ENDING_DATA.oamYPositions[i + 6] = sEndingImageOam_Collecting_Hiragana[i].yPosition;
ENDING_DATA.oamFramePointers[i + 6] = sEndingImageOam_YourRate_Hiragana[i].pFrame;
ENDING_DATA.oamFramePointers[i + 6] = sEndingImageOam_Collecting_Hiragana[i].pFrame;
}
}
}
@ -141,21 +141,21 @@ void EndingImageDisplayLinePermanently(u32 line)
if (ENDING_DATA.language == LANGUAGE_HIRAGANA)
{
ENDING_DATA.unk_124[line] = sEndingImageOam_54bf58[line].unk_0;
ENDING_DATA.endingLettersSpawnDelay[line] = sEndingImageOam_54bf58[line].spawnDelay;
ENDING_DATA.unk_160[line] = sEndingImageOam_54bf58[line].unk_2;
ENDING_DATA.oamXPositions[line] = sEndingImageOam_54bf58[line].xPosition;
ENDING_DATA.oamYPositions[line] = sEndingImageOam_54bf58[line].yPosition;
ENDING_DATA.oamFramePointers[line] = sEndingImageOam_54bf58[line].pFrame;
ENDING_DATA.unk_124[line] = sEndingImageOam_FullLines_Hiragana[line].unk_0;
ENDING_DATA.endingLettersSpawnDelay[line] = sEndingImageOam_FullLines_Hiragana[line].spawnDelay;
ENDING_DATA.unk_160[line] = sEndingImageOam_FullLines_Hiragana[line].unk_2;
ENDING_DATA.oamXPositions[line] = sEndingImageOam_FullLines_Hiragana[line].xPosition;
ENDING_DATA.oamYPositions[line] = sEndingImageOam_FullLines_Hiragana[line].yPosition;
ENDING_DATA.oamFramePointers[line] = sEndingImageOam_FullLines_Hiragana[line].pFrame;
}
else
{
ENDING_DATA.unk_124[line] = sEndingImageOam_54bd54[line].unk_0;
ENDING_DATA.endingLettersSpawnDelay[line] = sEndingImageOam_54bd54[line].spawnDelay;
ENDING_DATA.unk_160[line] = sEndingImageOam_54bd54[line].unk_2;
ENDING_DATA.oamXPositions[line] = sEndingImageOam_54bd54[line].xPosition;
ENDING_DATA.oamYPositions[line] = sEndingImageOam_54bd54[line].yPosition;
ENDING_DATA.oamFramePointers[line] = sEndingImageOam_54bd54[line].pFrame;
ENDING_DATA.unk_124[line] = sEndingImageOam_FullLines_English[line].unk_0;
ENDING_DATA.endingLettersSpawnDelay[line] = sEndingImageOam_FullLines_English[line].spawnDelay;
ENDING_DATA.unk_160[line] = sEndingImageOam_FullLines_English[line].unk_2;
ENDING_DATA.oamXPositions[line] = sEndingImageOam_FullLines_English[line].xPosition;
ENDING_DATA.oamYPositions[line] = sEndingImageOam_FullLines_English[line].yPosition;
ENDING_DATA.oamFramePointers[line] = sEndingImageOam_FullLines_English[line].pFrame;
}
for (i = 0; i < ENDING_DATA.oamLength - 6; i++)
@ -523,7 +523,7 @@ u8 CreditsDisplayLine(u32 line)
ret_0 = 1;
break;
case 5:
case CREDIT_LINE_TYPE_UNK_5:
ret_0 = 1;
break;
@ -1263,10 +1263,10 @@ void EndingImageInit(void)
endingNumber = pen & 0xF;
LZ77UncompVRAM(sEndingImagesTopHalfGfxPointers[endingNumber], VRAM_BASE);
LZ77UncompVRAM(sEndingImagesLowerHalfGfxPointers[endingNumber], VRAM_BASE + 0x8000);
LZ77UncompVRAM(sEndingImagesTopHalfTileTablePointers[endingNumber], VRAM_BASE + 0xE000);
LZ77UncompVRAM(sEndingImagesLowerHalfTileTablePointers[endingNumber], VRAM_BASE + 0xF800);
LZ77UncompVRAM(sEndingImagesTopGfxPointers[endingNumber], VRAM_BASE);
LZ77UncompVRAM(sEndingImagesBottomGfxPointers[endingNumber], VRAM_BASE + 0x8000);
LZ77UncompVRAM(sEndingImagesTopTileTablePointers[endingNumber], VRAM_BASE + 0xE000);
LZ77UncompVRAM(sEndingImagesHalfTileTablePointers[endingNumber], VRAM_BASE + 0xF800);
BitFill(3, 0x4FF04FF, VRAM_BASE + 0xE800, 0x800, 0x20);
dma_set(3, sEndingImagesPalPointers[endingNumber], PALRAM_BASE, DMA_ENABLE << 16 | 0x100);
@ -1386,14 +1386,14 @@ void EndingImageDisplayText(void)
}
}
if (ENDING_DATA.unk_141)
if (ENDING_DATA.hasNewRecord)
{
if (ENDING_DATA.unk_17D++ > 70)
ENDING_DATA.unk_17D = 0;
if (ENDING_DATA.newRecordPaletteTimer++ > 70)
ENDING_DATA.newRecordPaletteTimer = 0;
palette = sEndingImage_54e2e4[ENDING_DATA.unk_17D / 6];
palette = sEndingImageNewRecordPalettes[ENDING_DATA.newRecordPaletteTimer / 6];
src = sEndingImage_549eec;
src = sEndingImageOam_NewRecord;
partCount = *src++;
currSlot += partCount & 0xFF;
@ -1443,13 +1443,13 @@ u8 EndingImageDisplay(void)
break;
case 110:
EndingImageDisplayLinePermanently(0);
EndingImageDisplayLinePermanently(ENDING_IMAGE_LINE_CLEAR_TIME);
break;
case 180:
EndingImageDisplayLinePermanently(1);
EndingImageDisplayLinePermanently(ENDING_IMAGE_LINE_TIMER);
if (gEndingFlags & ENDING_FLAG_NEW_TIME_ATTACK_RECORD)
ENDING_DATA.unk_141++;
ENDING_DATA.hasNewRecord++;
break;
case 330:
@ -1459,7 +1459,7 @@ u8 EndingImageDisplay(void)
case 375:
if (ENDING_DATA.language == LANGUAGE_JAPANESE || ENDING_DATA.language == LANGUAGE_ENGLISH ||
ENDING_DATA.language == LANGUAGE_ITALIAN)
EndingImageDisplayLinePermanently(2);
EndingImageDisplayLinePermanently(ENDING_IMAGE_LINE_YOUR_RATE);
break;
case 380:
@ -1469,16 +1469,16 @@ u8 EndingImageDisplay(void)
break;
case 460:
EndingImageDisplayLinePermanently(3);
EndingImageDisplayLinePermanently(ENDING_IMAGE_LINE_COLLECTING);
break;
case 530:
EndingImageDisplayLinePermanently(4);
EndingImageDisplayLinePermanently(ENDING_IMAGE_LINE_PERCENTAGE);
break;
case 780:
if (ENDING_DATA.language != LANGUAGE_HIRAGANA)
EndingImageDisplayLinePermanently(5);
EndingImageDisplayLinePermanently(ENDING_IMAGE_LINE_NEXT_MISSION);
break;
case 1376:
@ -1871,10 +1871,10 @@ void GalleryInit(void)
ENDING_DATA.endingNumber = endingNbr;
LZ77UncompVRAM(sEndingImagesTopHalfGfxPointers[endingNbr], VRAM_BASE);
LZ77UncompVRAM(sEndingImagesLowerHalfGfxPointers[endingNbr], VRAM_BASE + 0x8000);
LZ77UncompVRAM(sEndingImagesTopHalfTileTablePointers[endingNbr], VRAM_BASE + 0xE000);
LZ77UncompVRAM(sEndingImagesLowerHalfTileTablePointers[endingNbr], VRAM_BASE + 0xF800);
LZ77UncompVRAM(sEndingImagesTopGfxPointers[endingNbr], VRAM_BASE);
LZ77UncompVRAM(sEndingImagesBottomGfxPointers[endingNbr], VRAM_BASE + 0x8000);
LZ77UncompVRAM(sEndingImagesTopTileTablePointers[endingNbr], VRAM_BASE + 0xE000);
LZ77UncompVRAM(sEndingImagesHalfTileTablePointers[endingNbr], VRAM_BASE + 0xF800);
BitFill(3, 0x4FF04FF, VRAM_BASE + 0xE800, 0x800, 32);

View File

@ -2,8 +2,7 @@
#include "constants/event.h"
/**
* 608bc | 6c |
* Function used to manipulate the events
* 608bc | 6c | Function used to manipulate the events
*
* @param action Action to do with the event
* @param event Event concerned
@ -18,43 +17,41 @@ u32 EventFunction(u8 action, u8 event)
if ((u8)(event - 1) > EVENT_BOMBATE)
return FALSE;
else
// Get event chunk
pEvent = gEventsTriggered;
pEvent += (event / 32);
// Get correct bit for the requested event
newEvent = 1 << (event & 31);
// Get previous event
previous = *pEvent;
// Check is set
isSet = previous & newEvent;
if (isSet)
isSet = TRUE; // Not 0, then set
// Apply action
switch (action)
{
// Get event chunk
pEvent = gEventsTriggered;
pEvent += (event / 32);
case EVENT_ACTION_CLEARING:
// Remove
*pEvent = previous & ~newEvent;
break;
// Get correct bit for the requested event
newEvent = 1 << (event & 31);
// Get previous event
previous = *pEvent;
case EVENT_ACTION_SETTING:
// Add
*pEvent = previous | newEvent;
isSet ^= TRUE;
break;
// Check is set
isSet = previous & newEvent;
if (isSet)
isSet = TRUE; // Not 0, then set
// Apply action
switch (action)
{
case EVENT_ACTION_CLEARING:
// Remove
*pEvent = previous & ~newEvent;
break;
case EVENT_ACTION_SETTING:
// Add
*pEvent = previous | newEvent;
isSet ^= TRUE;
break;
case EVENT_ACTION_TOGGLING:
// Toggle
*pEvent = previous ^ newEvent;
isSet ^= TRUE;
break;
}
return isSet;
case EVENT_ACTION_TOGGLING:
// Toggle
*pEvent = previous ^ newEvent;
isSet ^= TRUE;
break;
}
}
return isSet;
}

View File

@ -13,6 +13,7 @@ subDirs: array = [
"animated_tiles/",
"close_up/",
"fusion_gallery/",
"ending/",
"cutscenes/",
"cutscenes/KraidRising/",
"cutscenes/StoryText/",

View File

@ -1,114 +1,44 @@
from io import BufferedReader
from array import array
def sign(value):
if value > 0x7FFF:
value = -(0x10000 - value)
return value
def extractInput(value):
result = ""
if value & 0x1:
result = "KEY_A"
if value & 0x2:
if result == "":
result = "KEY_B"
else:
result += " | KEY_B"
if value & 0x4:
if result == "":
result = "KEY_SELECT"
else:
result += " | KEY_SELECT"
if value & 0x8:
if result == "":
result = "KEY_START"
else:
result += " | KEY_START"
if value & 0x10:
if result == "":
result = "KEY_RIGHT"
else:
result += " | KEY_RIGHT"
if value & 0x20:
if result == "":
result = "KEY_LEFT"
else:
result += " | KEY_LEFT"
if value & 0x40:
if result == "":
result = "KEY_UP"
else:
result += " | KEY_UP"
if value & 0x80:
if result == "":
result = "KEY_DOWN"
else:
result += " | KEY_DOWN"
if value & 0x100:
if result == "":
result = "KEY_R"
else:
result += " | KEY_R"
if value & 0x200:
if result == "":
result = "KEY_L"
else:
result += " | KEY_L"
if result == "":
result = "KEY_NONE"
return result
types: array = [
"CREDIT_LINE_TYPE_BLUE",
"CREDIT_LINE_TYPE_RED",
"CREDIT_LINE_TYPE_WHITE_BIG",
"CREDIT_LINE_TYPE_WHITE_SMALL",
"",
"CREDIT_LINE_TYPE_UNK_5",
"CREDIT_LINE_TYPE_END",
"",
"",
"",
"CREDIT_LINE_TYPE_ALL_RIGHTS",
"CREDIT_LINE_TYPE_THE_COPYRIGHT",
"CREDIT_LINE_TYPE_SCENARIO",
"CREDIT_LINE_TYPE_RESERVED"
]
file = open("../mzm_us_baserom.gba", "rb")
def Func():
addr = 0x3603e8
addr = 0x54c10c
file.seek(addr)
sizes = [104, 88, 80, 64, 64, 40, 32, 40, 136, 48, 88, 32, 48, 40, 24, 96]
result = ""
for x in range(0, len(sizes)):
for x in range(0, 240):
result += "["+str(x)+"] = {\n\t.type = "
result += "static const u16 sDemo"
result += str(x)
result += "_Inputs[] = {\n\t"
offset: int = int.from_bytes(file.read(1), "little")
result += types[offset]
for y in range(0, sizes[x]):
result += extractInput(int.from_bytes(file.read(2), "little"))
result += ",\n\t"
result += "};\n\n"
result += "static const u16 sDemo"
result += str(x)
result += "_Durations[ARRAY_SIZE(sDemo"
result += str(x)
result += "_Inputs)"
result += "] = {\n\t"
for y in range(0, sizes[x]):
result += str(int.from_bytes(file.read(2), "little"))
result += ",\n\t"
result += "};\n\n"
txt:str = file.read(35).decode("ascii").strip('\0')
result += ",\n\t.text = \""+txt+"\"\n},\n"
return result
f = open("demos.txt", "w")
f = open("credits.txt", "w")
f.write(Func())
f.close()