Commit Graph

226 Commits

Author SHA1 Message Date
722f670e3d Fix crates and barrels "stealing" the items from other containers when they are pushed over them
Fix stone blocks disappearing when pushed
2015-06-06 23:23:45 -04:00
fdbb61411b Nuke several annoying and no longer necessary debug output statements 2015-06-05 18:44:57 -04:00
d398bfaa80 Implement undo/redo history for dialog text fields
- Also fixed a minor issue with pasting (the character before the insertion point was removed before pasting)
2015-06-05 15:07:28 -04:00
80f95ba9ae Several bugfixes
- Fix light mask not rendering correctly
- Fix terrain-sourced lighting not being calculated on scenario load
- Fix light-removing items incorrectly applying their ability strength
- Fix smash patterns not affecting opaque tiles (such as mouldy walls)
- Fix monsters outside the light range not being rendered when fog is lifted
- Fix town timers not being cancelled when you leave town
- Fix non-existent outdoor wandering encounters sometimes triggering due to uninitialized data
- Hard-wrap some doc lines
2015-06-04 21:50:08 -04:00
6c5e2b5118 Several tweaks and fixes
Bugs:
- Arrow keys activated the arrow buttons in the list-mode edit string dialog
- Graphics classification was not saved correctly in some cases
- Contact info was not correctly saved/loaded
- Place Monster node didn't have a choose button for the monster type
- Alt-Backspace and Alt-Delete did not work correctly in dialog text fields
- When clicking Edit Terrain Types, sometimes the list of items or monsters would appear instead
- Fix monster 0 being selectable in the choose monster dialog
- Fix the hotspots of all the cursors to be more intuitive

New:
- When interrupting a special node sequence with Cmd-. / Ctrl-C, the dialog that appears is more relevant.
- In the choose sound dialog, the sound now plays when you select a choice, so you can hear what it will sound like
- Added a tiny icon so you can distinguish fire and force barriers in the editor
2015-06-04 15:50:05 -04:00
49ec6278d3 Fix a few scenario load/save issues
- More uninitialized data issues
- Some values incorrectly loaded (monster radiate chance, terrain horse blockage, town lighting type)
- Some values incorrectly saved (item magic-use flag)
2015-06-04 01:14:57 -04:00
1b754619dc Several more tweaks/fixes
- Missing special node opcodes
- Pass the party's (or in combat, the active character's) current location to special nodes triggered by timers
- Fix the set pointer node
- Fix terrain palette not correctly registering clicks while scrolled down
- Fix sheets not correctly being copied from the temporary files folder
- Fix monster abilities not being loaded from new scenarios
- Fix custom sheets not being reloaded if they have changed
- Documentation tweaks
2015-06-02 22:01:22 -04:00
7dddcdb86e Several little tweaks and fixes
- Fix some uninitialized fields getting populated with random data
- Fix identity of last edited town and outdoor section not being saved
- Fix editor sometimes saving to application directory instead of overwriting the loaded scenario
- Fix town specials being saved to outdoors list and vice versa
- Fix right-most column of map not being loaded properly
- Fix town entry node for start town being called after the first turn of the scenario
- Add option to call a special node at startup (right after the intro dialog)
2015-06-01 22:43:41 -04:00
72add651a5 Fix some bugs in loading and saving new-format scenarios 2015-06-01 17:23:15 -04:00
27829f1e10 Merge branch 'master' from Windows 2015-02-20 19:41:40 -05:00
8adc28fc6f Fix indentation 2015-02-20 19:36:27 -05:00
7c1aa91ad6 Finally fix the shaders issue on Windows, as well as a crash that only occurred in Release builds 2015-02-20 19:35:21 -05:00
a1ec70c9ff Merge branch 'master' from Windows 2015-02-20 12:21:04 -05:00
3fc1b8cd7e Fix most of the warnings in the Visual Studio build
- Fix energy-draining weapons
- Specials called when a spell is targeted on a space now work a little differently if the spell is multi-target. For each target, the special is triggered if it exists; otherwise the normal spell behaviour occurs.
2015-02-20 12:18:38 -05:00
9ddeb526bf Some fixes to the routine that parses quoted strings
- Now (probably) properly deals with escaped characters (either backslash or the quote delimiter)
2015-02-16 17:23:33 -05:00
d977a0f457 Make menu accelerator keys work on Windows 2015-02-14 15:21:26 -05:00
7ba874f1d2 Correctly handle saving a scenario that was loaded in unpacked form 2015-02-14 13:35:26 -05:00
4fbc6cfa77 Various code cleanup stuff 2015-02-14 12:24:25 -05:00
a7da59c858 Fix scenario difficulty increasing by 1 between saving and loading 2015-02-13 20:35:26 -05:00
a029836720 Fix some issues with loading legacy scenarios and custom graphics
- Unfortunately, the PICT loader is still very fragile.
2015-02-13 20:34:41 -05:00
Ben Scott
1477fef7ce Fixed warnings and IMPLEMENTED A THING in the menu item switch. 2015-02-12 01:47:48 -05:00
bb98455e4f Fix some issues with loading/saving new-format scenarios
- Terrain was saved rotated and was not loaded
- Graphics were not loaded (also for old-format scenarios)
- Crashed when attempting to convert a scenario without custom graphics
2015-02-11 17:01:32 -05:00
1894b31e20 Implement loading of scenarios
- This also tweaks the scenario schemas for consistency between schemas and code, adds some unique key restraints, and makes some attributes required.
2015-02-11 14:03:03 -05:00
8d40d3d26a Several minor fixes (thanks to Erdos for locating the issues) 2015-02-10 16:02:05 -05:00
7f6992da56 Store sign locations and text in the same structure 2015-02-06 14:43:26 -05:00
7d67c0c85b Fix issue with calculating town lighting, and do it on load instead of save since the new format doesn't store it 2015-02-05 22:19:47 -05:00
8d4cea7d0b Complete implementation of saving new-format scenarios and write version-check and loading stub for new-format scenarios 2015-02-04 19:48:31 -05:00
233a19175d Misc minor fixes
- Fix escape not ending shop mode
- Fix outdoor special spots not being drawn
- Fix special spots sometimes appearing off the edge of the sector in the scenario editor
2015-02-04 14:20:59 -05:00
36491c818c Implement a dialog to edit shops in the scenario editor 2015-02-04 13:55:22 -05:00
fcd29fb2ac Fix scenario editor build and update data/docs regarding shop nodes 2015-02-03 13:53:03 -05:00
008248a947 Rewrite shops system to be more general
- Shops can now contain more than one type of item (for example, both mage and priest spells)
- Shops can now specify any talking portrait
- Healing options in a shop now have an info button giving a brief explanation (partly because it was easier than maintaining the exception)
- Additional healing option (not present in default healing shops): cure acid
- Acid is also no longer removed when you leave town or end combat (unless it's about to wear off)
- Always start shop mode with the scrollbar scrolled to the top
- Fix crash when entering an outdoor shop (and outdoor dialogue for that matter)
- Treasure generation system can now return junk items (treasure type 0), but only if explicitly requested; this is possible in shops but not with monsters since 0 means no loot

Dialog Engine:
- When setting a scrollbar's maximum, it now ensures the current position doesn't end up greater than the maximum
2015-02-03 11:15:26 -05:00
559663dd35 New special nodes to store/unstore PCs outside the party structure
- Stored PCs are lost when you leave the scenario
2015-02-02 14:18:30 -05:00
15a802f63d Officially move version info up to 2.0 2015-02-02 11:38:37 -05:00
0d010f30bf Fix auto-generated frills causing the game to significantly lag 2015-01-30 21:17:51 -05:00
a23682306c Finish edit terrain type dialog in the editor and tweak some terrain properties
- Introduce enum for step sounds
- Remove union for treating terrain flags as either signed or unsigned
Editor:
- Add Choose button to select the "transform to" terrain.
- Implement Choose buttons as appropriate for the terrain flags, including editing the special that a terrain calls.
- Range-check the terrain flags.
- Add Custom button to choose a town as the combat arena.
- Fix/tweak/improve several of the terrain flag prompts.
- Fix placing shortcut key in field as its ASCII code instead of the letter
- Fix some of the range checks that were already in place but were incorrect or improperly static
Game:
- The wilderness terrain types now allow specifying how many d6's of food you get when hunting there.
- Crumbling terrain uses flag 2 instead of 3 to determine method (flag 2 was supposed to be strength but was never used)
- Merge two functions that did almost exactly the same thing (namely altering a terrain space and potentially updating conveyor/lights info)
- Merge switch_level into handle_lever since it was the only place it was called
- Remove global store_special_loc; the location is stored in the stuff_done array now
- Change when use/step on terrains will now update lighting if they changed to a terrain with a different light level
- Terrains that call a special no longer support mixed global/local modes - they either always call a local special or always call a global special
- Use previously unused swap_ter function (which did the exact same thing as the swap terrain special node)
Dialog Engine:
- Don't "erase" invisible icons or buttons; it's not necessary, since the entire window is filled with background before the draw() method is called, and it causes problems in case of overlapping elements.
2015-01-28 15:43:58 -05:00
6ed3b11399 Fix text wrap in transcript to work with pixel width of text instead of character width
Also, remove all (or at least most) of the extraneous spaces from the end of transcript messages.
2015-01-27 14:06:47 -05:00
495a0dab54 PC creation tweaks
- Allow scenario designer to specify exactly which towns allow character creation in them
- Clicking the "Empty" name in the edit party dialog is now equivalent to clicking the create button
- Fix dialog not properly focusing after deleting a PC
2015-01-26 19:34:51 -05:00
91c52fca77 Implement customizable background patterns to be displayed behind the game interface based on which town/sector the player is in and whether they are in combat mode, with cascading defaults.
- All the hard-coded background changes are no longer present and not even preserved.
2015-01-26 18:42:54 -05:00
99bb11dd3b Split up files so that the scenario editor will build
- cCreature split into seperate file-pair from cMonster/cTownperson
- fileio.cpp split into general, party, and scenario sections
- classes.h file deleted
2015-01-24 21:29:34 -05:00
9b067b62e4 Implement writing of town/outdoors map data to file 2015-01-23 18:21:20 -05:00
cf85ea7f5a Fix/update the edit placed monster dialogs
- Also, edit monster dialog now shows default facial pic
2015-01-23 13:37:47 -05:00
41db6dcfdf Fix indentation 2015-01-23 04:06:06 -05:00
5e21b8d4be Add three more map features to the map parser 2015-01-22 21:36:53 -05:00
952d81ae5a Store rect descriptions together with their rectangle and remove now-unused string-length members 2015-01-22 15:19:26 -05:00
967438ecec Add dialog to the scenario editor to let it know what type of graphics are in the custom sheets
- If you do this, it adds the graphics to all relevant select graphic dialogs, at the end, allowing you to choose custom graphics without having to remember the number schemes
2015-01-20 17:18:37 -05:00
e5f44de4fe Move a lot of item-related functions into the player and party classes
- Rearrange alchemy code a little to fix a possible situation with two-ingredient potions where you only have one of the first ingredient - instead of removing the second ingredient, it would have removed the next item in your inventory
- Equippable item abilities that have an ability strength now stack if you have multiple items with the same ability equipped
2015-01-16 16:40:54 -05:00
7b55262ed4 Several little fixes
- Fix custom missiles causing a crash if graphic not found
- Fix display in transcript of damage taken by monsters
- Fix missile start items not having their missile graphic set
- Fix immunity fields being signed (which would've prevented immunities from working properly)
- Don't bother generating a random number if min and max are the same
- Fix monster attack types not showing right
- Fix checking for item abilities returning 0 instead of 24 when not found
- Fix not updating screen when switching active PC
2015-01-15 15:03:32 -05:00
0dece71686 Fix some issues where some aspects of the prefab party leaked into loaded games 2015-01-12 21:19:51 -05:00
3a285f47da Eliminate data size members from the scenario record
- Also move town_hidden array to the town record flags
2015-01-12 14:05:46 -05:00
908652d168 Housekeeping
- Rename cItemRec -> cItem and cItemRec::type -> cItem::weap_type
- Clear out a lot of commented code
- Remove the flag_x members in the scenario that used to store the scenario's password hash (or something like that)
2015-01-12 01:01:24 -05:00