• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Graphic✓] Separate one 64x64 picture into two 64x32 parts and make it combined & display?

セケツ

ポケハック初心者
  • 62
    Posts
    8
    Years
    • Seen yesterday
    Hello Everyone.
    In pokeemerald, it's known to us that the the "emerald version" banner displayed in the title screen is a combination of two 64×32 parts that come from one 64×64 image.
    Well, since I have had plugged the namebox feature into my hack. I found that the namebox was a little bit narrow to fit some names of the characters. So I changed the number of texts display in the textprinter, and made a 80x32 new namebox picture to insert into the ROM (The original one in that feature is a 64×32 file).
    But when I insert it, a problem came that I could't make it display properly at all. I checked the ROM files and found that the Oamdata in pokeemerald have no support in displaying 80x32 sprites.
    [PokeCommunity.com] Separate one 64x64 picture into two 64x32 parts and make it combined & display?

    Having looked through the "title-screen.c" file, I found a possible solution for it: separate the 80×32 sprite into a 64×32 file and a 16×32 file, putting them together in a 64x64 picture, and finally setting the Oamdata properly to make it display in the ROM. Just like the version banner did in the titlescreen. But It's a shame that I knew nothing about how to set it up.
    Could someone help me with this problem? Thanks again for any assistance.
     
    Last edited:
    Well, I finally figure it out after some shallow & simple researches on the sprite-displaying codes. It really took some time due to my ignorance...
    Here is my "a little bit silly" solution below. Moreover, since my English might be unclear, I will also post some images helping to show it clearly.

    Firstly, I looked up the "field_name_box.c" file, copied a share of the codes which constructed the Oamdata, the Spriteanim & the SpriteTemplate of the 64x32 namebox itself, and modified the "namebox" strings in them to "namebox2" for the sake of distinguishing from the original.
    ("sOam_namebox" to "sOam_namebox2" for instance, as the picture below)
    Spoiler:


    Secondly, I did some changes below in the strings at the top of the file, which gave definitions to the tile tag.

    Spoiler:


    Thirdly, I looked below to the spritesheet part, and doubled the value that control the size of the tilemap of the namebox.
    (Just double it...)

    Spoiler:


    Fourthly, I went to check out the code I had copied in the initial step, and changed the values about "SpriteAnimnamebox2" as the pictures below.

    Spoiler:


    Since the namebox itself is a 4bpp file, I made it (32,0), if it's a 8bpp file, it would be doubled to (64,0).
    (I guess it by looking through the "title_screen.c" file, it may be wrong, sorry.)
    After that, I jumped to the loading part, moved the string controlling the loading of the sprite tile & pallette to the "LoadNameboxtilemap" part.

    Spoiler:


    Finally, I added a new SpriteId & loading function for the second part of the namebox. Just by copying the original & making few adjustments on the values, Parameters & related functions, then defining it at the top. What's more, I also made some adjustments in the display & clear tasks, which also include or have relationships with them.

    Spoiler:


    That's how I completed it. In addition, since the namebox still can't print as many letters as I want (Only 6), I also expanded the width of it, and then went to "menu.c" file, making a change of the VRAM data for the original textbox, through the method provided in "Simple modifications Directory". so LUCKILY make it succeed in making it display properly.

    Spoiler:


    Here is the result screen, Now not only could I make the full name (more than 6 letters) of my character displayed, but also have more free space to make a small face-avatar displayed in the namebox.
    (I made it through the mugshot method, which also comes from the "Simple modifications Directory" thread.)
    [PokeCommunity.com] Separate one 64x64 picture into two 64x32 parts and make it combined & display?

    However, although this question was "solved", I still wonder whether there would be some problems and bugs. Also, if anyone knows the methods that are more proper, clear & simple, Please tell me about it.
    Thanks everyone here again.
     
    Last edited:
    Back
    Top