116 Commits

Author SHA1 Message Date
Nyerguds
5b106699af * RA TMP files identified from stream
* Changed the "x" in all dimension reporting to be the specific mathematical symbol.
* Changed the order of detections so 1-frame shp files can no longer be detected as mix files.
2024-09-18 23:45:30 +02:00
Nyerguds
5de4c56df6 minor cleanup 2024-09-09 13:06:06 +02:00
Nyerguds
51ce451bc9 Since overlay are now technically overlappers, adding them to the buildings list also adds them to the overlappers list, so the outline's overlap detection needs to compensate for that. 2024-09-09 12:39:00 +02:00
Nyerguds
0c5d614af5 Added OpaqueMask analysis for overlay, and made it so units only get evaluated on the center infantry position. 2024-09-08 19:44:13 +02:00
Nyerguds
a9b0eb7ea9 Overlap detection for drawing outlines on infantry is now handled per infantry sub-position.
* Fixed minor issue in tooltip handling that could give an error when closing the editor.
2024-09-07 16:47:32 +02:00
Nyerguds
77c487643f Changed remaster Waypoint indicator and edit mode icon from beacon to select cursor.
* Fixed "CalculateOpaqueBounds" method, thereby fixing the fact the Overlay editing mode crate icon was too small.
* Migrated code to fetch either classic or remastered graphics to ITilesetManager.
2024-08-14 12:53:56 +02:00
Nyerguds
c48e045544 Various fixes
* Changed small techno triggers font to 5 pixels high.
* Fixed trigger changes on Terrain objects not immediately refreshing the map indicators.
* Fixed internal issue with the resources of object property popups not getting cleaned up correctly.
* Fixed refresh event handler not getting removed when opening an object's properties popup.
* Fixed an issue in the outline caching of buildings where the damaged state was not taken into account.
* Updated showcase preview pictures.
2024-08-13 15:34:23 +02:00
Nyerguds
d14a46cb79 Added classic font rendering for techno triggers.
* Fixed overlap detection of walls in both TD and RA; they can only be obstructed by buildings now.
* Fixed bug where editing properties of an object would clear its trigger in the dropdown.
* Replaced usages of "6point.fnt" in RA by "editfnt.fnt", because it is constant, while "6point.fnt" differs in lores.mix and hires.mix.
2024-08-12 16:18:21 +02:00
Nyerguds
2ff36fbb7c Added missing licenses. 2024-08-09 12:45:08 +02:00
Nyerguds
2162061871 Fixed object occupancy indicators for buildings and walls.
* Split romfis definitions of japanese briefing cps pictures off to their own type so they're not indicated as "map file".
* Added debug string representations to various classes.
2024-08-08 15:49:07 +02:00
Nyerguds
1146e84f05 Added trigger data tooltips to all trigger dropdowns
* Fixed TriggerSummary function crashing when given trigger was null
* Fixed techno triggers not showing on buildings after they were split off from the Technos list
* Added undetermined state to building capturability indicator.
* Added proper disposing to capturability indicator images.
2024-08-02 21:26:29 +02:00
Nyerguds
1160fc9d63 Added visualiser for capturability, with the ability to read rule tweaks for both RA and (fan-patched) TD. This also keeps the remaster's "cap=win/des=lose" capturability override in mind.
* Fixed bug that made classic smudge previews render as smooth.
2024-07-31 22:33:36 +02:00
Nyerguds
2b0b01319d Reworked flag painting to always use the same function.
Reworked overlap checks to simply use a DrawOrderCache that is filled in when overlapping objects get painted.
Removed obsolete code to not use the improved Y-rendering, since it became incompatible with the DrawOrderCache system.
Removed linking of Buildings to Techno list, so Units, Infantry and Terrain techno types can now overlap buildings and walls. I might make this a setting, since it is much like blocking bibs.
2024-07-29 18:38:08 +02:00
Nyerguds
9dc72e5932 Cleaned up "Tint" code and consistently replaced it by "IsPreview" property, so the renderer handles actual colours and alpha.
* Removed old unused CONC tiling code from the source.
* Added logging to ROMFIS.
* Added alpha factors into the config
* Renamed "Map terrain types" menu to "Map land types".
* Added a reference in Smudge types to have an attached Building object, so bibs can actually be linked to their owner.
* Unified all flag rendering into one function, which correctly shows the preview flag in its intended position in case of overlaps.
* Added an option to all rendering functions to ignore alpha modifiers, so outline generation no longer needs to make specific no-transparency clone objects.
2024-07-29 10:08:56 +02:00
Nyerguds
ea3c772d59 Implemented ShapeCacheManager and applied it to the rendering of cell hashing, object outlines, map indicators, map tiles, and smudge.
* Fixed bug in infantry drag-place redo
* Fixed bugs related to minimising the main window
* Added settings for the outline colours of all unowned object types.
* Reordered the MapLayerFlag enum to correspond to the flag layer classes
* Refactored the function that enables / disables the MapLayerFlag options based on the checked menu options
* Upgraded the HighQualityScale function to accept non-square image input and output
* Fixed TeamRemapManager to properly initialise TD and RA default remaps, after something broke with the recent edit to make it cache classic font remaps.
2024-07-19 15:41:12 +02:00
Nyerguds
403369bf19 Added classic font fake labels.
* Fixed bug in build priority labels where 0 was no longer shown after implementing classic font.
* Fixed bug where priority labels were painted way too small on the building tool template.
* The generated remap objects for classic fonts now get cached in TeamRemapManager.
* Fixed the fake label not being shown as more transparent on placement previews.
2024-07-15 17:39:36 +02:00
Nyerguds
3590451c7b * Rebalanced the "base colours" of the house colours to be more similar in the remastered and classic view. 2024-07-15 00:15:10 +02:00
Nyerguds
3a2fd5790d Cleanup 2024-07-10 16:29:19 +02:00
Nyerguds
1f407bde08 Fixed bugs in overlaps, checks on overlay placement, file identification from streams.
* Fixed bugs in overlap checking due to adding support for more types.
* Fixed unit overlaps ignoring the specific unit house colour.
* Fixed RA maps placing techno types and solid overlays on the same cells.
* Added file identification from stream for the PCX, CPS, Dune II SHP, BMP and RAMIX-names file types.
* Cleaned up MixFileCrypto handling of decrypted Blowfish key chunks.
* ROMFIS now identifies both XCC and RAMIX databases using streams.
2024-07-10 13:36:49 +02:00
Nyerguds
333b3bf937 Fixed overlapping flags not working in combination with Sole Survivor football areas.
* Completed all file lists.
2024-07-09 12:26:25 +02:00
Nyerguds
fa633e5285 Optimised overlay outline drawing, and reduced padding for Templates dialog. 2024-07-04 15:45:50 +02:00
Nyerguds
0ba62218a2 More work on classic font implementation, outlines, and some bug fixes
* Added classic font support for building priority labels.
* Unified the overlapped item outline drawing for units, buildings and terrain to a single function.
* Added outline drawing for Overlay, with a system to connect the outlines of connected walls.
* TeamType tooltips in the Triggers editor now show the House.
* Made BaseOccupyMask a property of ICellOccupier so it is usable from generics.
* Made Direction and Tint properties of ITechno so they are usable from generics.
* Added ShortName to waypoints for classic rendering.
* Fixed bugs in font drawing; empty symbols no longer crash, and cropping the end of the last symbol now works correctly.
* Changed waypoint indicator drawing to only use an intermediate bitmap in classic mode, so it retain higher quality in remaster mode.
* Fixed silly bug in previous commit that reduced the amount of numbered waypoints in TD to eight.
* Fixed bug in the BuildingTool o TD maps that set the plugin.ActiveHouse to the special House "None" if the "Prebuilt" checkbox was unchecked, causing crashes in the UnitTool and InfantryTool.
2024-07-03 21:54:25 +02:00
Nyerguds
4c9bd7a85c Added support for classic fonts on waypoints.
* Gave waypoints the ability to contain a shorter name
* Fixed image export not containing names for the new hash indicators.
* Cleaned up GameInfoSole by making it inherit from GameInfoTibDawn.
* TilesetManagerClassic now recalculates the image bounds if remapping might've made more colours transparent.
2024-07-02 18:39:48 +02:00
Nyerguds
1b8949fb79 Bunch of stuff related to the map hash-indicators
* Made techno occupancy into its own separate option.
* Added settings for all hashing colours
* Enabled terrain type hash-indicators on map template tool and placement previews.
* Fixed the fact the hash graphics used on the Map tool preview was a generated image in classic mode, instead of the "trans.icn" sprite.
* Added "lazy steam init" option to only initialise the link with Steam when the Publish dialog is opened.
* Updated readme to v1.5.1.0 options (I should REALLY learn to make separate branches, for that reason alone, ugh. Ah well, after this release.)
2024-06-26 22:19:28 +02:00
Nyerguds
40cde163ca Added romfis init inis to embedded resources as fallback. 2024-06-11 18:02:51 +02:00
Nyerguds
cb7e4656b2 Switched all manual bit mask compares to "Enum.HasFlag". Needs extensive testing; might still contain bugs. 2024-06-10 18:29:23 +02:00
Nyerguds
ef54e748ee Removed bizarre ID-upshifting on unit types, and instead simply made sub-classes for ground vehicles, aircraft and boats. The only place in the ini that uses all types together is the teamtypes, and even in RA, teams use unit ini names, not IDs. 2024-06-10 09:05:42 +02:00
Nyerguds
0689b84146 * Added "open mix file" menu that shows all mix files from the remastered and classic folders that contain mission files.
* Added explanation comments to all entries in GameInfo.cs
* Removed file listing function from GameInfo classes; all that is now handled by ROMFIS.
2024-05-29 20:40:42 +02:00
Nyerguds
5832e94b79 Implemented new scaling method to allow using direct reduced render size, instead of rendering at full size and then scaling down. 2024-05-22 17:43:25 +02:00
Nyerguds
0990a89908 Fixed open from mix function and save after open from mix
Started working on optimisations for thumbnails.
2024-05-21 18:51:35 +02:00
Nyerguds
9d016033d6 Added code to reset tool position if the saved location doesn't exist anymore (e.g. external monitor is disconnected) 2024-05-12 17:49:52 +02:00
Nyerguds
c30f222a17 * Added outlines for overlapped buildings.
* Optimised refresh after closing a dialog.
* Split off Most Recently Used files system to a separate registry key so its mix file entries would not interfere with the official editor.
2024-05-11 13:20:27 +02:00
Nyerguds
dca4b78e2d Rewrote indicator generation
Fixed "Open From Mix" not triggering from drag & drop or command line.
2024-05-10 00:03:03 +02:00
Nyerguds
3458c9b3c2 "Open From Mix" progress 2024-04-16 18:38:07 +02:00
Nyerguds
8056e365c6 Added warning labels on Autocreate teams without "Max Allowed" set.
Added more detailed edit instructions for enabling classic mode.
Added minor fix in base priority handling on map load.
Adapted the adjustments made for classic font loading to still give correct results in remastered mode.
Migrated the details on which classic fonts to use and how to remap them to the GameInfo class.
Added support for using classic colors without the adjustment of the shadow color to semitranparent gray.
2024-03-29 11:00:09 +01:00
Nyerguds
2bc91b8d79 Started work on classic font support, for nicer indicators on classic export images. 2024-03-28 19:22:06 +01:00
Nyerguds
52046d6dee small logging fix. 2024-02-03 23:33:53 +01:00
Nyerguds
8789da1f9a * Fix for issue preventing RA infantry from remapping if no ClassicGraphicsSource was set.
* Update of manual.
2024-02-03 23:30:51 +01:00
Nyerguds
255c75cdfa Upgrades to update system, and an option to allow placing walls as House-owned buildings. 2024-01-31 13:25:32 +01:00
Nyerguds
6a05a5b863 autoupdate stuff 2023-12-14 11:49:44 +01:00
Nyerguds
c52f39d3d1 Improved visual feedback when an object can't be placed down.
Fixed url.Undone and url.Redone listeners not getting removed from WaypointsTool on deactivate.
2023-12-07 21:57:56 +01:00
Nyerguds
a28ff5cfd6 * Fixes in the detection system to see which theater-sensitive buildings are available.
* Fixes in building overlap checking.
* Update of CONC pavement update logic.
* Aligned enums using /**/ blocks
* Added factory class for creating and initialising game plugins, to centralise a lot of the different logic.
* Migrated a ton of game-specific logic into the GameInfoClass objects for each game.
2023-12-02 01:37:52 +01:00
Nyerguds
2f99d16f3f * Upgraded logic to detect missing rules (for ant-related objects) on RA maps.
* Added config option for the behaviour to remap classic Einstein to RA95 colours.
* Made the ROAD2 exception more generic and relying on a flag.
2023-10-11 17:33:51 +02:00
Nyerguds
4bc9f96a01 Prepared for migration to using external ini data for all settings.
* Added support for fan-added theaters available in CnCNet: Snow for TD; Desert, Jungle, Barren and Cave for RA. These only work in classic mode, if their theater mix files are found in the configured classic files folder.
* Mouse zoom is now disabled during drag-scroll operations, since it invariably messed up the position calculations.
* Map templates, Smudge and Overlay are no longer restricted to specific theaters; if they exist in a theater, they are allowed.
* Theater-sensitive civilian buildings are no longer restricted to specific theaters; if they exist in a theater, they are allowed. Military buildings, incuding the theater-sensitive Misile Silo and Pillbox in RA, are always usable, no matter whether the theater has graphics for them.
* On Interior maps, the "ConvertRaObsoleteClear" logic will now generate spots of passable terrain outside the map border on any point where passable terrain touches the border, to allow potential reinforcements to enter the map there.
* Removed all hardcoded special code per vehicle and per building, in preparation for exporting all editor settings to ini.
2023-08-25 18:12:35 +02:00
Nyerguds
d260411cbd Final preparations for v1.5.0.2 2023-08-05 15:47:55 +02:00
Nyerguds
40721f660b More v1.5.0.2 fixes and upgrades.
* Added tighter checks on setting the info in a tool through its CurrentObject property.
* Added option to let the editor remember tool selection information between different opened maps of the same type.
* Optimised generating of terrain type indicator for 'river' in classic mode, by copying the alpha of another tile instead of doing an edge detect.
* Replaced 'IsFlat' flag on buildings with actual Z-sorting.
* Left-clicking on smudge no longer copies its properties into the tool, since left-click is needed to change smudge properties.
* Removed "NoMetaFilesForSinglePlay" option, and instead added "ClassicProducesNoMetaFiles".
* Added IDisposable to ITilesetManager.
* Made CellGrid[x,y] safe to use on illegal coordinates; it'll just return null.
* In old Red Alert maps which use Italy instead of Ukraine, The house settings for [Italy] will now be applied to Ukraine.
2023-08-03 18:56:02 +02:00
Nyerguds
4f06a4a967 * The mplayer.ini file tweaks are now only applied if RA's Aftermath expansion units are enabled, as it should.
* The editor will now be allowed to load in classic mode without the RA expansion files present. Any missing graphics will be substituted by dummy graphics.
* Overhauled the "New Map" dialog using listboxes, to have more consistent tab order control, and to more easily mod in additional games / theaters.
* Added "Single-Player Scenario" checkbox on the "New Map" dialog.
* Added remap logic to fix Einstein's colors, using the remap system used by the other civilians.
* The power evaluation tool now takes buildings' damaged status into account.
* Multiple overlapping multiplayer flags will now be drawn as multiple flags on one cell, scaling down later overlapping ones.
* Multiple overlapping non-flag waypoints will no longer show up brighter on the map.
2023-07-27 16:38:56 +02:00
Nyerguds
8787cad6b6 * Fixed a bug in Map mode where using the PageUp or Home key to select the Clear terrain would not scroll to the item in the list.
* Added setting to enable DPI awareness mode, for users with indicator scaling issues.
2023-07-21 13:15:41 +02:00
Nyerguds
6b40bd19ba * Added the ability to export map previews without the map templates layer.
* The tooltips showing which trigger criteria are needed for using a trigger in a certain situation will indicate which of the criteria are fulfilled by the currently selected trigger.
* The tooltips showing which trigger criteria are needed will now say "usable" events/actions rather than "required".
* The Zoom shortcuts should now work on more keys than just the numpad ones.
* Fixed issues with how objects overlapped with each other.
* Fixed a bug where Terrain objects would not show a placement preview on bibs.
* Fixed a bug where changing the Wall type did not refresh the preview.
* Fixed a bug where switching back to the Terrain tool would show the previously-selected type in the preview, but would not select it in the list.
2023-07-20 01:07:00 +02:00
Nyerguds
515d2215dc * Fixed bug where having custom ini content in managed sections (like Basic and the houses) would make the fully filled section show up in "INI Rules & Tweaks" after saving.
* Custom-added ini keys on managed sections are now added to the end of the section rather then at the start.
* Fixed crashes when selecting WallGroups in Interior theater when map passability indication is enabled.
* Fixed issues related to previewing the placement of WallGroup tiles on the map.
* Disabled DPI awareness, because apparently it only had negative side effects.
* Removed pointless generics on ini parsing functions; in none of them the type of object ever actually matters.
* Removed 'DEBUG' compile directive on showing the full stack trace if a crash occurs during map saving.
* Unified all code that places tiles on maps to all use the same function, so nothing ever still places them manually.
2023-07-12 09:08:04 +02:00