Commit Graph

42 Commits

Author SHA1 Message Date
Benjamin Popp
c00a5ace08 Add titlescreen info for Ruby/Sapphire 2020-04-27 08:26:55 -05:00
Benjamin Popp
c7ca5d9fbd Add support for multi-page palettes in tilemaps
Tilemaps (and 256 color images) often need multiple palettes to render the entire thing. Palettes can now specify a start/end page in their format, expressing which slots they expect to be loaded into. This, in turn, helps the tilemap render correctly based on those slots.
2020-04-15 15:42:16 -05:00
Benjamin Popp
5b93e8933f Fix Tileset rendering bug 2020-04-12 15:51:50 -05:00
Benjamin Popp
b829f4f886 Render 8 bit images correctly 2020-04-11 21:12:48 -05:00
Benjamin Popp
863b53c860 Add tables for LG/FR1.1/LG1.1 2020-04-11 16:41:25 -05:00
Benjamin Popp
25dced0b76 Add more images
* Found more titlescreen stuff
* Found townmaps
2020-04-10 22:07:23 -05:00
Benjamin Popp
8bcfb304c1 Sprite scaling in table tool 2020-04-10 16:26:39 -05:00
Benjamin Popp
b03181cf1d Add first-person-views table
Required being able to get tilemaps/tilesets to work in a table.
2020-04-10 13:55:58 -05:00
Benjamin Popp
8762a64020 Tilesets / Tilemaps implemented
* Add runs for charizard/venasaur in title screen
* Make the SpriteTool sprite scaling dynamic
* Better support for comments on the end of the line in the table reference file
*
2020-04-09 22:42:55 -05:00
Benjamin Popp
6f77ef6d02 add labels to trainerStruct values 2020-04-06 08:31:48 -05:00
Benjamin Popp
386d91967c Add addresses for other games
I've been mostly prototyping with FR/Emerald. But as part of the prep for integration, let's add the addresses (and tests) for the other roms.
2020-04-05 21:23:59 -05:00
Benjamin Popp
cac1c8f9bb Bugfixing
For some roms, the sprites load at the wrong length. When the proper length is later discovered, it's important to update the length of all related tables, not just the current table.

* Emerald had the wrong pointers/length for trainer sprites
2020-04-04 15:08:53 -05:00
Benjamin Popp
548a9dfbcc add formatting info
We don't support tilesets / tilemaps yet, but when we do, this is how I expect the format to work. Tilemaps need to know about their associated tilesets, which need to know about their associated palettes.
2020-04-04 12:40:10 -05:00
Benjamin Popp
1bc3bad8d7 Allow combobox in table to have an image
This is activated by having the enum be a sprite table, as demonstrated by each trainerdata including a field for its sprite.
-> note that since the trainerdata length now depends on knowing how many sprites there are, the sprites need to be loaded _before_ the trainerdata.
2020-04-03 16:14:45 -05:00
Benjamin Popp
4b26fee784 Bugfixes / more tables
* return an error to the user (instead of crashing) if the user tries to make a compressed run use more data than it would be when uncompressed.
* Update the Sprite shown in the SpriteTool after a format change.
* Add table locations for emerald bag-type icon/palette and firered player trainer sprites
2020-04-02 22:59:57 -05:00
Benjamin Popp
4bdcf6a43d add reference table to map types to icons in FireRed
more work to do here later to make the x/y value work better
2020-04-02 21:14:20 -05:00
Benjamin Popp
fe210221e5 Allow pokemon images/palettes to show up with their other data
The pokemon table tool content is getting rather long.
It might be time to consider resizing the tool or adjusting the format.
2020-03-31 16:26:00 -05:00
Benjamin Popp
fe161c4600 update tables file
add type icon info for FireRed/Emerald
2020-03-31 15:51:09 -05:00
Benjamin Popp
9a14a78f82 Allow more types of runs in tableReference.txt
Instead of keeping tables segregated from other kinds of runs that we want found automatically, just allow all types of runs in the tables file.

Combine the typechart runs into a single run, which makes the chart easier to work with.
2020-03-31 15:21:54 -05:00
Benjamin Popp
9e8090690a Support index-hints for sprites
Sometimes, the sprites don't each have a matching palette. Instead, there's a smaller number of palettes that are shared between all the sprites. In this case, it's useful for the sprite's palette hint to be able to be a name of a table who's length matches a table of palettes. Then the palette from that palette table can be deduced from the indexing element.
2020-03-30 13:08:40 -05:00
Benjamin Popp
47fe5dbab4 Get pokemon icons to show up in the table tool
* Icons in FireRed (and Emerald) are stored uncompressed. So add support for showing uncompressed images/palettes in the tool
* Since we want uncompressed and compressed images to both work in both the table tool and the image tool, make interfaces that both implement and make the tools use those interfaces.
* Not using the right palette yet, because that's using an indexed-palette system where there are far fewer palettes available.
2020-03-28 22:12:16 -05:00
Benjamin Popp
6649f44efa Merge branch 'master' into lz-compression 2020-03-21 22:39:25 -05:00
Benjamin Popp
2d9ccbdd08 Fix visual bugs with sprites / palettes 2020-03-20 23:37:23 -05:00
Benjamin Popp
c8ea6b2585 Add mapnames support
This list appears to be a list of names for the areas. Not sure if it's connected to the overworld map, travel map, or something else. But it seems to be the only place where all the town/route names are stored in a single list.
2020-03-20 22:18:50 -05:00
Benjamin Popp
280187da45 add item images 2020-03-20 16:06:56 -05:00
Benjamin Popp
c34d30c0d8 Add Emerald support 2020-03-19 07:32:05 -05:00
Benjamin Popp
5f63ede92a Fix Castform's front/back sprites
* Remove pages/depth concept from tiles. Tiles that are a multiple of the expected size will be given multiple pages.
* Add UI/ViewModel code to support multiple pages
2020-03-18 16:38:03 -05:00
Benjamin Popp
a941fb05bf Image and Palette decoding works
* decode front/back pokemon sprites, trainers, and pokeballs because why not
* fix bugs in the palette decoder
* allow for automatic pairwise-matching of images and palettes
* make palettes smaller, they don't need to be so big
2020-03-17 21:19:05 -05:00
Benjamin Popp
6ba98620c3 Render images in table tool
* Add TileImage, a Image subclass that represents a single tile with a TileViewModel.
* SpriteArrayElementViewModel hold useful information for how to render a set of tiles.
* The SpriteFormatStruct knows how long its uncompressed data should be (in bytes)
* pokemon sprites are 8 tiles x 8 tiles, not 4 tiles by 4 tiles.
2020-03-11 20:33:41 -05:00
Benjamin Popp
6d08dd2866 Splite the SpriteArrayElement away from the StreamArrayElement
They should have a common interface, but no base class, since they should have very different views.
2020-03-09 22:33:06 -05:00
Benjamin Popp
57a0da913b Setup for displaying sprites in the tool
Now that the lz-compression stuff is working, it's time to finally start on pokemon sprites / palettes.
* Add two new run types that derive from LzRun, for sprites and palettes
* Add formatting code to recognize the class of pointers that point to sprite/palette data
* Add the SpriteArrayElementViewModel, which will eventually house the viewmodel sprites displayed in the UI. Don't worry about editing yet: just get them to show up.
2020-03-08 21:26:10 -05:00
Benjamin Popp
4d47333f82 Find table for pickup's items. Also add table for battle scripting commands
The battle scripting commands are each an assembly routine that specifies what a specific battle script command does. Right now these are just raw pointers, but I have a feeling I'm going to want these in the future...

Each game handles the pickup tables a little differently. R/S/FR/LG store an item and the odds of getting that item (cumulative). Emerald instead stores two tables, one for common items and one for rare items. What values are used from within those tables are based on the pokemon's level.
2020-02-20 20:50:37 -06:00
Benjamin Popp
389886f4b5 Add tables for moveanimations / moveeffects
we're going to need to be able to automatically extend the moveanimations table when a new move is added
2020-02-01 15:26:38 -06:00
Benjamin Popp
5b1cd760fe Auto-find natures table 2020-01-27 23:10:47 -06:00
Benjamin Popp
64bc82c1f3 Regression Fix: lvmoves use the plm format 2020-01-26 21:51:24 -06:00
Benjamin Popp
b9d441c8f0 Add 'tradedata' table
each game has a number of in-game trades you can do. The data for the pokemon you get in return for those trades is outlined in the `tradedata` table.
2020-01-22 18:12:10 -06:00
Benjamin Popp
90e0027d1d Include AI battle scripting bit names
Values from https://github.com/pret/pokeemerald/blob/master/data/battle_ai_scripts.s#L14
2020-01-20 07:22:14 -06:00
Benjamin Popp
365761c400 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2020-01-18 22:17:38 -06:00
Benjamin Popp
f1696f2394 Use bit-array for pokestats EVs
I was considering making a feature that allowed for custom-width bit arrays. But right now this is the only data that would use it, so let's take a shortcut for now.
2020-01-18 22:17:34 -06:00
Benjamin Popp
64cabb02eb Add support for pokedex search tables
The tables refer to pokemon by their nationaldex number, not by their pokemon ID. So I needed a way to use an index-enum. That's the new test in NestedTableTests. That's also the reason for the change in StartCellEdit, ModelCacheScope, and IDataModel.

The new test in AutoSearchTests proves that the 4 new tables work correctly. That's also the reason for the change in StartScreen and tableReference.
2020-01-18 15:38:32 -06:00
Benjamin Popp
050886d441 habitat editor
'Habitat' is a pokedex feature in FireRed / LeafGreen. It involves having pokemon viewable based on where they can be caught, organized into pages, instead of just in dex order. The format is rather nested, but the table tool still works fine.
2020-01-14 20:55:33 -06:00
Benjamin Popp
7258ddaf8e Condense known tables into a reference file
Other things should probably be in this reference file too, such as the headers, streams, and default lists. But this is a good start and should make it more expandable in the future.
2020-01-12 21:13:22 -06:00