Commit Graph

48 Commits

Author SHA1 Message Date
Kurt
9bd47f505a Ensure fake coordinates are not negative modulo
Closes #736 prob shouldn't have base acres instead of sea...
2026-02-02 02:52:56 -06:00
Kurt
e6f45d1805 Fix terrain brush popup
Closes #729
1. Dark mode now applied correctly (was previously lacking)
2. Fixed terrain brush action (brush active is higher priority than drag, fix tile fetch)
3. Fixed writing of Building/structure labels; apply after Terrain
4. Single terrain brush form allowed, center to Field Editor on launch

Somewhat related: fix Show() load for non-ShowDialog() forms to center to parent.
2026-01-30 22:55:26 -06:00
Kurt
39d6a3196d Render outside terrain selections
outside.bin used to display; might be wrong on some of the outside acres (north?)
2026-01-27 00:00:19 -06:00
Kurt
0393638680 Clear viewport item node on skip
When jumping viewports, pixels from the previous viewport weren't being wiped
2026-01-26 22:36:54 -06:00
Kurt
b88c518d5c
Update FieldItemEditor for 3.0.0 (#716)
Updates the Field Item Editor to render layers based on the entire map, and the per-patch positioning of each layer.
Import/export will gracefully handle upgrade/downgrade, and viewport import/export will gracefully update tiles rather than a per-acre basis.

Performance has also been slightly improved; no allocation is done anymore when updating the image.
2026-01-25 16:55:38 -06:00
Kurt
fa3f0e3cc8
Update to .NET 10 (#683) 2026-01-13 16:02:58 -06:00
Alca259
a20bd1c419
Support for 16x16px per tile and river editor (#668)
* Upgrade to .NET 8 + Nugets

* Add support for tile 16x16px instead 1px

* Rivers except 2B

* River2B
2025-07-28 00:02:34 -05:00
Kurt
3dd6b56647 Update IsFlowerGene usage
probably should re-dump itemkind to be more aware of gene/nonGene flower item types, whatever
2021-02-13 09:44:37 -08:00
Kurt
35c26ff76f Differentiate harvested flowers vs gene storing flowers
Closes #447
2021-02-07 15:50:21 -08:00
Kurt
83169b8738 Bump language version to c#9 2020-12-24 23:53:40 -08:00
Kurt
ae3742ad1f Avoid infinite loop if an invalid extension tile is set 2020-08-05 14:47:49 -07:00
Kurt
48fbca6b96 Invert W gene coloration for field item sprite 2020-06-05 20:58:19 -07:00
Kurt
d01e9e0980 Minor clean
fix upscale passing parameter
2020-05-27 11:23:05 -07:00
Kurt
25262478ae Add sensitive scaling for field item map
if ppl have something other than 100% scale somehow
Closes #248
2020-05-25 09:39:22 -07:00
Kurt
084542d367 xmldoc
tried to split off some grid stuff because rooms don't need to know about acres; whatever
2020-05-23 13:08:14 -07:00
Kurt
f05f59736b Abstract Flag1 for wrapping in GUI
MessageBottle uses Flag1 for different purposes
2020-05-18 11:29:38 -07:00
Kurt
0be1bb87a1 Move gene value check
negligible speed ++ lul
2020-05-18 10:23:56 -07:00
Kurt
09711ff43e Show punnet square of flower genes
Closes #226
Solid: Both Genes
Semi-Solid: Single Gene
Empty: No Gene
2020-05-18 10:14:42 -07:00
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