Commit Graph

850 Commits

Author SHA1 Message Date
5cd2ced8c2 Add cParty::is_in_scenario() 2023-01-20 09:07:24 -05:00
ALONSO Laurent
b896abf29b try to avoid loosing boat/horse outdoor... nature... 2023-01-19 21:33:35 -05:00
2d1bbe0058 Move get_item_interesting_string() into the cItem class 2023-01-19 09:32:07 -05:00
7dcaa7d332 Clean up damage_pc 2023-01-19 09:25:16 -05:00
c7012f5db3 Clean up update_explored - no need for so many variables 2023-01-18 21:44:50 -05:00
643d4fc6e3 Yes that check is needed
Thanks to @fosnola and whoever added that code in the Windows version
2023-01-18 21:37:07 -05:00
9536b79096 Reverse order of conditions to avoid integer overflow giving a fals positive
Thanks to @fosnola for spotting this.
2023-01-18 20:56:26 -05:00
63581d7b78 Hide shop scrollbar when not needed
This also fixes undefined or buggy behaviour in such a case.

Thanks to @fosnola for spotting this.
2023-01-18 20:47:16 -05:00
c7f4cee684 Also reset the time to 0, to indicate the timer is inactive 2023-01-18 20:32:53 -05:00
ALONSO Laurent
4eb9be21c6 try to avoid calling timers two times in a row... 2023-01-18 20:29:24 -05:00
dbdb7b8caf Show an error if a town or outdoor node is called in the wrong context 2023-01-18 20:29:17 -05:00
b422cdf429 Add some terrain bounds checking and some named constants 2023-01-18 20:08:56 -05:00
298e61e2f8 Fix buffer overreach in duplicate string detection
Thanks to @fosnola for the fix.
2023-01-18 14:20:36 -05:00
d0d7765d2d Fix monsters above 255 being unsummonable
Thanks to @fosnola for the fix.
2023-01-18 09:59:07 -05:00
3c246c7df5 Add some braces 2023-01-18 09:59:04 -05:00
924692c1dd Fix possible buffer overreach when selecting a shop item
Thanks to @fosnola for the fix.
2023-01-18 09:58:37 -05:00
e0418c685a Track modifier state in the main loops
Really fixes #291
2023-01-13 19:55:24 -05:00
2d6a5cae5e Use events instead of isKeyPressed for the interrupt key
Also related to #291
2023-01-12 21:52:02 -05:00
3bdcf02be0 Handle modifier keys differently to avoid Apple flagging us as wishing to monitor input from other applications
Fixes #291
2023-01-12 21:43:45 -05:00
8872f1aa25 Stop storing players as bare pointers - use unique_ptr instead
Should fix some potential memory leaks that were caught by static analysis
2023-01-12 21:26:08 -05:00
e3d6a4748e Dialog XML definitions are now loaded thru the resource manager 2023-01-07 11:59:42 -05:00
ALONSO Laurent
6b32aa157e boe.specials.cpp[change terrain]: avoid redrawing the minimap n*k times... 2023-01-06 20:49:08 -05:00
ALONSO Laurent
d90f1e95dc special: correct a small mistake which can create a infinite loop... 2023-01-06 20:08:00 -05:00
ALONSO Laurent
6c2bec98b7 draw_monster: draw correctly complex monster... 2023-01-06 20:07:59 -05:00
ALONSO Laurent
0d0b577c9c roster: try to display the right monster... 2023-01-06 20:04:02 -05:00
ALONSO Laurent
0bb24cd234 special: try to make IF_ON_{BOAT|HORSE} work...
(ie. previously ex1b=-1 means party in any boats or not in boat )
2023-01-06 20:04:02 -05:00
ALONSO Laurent
c01ec90ecb conveyor: only push people/object on a conveyor + use the real flag: flag1 2023-01-06 20:04:02 -05:00
ALONSO Laurent
f391c3b625 Do no talk to death people, this may break some scenario... 2023-01-06 20:04:01 -05:00
ALONSO Laurent
e2a4fcc788 OsX[AppleEvents]: try to avoid some crash by delaying the function which is called
by such events...

Fixes #292
2023-01-06 13:57:01 -05:00
ALONSO Laurent
f6b13607c3 boe.dlgutil.cpp[talk]: replace store_personality by store_personality%10 to avoid potential problem 2023-01-06 13:53:27 -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
f70f63eead Update and clean up the Visual Studio 2017 project files
These were very shoddily put together!
It seems the person who made them never really tried building
the editors or the tests.

Also included here are a couple of minor source changes that are needed
to make the project files build.
2023-01-05 19:29:16 -05:00
e2de459bd3 make include paths absolute within src 2023-01-05 09:28:57 -05:00
3ef790dabc Fix #254 - ONCE_GIVE_ITEM 2023-01-05 09:19:19 -05:00
2e61c44307 Fix scenario button saying there are no scenario installed even though there are the built-in ones 2023-01-04 20:52:11 -05:00
fea9cfb0c8 call redraw_everything() when cDialogs move 2023-01-04 15:27:33 -07:00
d860422c6d Update to TGUI 0.9.x 2022-12-29 10:18:06 -05:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
864aa95fea Fix various compiler warnings 2022-07-05 09:29:15 -04:00
8d31c27d11 Fix unused element and unhandled switch case warnings 2022-07-05 09:19:32 -04:00
f14c99f14b Split out cContainer, cLed, and cLedGroup into their own files 2020-12-21 17:16:15 -05:00
99ac7531a8 Links in the welcome dialog are now clickable 2020-12-19 17:51:56 -05:00
259e4ac125 Adjust the hilited string rendering to be less reliant on mysterious magic numbers
It still adds a mysterious offset to all text, but the returned rectns are now perfectly aligned to redraw the hilited string.
2020-12-19 17:32:46 -05:00
093be0d99a Merge the two scenario selection dialogs
Now both preset and custom scenarios are joined using the "Start Scenario" button.
Preset scenarios still get special treatment.
2020-02-25 21:08:29 -05:00
19250e9b94 Remove an obsolete variable 2020-02-23 23:25:23 -05:00
7b93726383 Replace 4-character constants with enums
This covers only the places where they were used to indicate
a preset selection in constructors.

The usage in qdpict where they're actually passed to the Resource Manager,
as well as the 4-character constants representing file types and creator
codes, are still present.
2020-02-21 00:16:58 -05:00
3d7f8f1d2a style fixup 2020-02-20 23:41:55 -05: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
3c748ca071 Fix node step-thru mode remaining active if debug mode disabled 2020-02-19 23:35:50 -05:00