Commit Graph

459 Commits

Author SHA1 Message Date
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
d74b11aa31 Reform command-line handling to use Clara, which is bundled with Catch 2024-08-22 23:21:29 -04:00
30e583b1d4 Address compile warnings (Xcode 12) in the editors 2024-08-10 12:58:01 -04:00
84b649a107 Fix dead store warnings from static analysis of the scenario editor 2024-08-10 12:45:35 -04:00
3931d20c4a Fix some undefined behaviour detected by static analysis in the scenario editor 2024-08-10 12:45:09 -04:00
fc12092a1b replace rand() and srand(). fix #390 2024-08-08 13:43:29 -04:00
c251fee834 Fix graphics flickering/stretching on Windows (#367)
* DRY, standardized window top offset
* handle_splash_events() handle multiple events per frame
* accurate windows menubar height for multiple rows
* Windows filter a resize event triggered by the menubar
* windows expand small window to fit menubar
* splash screens draw in view rect, not window rect
2024-06-27 08:40:34 -04:00
e74f1e1ca0 standardize cross-platform command line args for the editors 2024-06-12 22:38:50 -06:00
4fa4f0b92b remove args and windows logic from all set_up_apple_events 2024-06-12 22:38:31 -06:00
1bb0927ecb Update and fix Windows CI builds
- boost-spirit dependency needed to be installed
- Visual Studio wanted boost/filesystem.hpp included in more places
- a deprecated enum was removed from new versions of boost, so we use
  its replacement enum now
- vcpkg repository is now pinned to a commit where boost 1.84 libraries
  work smoothly, there should be no more surprises
- vcpkg dependencies now cache, so successive CI runs are dramatically
  faster
- for win-scons, we need to use 'call' in our batch script to source
  vcvarsall.bat
- I updated the includepath and libpath we pass to win-scons to match
  reality, but it still can't find any vcpkg libraries. This will need
  further sleuthing
2024-05-29 19:39:03 -04:00
1bc7524ec2 Fix underground starter scenario town terrain 2023-02-02 23:30:48 -05:00
cf28d61035 Scenario editor initialize new town bounds/entrances 2023-02-02 23:30:40 -05:00
491a81fdda Fix Stealth and Firewalk icons being swapped 2023-01-29 19:39:13 -05:00
d5ea213edd Update swap functions to recommended ADL-friendly format 2023-01-25 23:09:13 -05:00
b03c34396d Split quest flags into two separate boolean values 2023-01-22 18:56:50 -05:00
c8df04ab04 More taking advantage of the common superclass of cTown and cOutdoors 2023-01-22 14:07:26 -05:00
2539c28fe2 Prefer to call is_on_map() for terrain bounds checking whenever possible
Fix some cCurTown field functions not having bound checking
Scenario editor now takes better advantage of cTown and cOutdoors sharing a superclass
2023-01-22 14:07:26 -05:00
5bce71d59f Make implicit switch fallthrough an error in the Xcode project and fix all places that do it
Since we can't directly use C++11 attributes, I've chosen BOOST_FALLTHROUGH to annotate intentional fallthroughs.

Thanks to @fosnola for spotting a missing break, which triggered this.
2023-01-21 22:39:33 -05:00
80b6a6decf Undo e47b7e6a22
I forgot that each program already has a separate settings file. Duh!
2023-01-21 20:35:56 -05:00
584ba11a5f Apply the more advanced scaling options also to the editors 2023-01-21 20:33:28 -05:00
d88ec6a08d Fix cases of assigning get_float_pref() to a float variable
It's called "get_float_pref" because it returns a floating-point.
However, that floating-point is in double precision.
2023-01-21 20:18:16 -05:00
e47b7e6a22 Allow setting UI scale and sounds differently in each program 2023-01-21 19:10:28 -05:00
ALONSO Laurent
26d2328fe7 pc/scenario editor: add a basic preferences's menu. 2023-01-21 19:10:28 -05:00
6b56f4af86 Add bounds-checking to coord_to_ter in the scenario editor 2023-01-18 10:00:08 -05:00
492e4b0cf9 Add 10 scenario timers to editor in a stack 2023-01-14 01:26:49 -05:00
e0418c685a Track modifier state in the main loops
Really fixes #291
2023-01-13 19:55:24 -05:00
7055d5eba4 Don't crash when canceling scenario import pick (#308) 2023-01-13 19:23:28 -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
e3d6a4748e Dialog XML definitions are now loaded thru the resource manager 2023-01-07 11:59:42 -05:00
0714004f1c Fix a few compiler warnings 2023-01-06 22:02:05 -05:00
Morel Berenger
8809af121f Minor fixes to special node edit dialog. 2023-01-06 20:49:08 -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
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
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
x-qq
55a105a0f6 make the game buildable on linux (#283)
- Scons -> python3
- include issues
2022-03-13 15:38:22 -04:00
f14c99f14b Split out cContainer, cLed, and cLedGroup into their own files 2020-12-21 17:16:15 -05:00
3ba6266cd4 Fix editors launching in the top left corner of the screen 2020-02-23 23:29:44 -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
43b4379772 Fix Edit Custom Sheets option not working in an unpacked scenario 2020-02-10 08:35:59 -05:00
760a172526 Some style tweaks 2020-02-09 18:24:09 -05:00
deac7b0cb6 Merge pull request #251 from x-qq/fix_scrollbar_segfaults
fix for scrollbar segfaults

* fixes #206
* fixes broken mousewheel scrolling of the scenedit palette
* removed boost threads dependency
* added foundation for further refactoring of the drawing and event handling code: interfaces and drawable manager with layering
* removed a bunch of unneeded redraw calls
* removed some repeated recalculation of effectively constant values (boe.actions)
* removed recalculation of effectively constant scrollbar and button positions (boe.graphics)

Closes #251
2020-02-09 15:55:51 -05:00
335fb87e51 Store custom graphics classifications as symbols instead of integers 2020-02-09 12:10:52 -05:00
7e73a21f5c Add "Add Item" and F1 menu key accelerator on Linux
Patch from @x-qq

Closes #195
2020-02-02 22:38:42 -05:00
c4c201db6e Implement the most important menu key accelerators for Linux
Patch from @x-qq
2020-02-02 21:40:58 -05:00
91da0ed4d0 Update references to the online documentation 2020-02-01 22:28:25 -05:00
f9f4d5671c Factor out the framerate limiter into a class
Patch from @x-qq
2020-02-01 21:03:56 -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