View Single Post
  #197    
Old January 26th, 2010, 06:07 PM
JPAN
pokemon rom researcher
 
Join Date: Dec 2008
Quote:
Originally Posted by Deokishisu View Post
JPAN, I'm here again with another quick suggestion/question. Would there be a way to display images larger than 64x64 using a function similar to the "show fossil picture" command you fixed up? I know there would be the actual tileset of the image and RAWs involved due to the size, but could it be done? A function such as that would serve soo many purposes. From RPG-like cutscenes, to posters, to mini-game "titlescreens" and backdrops. You could probably even use it as a cheap extra image like those found when entering Mt. Moon and Viridian Forest, or a fun way to give signposts in towns a little extra "oomph".
If you mean, manipulate the existing function to do it, I've tested it and no changes I made created any positive effects. I'm positive something can be done with it to create such displays, but haven't got much done in that area.
If you mean Full-display images, you can make a routine similar to the one of the map display (even simpler, as there would be no more button checking than the possible A\B button) and simply place the image on-screen. That image could be a 256 color image with a size up to the size of the GBA screen. I'm pretty sure the best way to do it would be to actually program something with the homebrew GBA lib and copy the results into a routine to be called by the script, that would replace the OW screen update. But here it's more guesswork than actual facts, as I have never even considered doing something like that prior to this post.

On a slightly related sidenote, I have finished the routines and data that would make a RTC-clock based berry system work. But after 8 hours of trying to index and insert the berry tree sprites, I came to the definite conclusion that I am incapable of putting OW sprites in a ROM through a PNG or BMP image. The mechanics are as follow:
The Plant data is composed of two variables, one that contains the total time and another that contains the actual berry data, watering times and a "watered" flag.
Two functions rule the berry tree behaviour. First is the "Update time" function. It is called at a very update-heavy routine (adding on in the keys hacked routine), and basically checks all associated variables for a plant, and if it's real, adds to its time variable. Loads it up, checks its contents to see if it's not real, if it is, adds the time, checks if the berry has expired (reverts back to seed stage) and erases the watered bit, that checks if you already watered that thing.
The other function is added to the OW hack, and checks if the OW number is 0xfeyy. If so, loads up the corresponding variable, checks for the berry tree table number, and if a berry is present, loads up the timer if it is and checks against the minimum values for that stage present in a small table (berry tree Table). At the end, displays one of those values or the seed one.
The berry tree table is a table that is composed of 24 bytes:
Code:
Berry tree data
2 bytes item number
1 byte item quantity
1 byte water quantity (not used, but balances out the address)
2 bytes seed stage end time
2 bytes OW for sprout
2 bytes sprout stage end time
2 bytes OW for small tree
2 bytes small tree end time
2 bytes OW for full grown
2 bytes full grown end time
2 bytes OW for ripe berry tree
2 bytes berry expiring time
2 bytes filler (for now)
Also, I assumed by default a time window of 1 minute, so planting a tree at minute 1:00 and the next at 1:50 would make it so both trees grow at the same time from that point forward.
The code is still in "trial mode", and it's somewhat buggy at times, but by tomorrow most bugs must be fixed. The only thing missing is some berry trees in the ROM.

So, if anyone out there wants to try, I would need as many trees as you can get working in a rom, with a total of 9 different palettes maximum. Make it over the data of any 16x32 Sprite, to make the transaction easier.
__________________
Here are the links for my work


Currently working on:
Battle Script Documentation
Another large project
Reply With Quote