Commit Graph

1180 Commits

Author SHA1 Message Date
f0f3994b98 Full support for custom PC graphics as well as monster graphics on PCs 2015-06-23 14:12:51 -04:00
ef36e901de Fix crash when editing scenario event timers 2015-06-23 10:53:55 -04:00
06cb9ea250 Fix town timers with a one-turn delay being triggered twice in a row 2015-06-23 10:52:57 -04:00
28014de5d4 Add legacy compatibility flag for Affect PC nodes in combat mode 2015-06-21 22:55:00 -04:00
c5c3e0c681 Fix showing the outdoors if you die in town combat 2015-06-21 22:54:40 -04:00
525371fb81 Streamline XCode build by using static libraries for common sources
- Also clear out several obsolete build settings
- Disable optimization in debug build
2015-06-21 22:16:57 -04:00
41fb8bd056 XCode build is now completely warning free 2015-06-21 18:22:20 -04:00
b7faf52f5e Remove pointless s_pow and s_sqrt functions and use hypot instead of sqrt for distance calculations 2015-06-21 18:04:31 -04:00
b85d177164 Fix dialog pics being underconverted from legacy scenarios 2015-06-20 21:32:19 -04:00
2ddf38138a Fix town entry sounds playing at scenario start and when using a stairway 2015-06-20 21:18:20 -04:00
f8193a32e7 Add missing Boost.Thread dependency to XCode project,
plus workaround for my old libc++.
2015-06-20 21:17:59 -04:00
d3e6af6cc9 Bugfixes
- Fix uninitialized data in scenario details (especially rating)
- Fix case-sensitive comparison for scenario file extensions
2015-06-20 13:07:12 -04:00
d0bfd64550 Sort scenarios in custom scenario list by name 2015-06-20 13:06:42 -04:00
50570998a1 Merge branch 'master' from mac 2015-06-20 13:03:58 -04:00
8d793a16c4 Use boost::thread instead of std::thread 2015-06-20 12:54:27 -04:00
3239d8e503 Bugfixes
- Fix attempt at accessing invalid placed town locations
- Fix attempt at accessing invalid terrain in editor when checking whether to apply transformations
2015-06-20 12:43:16 -04:00
c2970295d6 Implement missing platform-specific functions for Windows 2015-06-20 12:42:11 -04:00
54224b10a3 Fix dialog pics being overconverted from legacy scenarios 2015-06-19 19:00:20 -04:00
24c124c79f Add bundling stage to makefile 2015-06-17 16:54:15 -04:00
9d74f78df3 Implement all the missing parts of the Edit Sheets and Edit Sounds dialogs
- On load, the game now detects graphic sheets and sounds whose IDs are "discontinuous", as well as graphics intended to directly replace preset graphic sheets.
- Edit sheets dialog can now handle "discontinuous" graphics. (The edit sounds dialog already could.)
- Edit sheets dialog prompts user to create a new sheet if there are none already, and also if there are some but not ID 0 (in the latter case they can cancel and still edit the sheets).
- Edit sheets dialog prompts user to convert sheets if the scenario is legacy, rather than doing it silently
- Edit sheets dialog now has "new" and "delete" buttons
- Edit sounds dialog now has functioning "delete" button
2015-06-17 04:29:10 -04:00
580f70f49a Add a dialog in scenario editor to import/export custom sounds in WAV format 2015-06-17 01:03:17 -04:00
4d9ec53b8b Separate Blades of Exile Base from the scenarios target, as it's not needed for anything other than the scenario editor 2015-06-15 19:54:16 -04:00
76af8ecc19 Add platform flag to makefile and code for compiling xibs 2015-06-15 19:28:33 -04:00
d6c873d91d Add makefile outputs to gitignore 2015-06-15 16:22:28 -04:00
e055b97c9f Add dialog allowing you to alter the scenario's graphics sheets from within the scenario editor
- You can copy/paste images into the sheet, or import/export to/from png files

Also:
- Picture controls in the dialog engine have a new "scaled" flag; if set, the picture will be scaled into the provided bounds rather than overflowing. Currently, only full sheets honour the setting.
2015-06-15 16:20:03 -04:00
9d59b80a5c Bundle all of SFML's dependencies in the application package,
and make sure they're actually found there.
Also, disable state restoration in the schemes.
2015-06-15 12:57:23 -04:00
36b5b7dcdb Merge branch 'makefile'
In addition to what the commit messages state, this merge updates the code to use latest SFML (2.3).
2015-06-15 00:21:56 -04:00
6b28dbad7c Fix loading wrong nibs for menus 2015-06-15 00:21:34 -04:00
14f85cfc72 Makefile targets for editors and for resources (still needs refinement) 2015-06-15 00:20:54 -04:00
f0e6e7ef24 Get the makefile basically working in producing an executable of the game
- tinyprint.hpp was renamed to tinyprint.h to conform to the pattern of the makefile rules
2015-06-14 23:32:51 -04:00
Ben Scott
a532ad3422 Beginnings of a build script for use with GNU make
Original commit messages:

Makefiles wow such wow
compiling wow
includes, libraries, frameworks
2015-06-14 23:32:14 -04:00
b16c2a40cd Fix splash screen glitches when launching by double-clicking (or drag-dropping) a file 2015-06-13 23:14:18 -04:00
0798f98523 Symbolic I/O for more enums
- Nearly every enum that gets written to a file now uses a symbolic form rather than a numeric form. Input supports both forms.
- The special node type enum, however, no longer has a symbolic form output operator, as the only place it's output is in the special nodes file which uses the opcode.
- Collected some enums scattered around the files into one place in simpletypes.hpp
2015-06-13 15:43:29 -04:00
a990921e90 Several tweaks/fixes
- Nuke some uses of strcpy, sprintf, etc; current info strings in the scenario editor are now stored as std::string instead of C-strings.
- A smarter method of calculating the "erase" terrain for a given terrain type. In case of impassable spaces, trims, and walkways, instead of using the ground terrain, the trim terrain (if any) is used as the erase terrain; if there's no trim, ground 0 (cave, by default) is used. The method of determining if two terrains are essentially the same (ie, whether to paint or erase) has also been improved a little.
- Also, to reduce confusion, the erase terrain is now shown beneath the paint terrain.

Terrain changes:
- Add "archetype" flag as a better way of determining which amongst a set of terrains sharing the same ground type should be considered as the most basic terrain of that ground type. It's automatically applied to any terrains using original graphics when importing an old scenario; generally, any with no terrain special will be marked as an archetype, but if the lava graphic was used, it's instead any with a terrain special. It's a crude method that may easily break, but probably not possible to do better.
- When importing old scenarios, set the two walkways to be separate ground types while the crops should have grass as their ground, and the conveyors have cave.
- Fix fly, boat, block horse LEDs not being cleared if a terrain lacks that flag when using the arrow buttons. This could lead to terrains accidentally picking up the flags of nearby terrains in the list.
- Fix the block horse flag was not correctly saved when closing the dialog.
- Fix the block horse flag not being correctly loaded from the scenario file
2015-06-11 22:32:28 -04:00
21291e168c Some tweaks/fixes
- Show monster name in description of summoning item abilities (in-game and in the scenario editor)
- Don't call drop special nodes when storing an item in a container
- Don't use exceptions to determine whether a slot in the get window has an item in it
- Fix placed items defaulting to 0 charges instead of -1 (fortunately, this didn't actually cause a bug)
- Fix ability description in item dialog not updating after you edit the abilities
- Fix off-by-one issues in several cases of the pick monster dialog
- Show charges field in placed item dialog if the item is given the Shoot Flames enchantment
- Fix enchantment field not being filled with the current value when opening the edit placed item dialog
- Fix placed item dialog not updating after you set a new enchantment by editing the field (rather than using the Choose button)
- (Dialog engine) Fix initial focus handler call passing wrong control ID
2015-06-11 12:22:04 -04:00
c871980b8f Implement double-clicking to select words in dialog text fields 2015-06-11 10:52:40 -04:00
2f7291d479 Make installer not put up the Repair/Uninstall dialog when installing MSVCRT 2015-06-10 23:30:52 -04:00
6ef885c3ef Expand three special node types
Can't Enter node renamed to Prevent Action, as it's a more accurate description of what it does. It has been expanded to cover the following cases, all of which are documented:
- When the special node was called during an attack action (which involves a weapon whose ability is to call a special node when attacking, or an item or monster ability that calls a special node when hit), then Prevent Action reverses the action point cost.
- When called as the result of a purchase (a shop item that calls a special), then Prevent Action prevents gold from being deducted (which is also new in this commit, as before it never deducted gold)
- When called as the result of using a normal item (not a special item), then Prevent Action prevents a charge from being deducted
- When called as the result of a monster using its ability, then Prevent Action prevents the action points from being deducted
- Cases it already covered (cancelling initiation of talk mode, searching of containers, outdoor wandering encounters) have been documented
- The fact that it will break things during talk mode is also documented now

Start Spell Targeting node has been tweaked and gained some new options:
- You can allow the player to target opaque or antimagic spaces. In town mode, you can prohibit them from targeting antimagic spaces.
- You can specify a special node to be called if targeting fails because they selected an invalid space, or because an special node keyed to spellcasting context cancelled it
- You no longer get a "Hit 'p' to cancel" message. Even better, hitting 'p' does not cancel it. (Well, more precisely, it triggers the failure node, with the party's or pc's location as the target space.)

Misc:
- Fix crash outdoors due to trying to check for force barriers
2015-06-10 22:51:53 -04:00
a5a784c4f1 Several tweaks/fixes
- Enlightenment status now wears off over time
- Improve ghost mode - now you can pass through force barriers and forcecages too (but not escape forcecages); also locked doors or specials that block your progress... pretty much nothing can block your way now in ghost mode.
--> Part of this change was made in the previous commit as well.
- New debug command - Give Item. Since this is meant for debug use only, you have to enter the item's ID; players should instead use the character editor.
- Fixed custom spells (with Start Targeting node) not correctly honouring the range in combat mode (instead they had a range of 0)
- Fixed custom spells (with Start Targeting node) always calling a local node to determine the effect of the spell. Now they call the same type of node that initiated the targeting (so, if it was initiated in a scenario node, they call a scenario node, etc).
- Fix some unintentional switch fallthroughs
   - Flash Step erroneously printed a "not implemented" error message
- Fix get num response dialog incorrectly formatting the prompt
- Fix some crashes while talking due to the game still assuming there were 60 nodes
- Fix SDFs with y >= 10 not being zero-initialized when you enter a new scenario
- Allow special nodes to aware more than 200 XP in one batch (though in most cases, you probably don't want to)
- Fix Display Small Message node trying to use the wrong string, due to applying the legacy string modifiers. This also affected Debug Print Nums, which just copy-pasted the same code.
- The Dumbfound/Enlightened and Sleep/Hyperactivity status effects no longer "wrap" into each other. Thus, if you're dumbfounded, a "Cure Dumbfounding" item never enlightens you, but if you're not dumbfounded, it will.
- Fix an issue with invalid strings when porting outdoor shops
- Fix Reset Help option in the preferences causing a crash
2015-06-10 14:54:49 -04:00
f6be40618b Overhaul and improve force cages
- Add instant help message
- Prevent from ending town combat if one member is in a forcecage or if everyone's in a different forcecage (you can still end it if everyone's in the same cage)
- If entering town combat while caged, everyone remains in the cage
- Penalties to melee combat if the target or attacker is in a forcecage (higher penalties if the attacker is caged, unless they're using a pole weapon)
- Instead of placing a forcecage at every location where someone gains forcecage status, the game now syncs forcecages (placing them on locations where someone has forcecage status) at the end of the move.
- The Flash Step and Word of Recall spells and any specials that move the party also clear their forcecage status, so that a new forcecage won't appear on their new location. If they're moved into a forcecage, the syncing process will give them the status at the end of the move.
- Forcecage status now supported for the Occasional Status item ability
- Forcecages now eventually expire on their own even if you can't break out. Unoccupied ones also have a slight (0.1%) chance each turn to expire.
- Affect Status node now allows forcecage status. (It also works as documented, using Extra 1c rather than 2a as the status type.)
- Preset monsters placed in preset force cages gain the status at town initialization; it's a lot more than they'd gain through the syncing process, so unless they break free, it'll last a very long time.
- Monsters/PCs with spells (and PCs with Mage Lore) now have an increased chance of resisting entrapment in a forcecage
- If the full party is subject to a forcecage, the PC with the best chance of breaking free (assuming they don't resist) is chosen to determine whether they resist. Note that this may not be the PC with the best chance of resisting in the first place.
- Protection from Forcecage now implemented as an item ability
Other stuff (though related):
- Reset party's combat pos to the null location (-1,-1) after a cutscene ends; to not do so would mess up get_loc() calls
2015-06-10 11:45:14 -04:00
dd5faacd4f Mac: Make preset sounds and graphics show as file packages
- Remove legacy sound/graphic file definitions
- Fix a couple of compiler warnings
2015-06-09 11:31:59 -04:00
233a50a1e2 More fixes/tweaks to the installer
- Add Windows icon for scenario files (using the old Mac icon)
- Fix OpenAL not being deleted, causing the program directory to remain
- Fix association for old scenarios (.exs) not being removed
Also:
- Fix build broken in previous commit (due to header renames)
2015-06-09 10:26:08 -04:00
b22f2e2e47 Rename the Windows resource header files 2015-06-09 09:04:08 -04:00
1a3543ebf6 Move resources out of the src directory 2015-06-09 08:37:53 -04:00
cc22966ff8 Fix the Windows file associations 2015-06-09 07:57:10 -04:00
f149a85575 Fix newlines (again; missed some) 2015-06-08 23:55:17 -04:00
d6218e9db9 Merge branch 'master' from Windows 2015-06-08 23:45:41 -04:00
7f871d78e3 Add file associations to the Windows installer,
and fix up the uninstaller script (mostly)
2015-06-08 23:45:23 -04:00
1eac640d89 Fix loading of new-format scenarios on Windows 2015-06-08 22:14:56 -04:00
459c68a668 Support for opening saves/scenarios in Windows by dropping them on the app icon 2015-06-08 22:14:55 -04:00