Jul 20, 2011 at 2:48 AM
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 35
Pronouns: he/him
LunarSoul said:I tried your rendering, CLord, and it didn't work. I think the title's in the same place as before.
My title.bmp is 640x480, BTW. I still don't know what you meant by fullscreenrect.
What? It works for me.
This time I tried an actual title hack.
Here's what I did for the ASM:
Before:
Code:
Address Code
4100B4 PUSH 28
4100B6 PUSH 58
Address Hex dump Command Comments
0040F9B9 |. C745 E0 00000 MOV DWORD PTR SS:[EBP-20],0
0040F9C0 |. C745 E4 00000 MOV DWORD PTR SS:[EBP-1C],0
0040F9C7 |. C745 E8 90000 MOV DWORD PTR SS:[EBP-18],90
0040F9CE |. C745 EC 28000 MOV DWORD PTR SS:[EBP-14],28
After:
Code:
Address Code
4100B4 PUSH 0
4100B6 PUSH 0
Address Hex dump Command Comments
0040F9B9 |. C745 E0 00000 MOV DWORD PTR SS:[EBP-20],0
0040F9C0 |. C745 E4 00000 MOV DWORD PTR SS:[EBP-1C],31
0040F9C7 |. C745 E8 90000 MOV DWORD PTR SS:[EBP-18],140
0040F9CE |. C745 EC 28000 MOV DWORD PTR SS:[EBP-14],121
Rect for Title BG:
Upper coordinates: 0,49
Lower coordinates: 320,289
(inside Title.pbm or .bmp)
{left,upper,right,lower} = {0,49,320,289}
{0,49,320,289} in hex = {0x0,0x31,0x140,0x121}
Title.bmp used (320 x 289):
![diph.php](http://www.cavestory.org/diph.php?u=https%3A%2F%2Fsites.google.com%2Fsite%2Fcarrotlord%2FTitleforBGhack.png)
Result:
![diph.php](http://www.cavestory.org/diph.php?u=https%3A%2F%2Fsites.google.com%2Fsite%2Fcarrotlord%2FBG_hack2.png)
Proof that it works: Download example mod
Now that I think about it, your title.bmp should not be 640x480 unless you are using the 2x resolution hack.
Instead, go for 320x240 or something similar.
FullScreenRect means the call to the rendering function will use the entire screen for rendering.
This is done through PUSH 0048F91C, which you don't need to modify.