Commit Graph

30 Commits

Author SHA1 Message Date
Kurt
902dd90dc9 Remove hardcoded map dimension properties
we can refer to MaxWidth/MaxHeight instead
2020-05-11 23:13:40 -07:00
Kurt
60faecdc69 Refactoring
move files, abstract some logic for later reuse
2020-05-11 22:14:27 -07:00
Kurt
4d1bff3869 Visually indicate dropped items instead of placed items 2020-05-10 11:27:47 -07:00
Kurt
801db3e130 Add exterior acre pixel dumper, show exterior acres on Field Item editor
980KB -> 12KB when compressed, seems legit

just an array of tile definitions (32x32 style), sequential acres (undefined acres are all zeroed)

tiles aren't displated as granular as possible, only sets as 16x16 tiles instead of larger 32x32, but it should be a good enough color hint to people for editing

big thanks to ninji for the color mapping in his disassembly and the pbc->tile parse
2020-05-09 16:15:37 -07:00
Kurt
07e393177f add initial exterior acre pixel calculation
no functional changes to NHSE
2020-05-09 08:31:46 -07:00
Kurt
c1e7f2dc28 Move tile color to core 2020-05-09 00:13:19 -07:00
Kurt
d68b8b2fbf Fix oak tree color on field item map 2020-05-08 15:01:10 -07:00
Kurt
a6f88a048b Translate item kind from FieldItem
only trees and flowers are really necessary (for editing values)
2020-05-08 13:24:13 -07:00
Kurt
a9810c7d03 Merge Field Item back into Item
Different means of expression for the 8 byte item structure's FreeParam

Will be expanding the ItemEditor so that it has a checkmark to toggle Extension Item editing behavior.

Removes IHeldItem as there's no need to abstract it.
2020-05-08 12:20:24 -07:00
Kurt
7d975a9ea9 Differentiate field item colors
Closes #159
2020-05-03 20:17:36 -07:00
Kurt
d78b0e0e1f Minor clean
remove some unused logic (program growth = no longer needed)
2020-05-03 19:36:14 -07:00
Kurt
3ec69afe6b Show terrain tile type, add slider for transparency adjust 2020-05-02 23:57:43 -07:00
Kurt
adf9b43bc0 Add transparency slider for buildings 2020-05-02 23:25:14 -07:00
Kurt
928e699168 misc performance improvements
Preallocate the terrain-building objects and reuse

changed:
- grid alternates with a slightly-darker to help indicate the larger 2x2 tile grid.
- put plaza & buildings behind the gridlines
2020-05-02 23:02:37 -07:00
Kurt
4690cfe167 Refactoring: Field Item Editor + buildings/terrain
Extracts logic from the building & terrain & field item editors for reuse / separation of concerns

Have FieldItemEditor select between Items & Terrain so that you can change the popup menu mode (view set delete)

Not sure how I want to show the terrain names...
2020-05-02 20:05:09 -07:00
Kurt
d930b02489 Show buildings/plaza on field item editor
Building sizes not to scale, but should assist in representing layout for now

Extract terrain color to separate class
2020-05-01 16:46:38 -07:00
Kurt
33b9e7f170 Show terrain map behind field item view
Adds a transparency slider to have the field items fade so you can see the underlying terrain tile.

Not really optimized (allocates every time), but it should be fine for now.

Make the None item transparent, so that the entire map bleeds through (clear clarity).
2020-04-28 21:08:57 -07:00
Kurt
8808eadb20 Remove enum tostring call for tile color fetch
lighten road colors on higher elevation

0.5->0.6 for 20% darker cliff edges
2020-04-28 19:17:05 -07:00
Kurt
6bb54264e8 Show roads as brown 2020-04-27 11:23:35 -07:00
Kurt
da955be606 Show X on buried items root 2020-04-11 11:57:28 -07:00
Kurt
6ce0d1595d Remove allocation for field item editor
Allocate once on init, and reuse objects

pretty much buttery smooth now :)
2020-04-09 16:01:20 -07:00
Kurt
cf889668d3 Minor perf improvements
Move repeat calculations from inner loop to outer loop
Extract some methods for reusability
2020-04-09 14:35:09 -07:00
Kurt
91418e9c66 Enhance extension item visualization
Mark class as static

Draws directional lines trying to point back to the root item
2020-04-09 12:52:07 -07:00
Kurt
557a34edbc Minor clean
Reduce array get counts by 16 (from 17->1)
2020-04-08 17:13:00 -07:00
Kurt
8469e12c38 Change field item grid to drawn bitmap
No lag, clean grid, muh efficiency
2020-04-08 14:35:51 -07:00
Kurt
29b03cc428 Faster map sprite generation
Create the bitmap via bytes (as int[]) then create the final image, rather than SetPixel
2020-04-08 12:24:25 -07:00
Kurt
91f8881808 Add Field Item viewer
Layer 1 only, no tile mutation capability for now. Can still move things around / delete.
2020-04-07 15:25:34 -07:00
Kurt
824d31719e Pre-blend colors with white
faster fetch
2020-04-07 13:40:39 -07:00
Kurt
25a162c187 Add more fielditem manipulation logic
32x32 because we have 2x2 metatiles -- items can be placed at half-coordinates relative to tile coordinates.
2020-04-07 11:25:27 -07:00
Kurt
2ce535c67c Refactoring
Move sprite resources to subfolder for organization
Add FieldItem class (replaces MapItem), might work in a field item editor (similar to building editor)
2020-04-07 10:19:58 -07:00