Commit Graph

62 Commits

Author SHA1 Message Date
b349f76665 town entry autosave wait for specials to run. fix #781 2025-08-18 17:27:34 -05:00
11f1a2f90d ignore uninitialized Rectangle 1-8 2025-08-18 17:27:33 -05:00
fb7a3b80cf Draw roads with brown dots. Fix #782 2025-08-18 17:27:33 -05:00
8b3400624d Fix a case of minimap area rect spoilers 2025-08-18 17:27:31 -05:00
a82ab06523 feature flag keep doors easier in old scenarios 2025-08-18 17:27:21 -05:00
28dbf97eee don't tooltip or annotate hidden towns/junk sign locs 2025-08-09 11:09:41 -05:00
32b9ce643b fix outdoor positioning of circle markers 2025-08-08 20:40:41 -05:00
8341bd46f9 better way of only showing known extent of area rectangle 2025-08-07 09:39:05 -05:00
ba8b893c20 TRANSPARENT->EMPTY makes it compile on Windows 2025-08-07 09:39:05 -05:00
a5cc323f00 draw and give tooltips for more map features 2025-08-07 09:39:04 -05:00
b64f5fc814 messy map tooltip demo 2025-08-07 09:39:04 -05:00
4fb08daae5 Refactor minimap rendering and fix tiny town crash 2025-08-07 09:39:04 -05:00
65b503980d remove redundant boat/horse initialization 2025-08-07 09:39:03 -05:00
0f9538c8c8 make boats and horses exist in legacy scenarios 2025-08-07 09:39:03 -05:00
dee6d988a6 Fix out-of-range access check for legacy town entrance
Fix #745
2025-05-24 15:16:24 -05:00
e3b0934d15 make pushing crates/barrels/blocks DRY 2025-05-19 21:41:18 -05:00
4b04a2d311 fix ExitTown autosave could be used to cheat 2025-05-19 21:41:06 -05:00
ea8296157f Don't black out the map when redraw requested during talk mode 2025-05-11 10:50:10 -05:00
2aaad3b4a8 Save unlocked doors. (Fix #207) 2025-05-11 10:49:54 -05:00
07c15dc1e7 Fix window focus bugs for Windows 2025-05-11 10:49:31 -05:00
1702f795cf Lockpicking limit choices to pick-holding PCs 2025-03-30 11:51:07 -05:00
ae375f606c Check if terrain is unlockable before other lockpick/bash checks 2025-03-19 19:31:22 -05:00
cf33980fec don't call town entrance special node when debug warping 2025-03-19 19:31:18 -05:00
a1bc923de8 Remove the Edit Saved Item Rectangles menu item in favour of a toolbar button.
The limit of 3 saved item rectangles has been removed - you can now add as many as you want.
However, the 1 per town limit is now strictly enforced.

The saved item rectangle is now shown with a cyan border when editing town.
2025-03-08 20:05:12 -05:00
5bc1643be7 Do autosaves 2025-03-07 08:43:15 -05:00
Nathan R
598fd4836a Fixed up: Move file-static RenderWindow and RenderTexture instances inside functions to fix GL race condition on startup (#682) 2025-03-06 19:40:40 -05:00
9b05c23d15 Rework parentage and naming of dialog controls.
All controls now store a reference to their direct parent,
whether it be the dialog itself or a container control.

Every dialog control now has a guaranteed parent, which abstracts away
the three possible types of parents (dialog, container, and plain window).

The control name is now stored in the control from the moment it is parsed from the XML.
This means that it's set before the parseContent function, though after parseAttribute.
2025-03-02 19:13:01 -05:00
9dfc9e7287 DRY a frequently used buffer string 2025-03-02 01:13:30 -05:00
c6f06ea862 DRY food/gold maximums. fix #79 2025-02-16 21:41:47 -05:00
6fc55ed311 Fix multiple inconsistencies when saving (#550)
* debug_leave_town use same logic as normal town exit. fix #549
* Standardize all save party code paths

Fix #480
Fix #204
Fix #267

* remove file_in_mem now that it is redundant
* Print message when save file not chosen
2025-01-26 12:56:57 -05:00
3068e97868 make damage type -> sound type DRY
And while I'm at it, resolve a TODO note and remove a bunch of unnecessary 0s
2024-11-30 19:22:00 -05:00
3b12d37555 make 'a' toggle the map 2024-11-30 18:37:14 -05:00
e39c930eed call draw_map() after clear_map() (#488)
Fixes #487 and fixes #428
May address #267
2024-11-23 14:12:04 -05:00
6965b822dc Gather all enchantment info into a single place
This also resolves several TODO notes about duplicate code and makes cPresetItem::ability an eEnchant
2024-09-10 22:18:59 -04:00
b653e0d525 make map behavior all the same 2024-08-24 20:04:29 -04:00
23be231949 record and replay other ways to display map 2024-08-24 20:04:29 -04:00
23e0db9922 Add enum for creature status 2024-08-21 23:47:44 -04:00
f400a5b7de Address a bunch of dead store issues found by the static analyzer.
Pretty much all of these fall into one of two categories:

* Variables that are obviously unneeded and in many cases completely unused – probably remnants of old code that was rewritten. These ones were deleted.

* Variables that look like they should be used but aren't. These ones have been suppressed, with a TODO message added as a reminder to investigate them in more detail later.
2024-08-10 12:22:05 -04:00
992cbdb22c Delete cCurTown::difficulty
It seemed like it was intended as a mirror of cTown::difficulty, yet there didn't seem to
be anything that ever wrote to it.
So I just made everything use cTown::difficulty directly instead.
2023-01-21 18:10:58 -05:00
a430abbd50 Fix fields array not matching the size of the town
The fields array was fixed at 64x64, which is fine for all towns
supported in legacy BoE.

However, we intend to support even larger towns in the future,
and also it seems silly to hold so much extra space for a smaller town.

So now, the fields array is a 2D vector that matches the size of the terrain vector.
The setup array is similarly a list of 2D vectors.

This radically changes the format used to store the setup array in a saved game.
Older saves won't crash the game, but fields will be messed up or missing.
Resetting towns is recommended.
2023-01-21 00:47:35 -05:00
ALONSO Laurent
f2584f4133 try to remove some "flickering" by using setActive(false)/setActive() and adding
a glFlush...
2023-01-06 13:46:21 -05:00
cb73719af3 Make item abil_data a bit more readable
A two-element array is an ugly thing to behold
2023-01-06 02:13:46 -05:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
12bde373b1 Refactor dialog parsing to reduce code duplication
- Refactor dialog format parameter management to use a single protected control function
- Format parameters "frame" and "frame style" merged
- Colour is now a first-class format parameter (though it still has a separate setter)
2020-02-20 23:41:40 -05:00
72bd8265fa Game modes cleanup
- Fix some cases where modes were still referenced by number
- Replace most cases of mode range-comparison with is_out(), is_town(), and/or is_combat()

There could be some minor errors in the replacements.
2020-02-04 00:02:08 -05:00
86d2574aed Some refactor of special node system
- Context type (town/out/scen) is now an enum
- Don't expose internals in the header
- Use a state struct to pass things around through the system
- Fix special AFFECT_DEADNESS case for default party selection
- Maybe other bits and pieces?
2020-02-02 19:12:45 -05:00
3df4a2223e Fix broken keyboard shortcuts 2020-02-02 12:11:41 -05:00
3e686cb908 Tweak text colours to be less blindingly bright and closer to the original Mac BoE 2020-02-01 19:55:30 -05:00
4859fa70bc Factor out the game toolbars into a class.
This includes the following related or incidental changes:
* Remove the win_from_rects global variable. With one minor exception, they were all equal to the relevant render texture's size anyway.
* Split out time advancement from the handle_action function into a separate function
* Split out each individual button action into its own function
* Thanks to the above two, button actions triggered from the keyboard (and menu spells) no longer pass thru handle_action
* Side-effect: keyboard shortcuts and menu spells no longer trigger the button press animation
* Button presses now behave like proper buttons
* Button clicks are now grouped by effect in the handling code, rather than by index
* Removed a variable that mysteriously caused dialogue to become blank
2020-01-30 00:00:40 -05:00
14e2597108 Expose the shared pointer instead of the raw pointer in the resource manager and rewrite the custom sheets list to use a vector instead of manual memory management
In particular, this should fix a segmentation fault in the sound system caused by the resource manager pulling a resource that's in use.
2020-01-26 15:10:57 -05:00