2013-05-15 Dominik Reichardt * keyactions.cc: different messages for toggling fullscreen mode 2013-05-13 Malignant Manor * actors.cc: Fix charmed_more_difficult breaking double clicking on npcs (r7343 regression) 2013-04-12 Dominik Reichardt * schedule.cc: fixed looping change of patrol schedule to patrol in SI, setting it to loiter instead if preset schedule is patrol or if there are no presets. * gamewin.cc: only allow background sfx tracks for oggs and MT32Emu. The tracks do not play nicely for normal midi devices. Should probably be allowed for MT32 and FakeMT32 conversions as well. 2013-04-03 Dominik Reichardt * usecode/ucinternal.cc: reverted fix for "error case of opcode CALLMS" of rev. 7363 to fix keyring in BG Keyring mod. 2013-02-24 Malignant Manor * Fix bug where any npcs would attack the Avatar when attack_avatar was called and there are no guards in the area. Also don't have npcs with the guard shape automatically attack in attack_avatar if in a dungeon. 2013-02-10 Marzo Sette Torres Junior * usecode/compiler/ucparse.yy: Eliminated needless sprintfs. 2013-02-09 Marzo Sette Torres Junior * usecode/*: Changed CMPG and CMPL opcodes to CMPGT and CMPLT. Fixed usecode stack buffer overrun (with potentially disastrous results) implicit in the CALLE/CALLE32/CALLO opcodes. This bug also caused the CALLO opcode to fail for functions with parameters. Eliminated spurious output when "adding" a negative number of items to the stack. Fixed bug in UCXT that caused the output of -fs to not print many things in the event of a stack underflow (as happens on function 0x329 in BG/FoV, function 0x91F in SI and function 0x939 in SS). Improved handling of CALLE/CALLE32/CALLO opcodes in UCXT. * docs/usecode_bugs.txt: Documented SS function 0x939 bug and its fix. * content/sifixes/*: Fixed bug in function 0x939. 2013-02-07 Marzo Sette Torres Junior * mapedit/shapelst.cc: Looking for shapes within two pixels of the clicked position in ES to allow selection of empty shapes. Rev 7363 * Makefile.*, docs/*, msvc9/*, msvcstuff/*, tools/{Makefile.am, ucdump.c, wud.cc}, usecode/(bg|si)intrinsics.h, win32/exult_tools_installer.iss: Removing wud and ucdump tools in their entirety as it is overkill to have 3 independent usecode disassemblers. * tools/wuc.c, tools/uctools.h: Added WUC support for all opcodes (until we either have a better usecode assembler or a decompiler that generates UCC- compilable output). Renamed output of a few opcodes (see changes to UCXT, below). WUC can't generate a symbol table or class vtables, so classes are unlikely to work anyway. * usecode/ucinternal.cc, usecode/ucsymtbl.*, usecode/compiler/*: Check for symbol table presence was moved to static member of Usecode_symbol_table class. Removed several essentially blank lines. Fixed error case of opcode CALLMS. Added better 'call indirect with parameters' opcode (as 0xd4) and deprecated old opcode 0xd3. Made opcodes into an enum, which includes all opcodes. * usecode/ucxt/*: Made UCXT disassembly output fully compatible with WUC; in general, this was done by chamnging the output to match WUC, but in some cases, the reverse happpend and in some cases both UCXT and WUC names were changed to be similar to UCC opcode names. Added support for symbol tables and virtually all opcodes from Exult/UCC; this is still experimental since external functions declared but not defined in the loaded usecode file (as happens in UCC-compiled usecode files) cause assertion failures for now. Opcode 0x56 (UC_CALLM) works partially as it needs information which can't be easily obtained, while opcode 0xd4 (the deprecated 'call indirect with parameters' opcode) is not handled at all. Deprecated opcodes.txt in its entirety as it was out of synch and harder to extend than u7opcodes.data. 'var rr;' no longer printed, as it is not used anymore. Fixed several of the 'FIXME's. Fixed bug introduced in Rev 7328 when fixing bug #1205910 "UCXT: Parameter order reversed in function definitions". * usecode/ucxt/makefile.unix, ucxt/data/opcodes.txt: Removing unused files. Rev 7365 * usecode/ucxt/data/u7opcodes.data: Incorrect data for callind disassembly. * usecode/compiler/ucfun.cc: Functions with a single basic block were being incorrectly optimized if they ended with a return statement. * usecode/compiler/basic_block.h: Using UsecodeOps enum. * content/sifixes/src/header/si/si_npcs.uc: Extraneous space in comment URL. Rev 7366 * all: Moved opcodes.h to usecode directory. Usecode_internal::run now uses the enum values from opcodes.h on switch statement. 2013-02-01 Marzo Sette Torres Junior * audio/midi_drivers/MidiDriver/*, conf/Configuration.*: Eliminating extra string copies. * audio/midi_drivers/FluidSynthMidiDriver.cpp: No need for c_str(). 2013-01-31 Marzo Sette Torres Junior * gumps/Newfile_gump.cc, usecode/ucdisasm.cc: Fixing clang warnings. * files/utils.h: Performance: using const string reference instead. * tools/wuc.c, ucxt/src/ucfunc.cc, ucxt/data/u7opcodes.data: Making UCXT -fa output compatible with WUC. Rev 7360 * content/bgkeyring/src/items/magic_carpet.uc: Magic carpet could be rolled while landing. 2013-02-01 Dominik Reichardt * configure.ac, hash_utils.h: Fixed detection of hashmaps and hashsets for OS X PPC builds. * audio/midi_drivers/timidity.*: rename LITTLE_ENDIAN -> TIMIDITY_LITTLE_ENDIAN to avoid portability issues. 2013-01-31 Marzo Sette Torres Junior * configure.ac, hash_utils.h, Makefile.mingw: Improved detection of hashmaps and hashsets: in order of preference, configure will now look for the TR1 hash maps/sets (preferred on GCC 4.3+), then for "ext/hash_(map|set)", and finally "hash_(map|set); if none are found, DONT_HAVE_HASH_(MAP|SET) will be defined so compilation does not fail. MinGW builds will now make use of tr1 unordered maps/sets. xBR scalers are no longer markes as experimental in MinGW. Rev 7353 * audio/AudioChannel.cc: Eliminating warnings. Rev 7354 * all: Eliminating warnings (mainly from Win32 builds). 2013-01-30 Dominik Reichardt * audio/midi_drivers/CoreAudioMidiDriver.*: better error handling by Marzo, fixed USE_DEPRECATED_COREAUDIO_API define to make Exult run on PPC OS X again, fixed copyright headers. * audio/midi_drivers/CoreMidiDriver.*: fixed copyright headers. 2013-01-29 Dominik Reichardt * configure.ac, audio/midi_drivers/CoreAudioMidiDriver.*: switched to AUGraph, synchronized with ScummVM's CoreAudio MIDI driver. Added two frameworks needed for that. 2013-01-28 Dominik Reichardt * audio/midi_drivers/CoreAudioMidiDriver.*: ripped out code that went into the CoreMidiDriver a long time ago. 2013-01-27 Malignant Manor * actors.*: charmed_more_difficult was updated for new charmed alignment. charmed_more_difficult will now only put charmed party members into combat when not in combat mode. 2013-01-26 Marzo Sette Torres Junior * actors.cc: Clearing frame_time when avatar and NPCs aren't performing an action (since actions force a delay at the end to prevent skipping steps). When clearing casting frames, add them as dirty before changing mode so they will be cleared from the screen. * effects.cc: Fixed Death Vortex and Energy Mist. Fixed missile drops. * exult.cc: SetIcon is unused on MacOSX. Deprecated literal conversion to char * in Windows and Mac OSX. Variable last_fps is debug-only. * conf/Configuration.cc: Spacing. * files/zip/*.c, audio/midi_drivers/FMOplMidiDriver.cpp: Clang noise. * imagewin/manip.h: Uninitialized variable being assigned to itself. * imagewin/scale_xbr.h: Fixed forward declaration. * tools/wuc.c: Missing initializers. * usecode/ucdisasm.cc: 32-bits is 8 hex digits. * usecode/ucinternal.cc: Usecode_Trace and Usecode_TraceReturn are used only in debug. * usecode/ucxt/*/*: Portability: typeof is GNU extension. Rev 7341 * Makefile.common: Duplicate "-o $(@)" in libsmooth_stream. * gamewin.cc: Added some sanity checking to shut up spuriours warnings from compiler in ireg object loading. * objs/egg.cc: Eliminating useless code. * shapes/pngio.cc: Eliminating clobbering warning. * all others: Removing unused-but-set variables. 2013-01-25 Marzo Sette Torres Junior * audio/midi_drivers/FluidSynthMidiDriver.*: Eliminated warnings. Added the ability to specify multiple soundfonts for FluidSynth in exult.cfg which will make use of FuildSynth's soundfont stack. Soundfonts are specified in the fluidsynth_soundfontN keys (N = 0 to 9) which are loaded in numerical order (0 first), plus the old fluidsynth_soundfont key, which loads after all others. Rev 7338 * files/listfiles.cc: Fixed memory leak on Amiga and MorphOS. Would be good to be able to test... Rev 7339 * files/snprintf.cc: Fixed spacing. * imagewin/savepcx.cc: Removing no longer needed using directives. * imagewin/*.h: Synchronized comments with code. * mapedit/*: Removed a handful of warnings. Fixed GtkTreeIter memory leaks. Close all windows, unload all data, free all memory and switch out of the groups tab when switching games or mods. These changes fix bug #3136375 "Exult Studio crash, Groups tab doesn't update on game change". 2013-01-24 Marzo Sette Torres Junior * keys.cc: Missing is_movement initializer for ActionScrollLeft. Warnings. Rev 7332 * all: Eliminating more warnings. * imagewin/savepcx.cc: malloc/free to new[]/delete[]. * audio/midi_drivers/mt32emu/freeverb.h: Updated handling of denormals. Rev 7333 * all: Eliminating more warnings. * audio/midi_drivers/fmopl.cpp: malloc/free to new[]/delete[]. * audio/midi_drivers/timidity/timidity.cpp: Reformatted for more consistent spacing. Rev 7334 * audio/midi_drivers/mt32emu/*: Last MT32Emu warnings I will eliminate until bug #3149070 "MT-32: sysex is not delayed properly (exc. buffer overflow)" is fixed. Rev 7335 * gamedat.cc: Fixed regression from rev #7332 causing corruption on the save screen. Rev 7336 * usecode/ucinternal.cc: Also print usecode function number in debug tracing if the function has an associated name. 2013-01-24 Malignant Manor * gumps/Gump_manager.cc: Fix main_actor_can_act check that could be bypassed if double click closes gumps was disabled. * exult.cc, gumps/Gump_button.h, gumps/misc_buttons.h: Allow left clicking on a check mark even when the Avatar cannot move. This fixes bug #3598889 "HP < 1 will not allow you to close gumps with the check mark". 2013-01-23 Marzo Sette Torres Junior * actors.cc: A few improvements to charm alignment, which is now generally updated when alignment is and the NPC is not charmed. Inverted rev #7300 so that only goblins in goblin ville are always on the lookout for foes. This matches the originals, in which only combat and patrol schedules will seek foes and fixes bug #3601595 "Bee's in Bee Cave Hostile before picking up honey". Rev 7323 * gamewin.cc: Fixed bug #3601596 "Music in Bee Cave conflict". Rev 7324 * actions.*: Improved pickup/put down action to show the standing frame at the end. Added new action to change the shape, frame and quality of a game object. * paths.*: Added pathfinder to approach an object or actor that takes into consideration the size of the destination. * actors.*: Added optional override for schedule location. This is mainly useful for street maintenance schedule, so the NPC continues from where he left off. * schedule.*, shapes/items.h, usecode/usefuns.h: Added 3 static methods to Schedule class: one to procure an item (tries inventory first, then tries to find a match nearby, then creates it as a last resort); one to create a pick-up action sequence; and one to scan for the closest object in the given object vector. Added light sources to street maintenance schedule, so candles will be lit/put out/replaced as needed. Street maintenance will now return the NPC to his/her pre-street maintenance position (for patrol schedule mainly). Pace schedule no longer checks for street maintenance. Patrol schedule now starts from the nearest path egg as a workaround to fix the automaton at Freedom when saving/reloading (until saving the state of schedules is implemented). Patrol schedule reanalyzed and updated; only missing are 'kneel at tombstone' (which dropped flowers at tombs in BG but not in SI, as there are no tombs), and 'wait for semaphore' and 'release semaphore' activities, as they are all unused in the original (see their comments for more on them). Most notably, patrol should work identically to the original games except for 'repeat forever' (which works around a few quality bugs in BG's Isle of the Avatar pirate fort) and 'horiz. pace' which did not work in the original. Fixed a list corruption bug with the patrol hammer. Implemented hard-coded ugliness in SS maze for usecode path eggs in patrol schedule. Rev 7325 * gamemgr/modmgr.*: Eliminating warnings. * Makefile.{am,common}, usecode/ucxt/src/*: Making UCXT use the GameManager class if loading from config file. Rev 7328 * usecode/ucxt/data/u7opcodes.data: SETR opcode should also set the return flag. * usecode/ucxt/src/ucfunc.cc: Adding output of the void, shape# and object# qualifiers in function declarations. Labels are now unindented, with all of the code in functions being idented at 1 tab. Fixed bug #1205926 "UCXT: Functions with no params are decompiled as having one". Fixed bug #1205910 "UCXT: Parameter order reversed in function definitions". * all: Performance: using ++it instead of it++ for iterators. Rev 7329 * keys.cc, keyactions.cc: Made "usefood" more useful and shown by default. Key actions of type Action::dont_show will now show under normal keys if they have a supplied optional comment; this fixes bug #3601627 'help gump doesn't show "useitem" commands'. * data/bg/defaultkeys.txt: Using improved "usefood" for feeding. * data/si/defaultkeys.txt: Removing redundant "usefood" Ctrl+F keybinding. 2013-01-22 Marzo Sette Torres Junior * gumps/Spellbook_gump.*: Keyboard controls for spellbook: page up/down will change current page, arrow keys will move the bookmark, home/end will move to first/last page, enter moves to the bookmark. * gumps/*.h: Removing some warnings. 2013-01-21 Marzo Sette Torres Junior * content/bgkeyring/*: Healing services were not charging any money. Rev 7319 * all: World-wrapping for finding directions. Rev 7320 * combat.cc: Fixed error introduced in rev 7296, allowing people to keep on attacking turned-invisible foes. 2013-01-20 Marzo Sette Torres Junior * content/makefile_builder.sh: Updated to work without doing a 'clean'. * content/{bgkeyring,sifixes}/{README,Readme.txt}: Massive update, clean-up and reformatting. Rev 7312 * combat.cc: Combat music should start if the avatar is targetting an NPC. Rev 7313 * actors.cc: Doing a raw intelligence check causes some animals to be able to open doors; so I am basing the sentince test only on monster intellect, which is 10 for 'default' monster information. Rev 7314 * all: Research into the originals shows that only neutral NPCs and guards call guards -- good NPCs ignore theft, murder and being attacked, evil and chaotic are out for your blood anyway. Based on this, I revamped the call guards/attack avatar bit so only neutral NPCs and guards call guards and NPCs of all alignments help NPCs of the same alignment, while ignoring any friendly fire. Disabled actors no longer call for help -- instead, if any sympathetic witnesses are nearby, they will call for help and assist. Rev 7315 * gamewin.cc: Fixed bug #3601519 "Breaking glass displays results in guards attacking" by having guards try to arrest for theft on all cases. Rev 7316 * all: Alignments are an enum of Actor class, not Npc_actor. * gamewin.cc: Crickets are now random, instead of adding large random delays to background music change. Defined private enum for BGM states. Rev 7317 * actors.cc: Partially reverted rev #7304 as it breaks BG intro. * monsters.cc: Don't ask for tile before we know we have one (reduces stdout noise). 2013-01-19 Marzo Sette Torres Junior * readnpcs.cc: Fixed bug that caused monster actors to go away instead of resuming their schedule on reload. * schedule.*: Created an 'arrest avatar' schedule for guards summoned to arrest a thieving avatar. * gamewin.cc: Danger music will override all but combat music. Creating 1-3 guards to arrest avatar instead of 1, and all of them use the new schedule to arrest the avatar. Danger music is forced to play when guards approach, as happens on the original. Arrest schedule is considered to be combat for determining if the NPC is hostile. Guards are of chaotic alignment as they are in the original. * actors.cc: Arrest schedule does not seek foes. Local guards call for more guards. All together, this fixes bug #3599723 "guards that were called by npcs stop attacking on reload". Rev 7309 * actors.cc, schedule.*: Implemented graze schedule, fixing bug #3601321 "Graze schedule not working properly". 2013-01-19 Malignant Manor * shape_info.txt: Fix typos that caused books to run the wrong usecode. This fixes bug #3601322 Exploding books in Castle of White dragon don't explode 2013-01-19 Marzo Sette Torres Junior * schedule.cc: Fixing bug #3601456 "NPCs teleport out of bed when woken up". Reduced random delay for Walk_to_schedule as it caused NPCs to stand still for far too long in many cases. * actors.*: On schedule restore, party_id hasn't been set for party members yet, so use Actor::is_in_party instead. Also, allow moving to schedule if NPC is sufficiently far away from schedule center on restore. This could cause (say) NPCs to sleep on the wrong bed. * gamewin.cc: Fixed bug #3601457 "asleep and paralyzed npcs should not call guards". Rev 7304 * effects.cc: Fixed incorrect checking of prjectile hits, which caused a bow to miss at point blank range sometimes (and likely in other occasions). Rev 7305 * all: Alignment and charm now works like the original: the charmed creature gets the alignment of the person that charmed him (or chaotic if an object did it). Usecode gets/sets charmed alignment if the NPC is not charmed, or the real alignment otherwise. Setting charm flag from usecode sets charmed alignment to good, as in the originals. The charmed alignment is saved and restored. Actor::fight_back should use effective alignment for its tests. Several locations that got the real alignment use the effective alignment now. Chat screen displays alignment (real and effective). Rev 7306 * usecode/intrinsics.cc: Fixed error in previous commit. 2013-01-18 Marzo Sette Torres Junior * audio/Audio.cc, audio/AudioMixer.*, objs/animate.*: Fixed bug #3601377 'No "gulping" sound when eating food' by having Objct_sfx have clients and remember the last position of the object (or its outer container's). Also, Object_sfx will play until either the position is out of range or until it has played the SFX once, and delete itself afterwards, fixing a leak on a sound effect played with the avatar as the SFX's source. * all: Eliminated some warnings. Rev 7292 * objs/animate.cc,usecode/intrinsics.cc: Fixed bug #3601382 "Open book sound happens when closing book" by forcing sounds played from usecode to begin playing right away. Eliminated some warnings. Rev 7293 * exult.cc: Fixed bug #3601383 "Avatar stuck in casting spell pose after casting", a regression introduced in rev #7271. Eliminating warnings. Rev 7294 * objs/objs.cc, objs/iregobjs.cc: Remove object clients before removing them from the map or owner (missing from rev #7291). Rev 7295 * shapes/shapevga.cc: Incorrect flag type in Actor_flags_functor. Rev 7296 * all: Changed alingments to use the names from the original games, as seen in the 'inspect NPC' screen. This means: friendly->good, hostile->evil, unknown_align->chaotic. Added some convenience functions for actors. Eliminated more warnings. * schedule.cc: Changed to correct alignment checking for foes. Only NPCs that can speak will actually say the schedule barks. Rev 7297 * combat.cc: Battle music only changes if there are anyone in the avatar's oponent list; this prevents battle music when attacking a chest. Rev 7298 * schedule.cc: Talk schedule will not talk to invisible avatar unless the NPC can see invisible. Proximity usecode happens more often for the hound schedule, which will cause the NPC to face the avatar if the NPC is within 3 tiles. Avatar will no longer lay down on the ground if double-clicking an occupied bed. Rev 7299 * actor.cc: Checked wjp's CHECKME, and decided to use alignment to decide if the NPC should fight back or not, instead of only party-vs-nonparty. Check is done in Actor::fight_back, and covers the cases mentioned in the (now deleted) comments, as well as a few other possibilities of friendly fire. Rev 7300 * actor.cc: Eliminated both of the !rand()%N lines to make hostile NPCs more more hostile, and consolidated the two checks as they are now redundant. * schedule.cc: Increased range of seek_foes, but requiring line-of-sight. These two combined fix most of the issues in bug #2694957 "Non-hostile Hostiles", with a few more fixes to come. Rev 7301 * gamewin.cc: Changed conditions on who can be a witness so (1) the BG royal mint guards can call you up for stealing and (2) mod NPCs can do the same. Evil and chaotic NPCs no longer care if you steal. If an NPC is in hound schedule, he will always be a witness to your crimes. A witness will be changed to the hound schedule, and will keep an eye on the avatar. Rev 7302 * all: Several barks were implemented, for goblins and non-goblins. * content/*, data/*, mapedit/*, shapes/shapeinf.h: De-hard-coded what shapes are goblins, including ES. Description of format for actor_flags sections of shape_info.txt files is now correct (was wrong before). * actors.cc: Added an ugly hack to handle the neutral goblins in the goblin village by shifting their effective alignment within the boundaries of the village; see the comment in Actor::get_effective_alignment for additional information. This should fix the remaining cases of bug #2694957 "Non- hostile Hostiles". * gamewin.cc: Invisible thieving avatar will not be caught (but NPCs will have appropriate barks). 2013-01-17 Malignant Manor * Fix crash when a party member dies due to a trap 2013-01-16 Marzo Sette Torres Junior * objs/animate.cc: Using an object's outermost container to determine range for SFX attenuation instead of the object's own position. This fixes bug #3600801 "Unlocking doors and chests missing click sound effect". Rev 7278 * ./content/bgkeyring/src/items/orb_of_the_moons.uc: Fixed bug #3600802 "Orb of the Moons - teleport only avatar". Rev 7279 * gamewin.cc, audio/Audio.*, audio/conv.*: Added song number conversion from BG IDs to SI IDs, similar to what was in place for SFX. Fixed bug #3600800 "Snow weather effect missing sound effect" and bug #3600838 "Dungeon music not playing upon entering". Also added weather track for rain (song 4). Rev 7280 * mapedit/paledit.cc: Fixed assertion woes, as well as making empty palettes show as all black instead of random colors. Rev 7282 * objs/egg.cc: rand()%1 is always zero; changed to rand()%2. Rev 7283 * files/utils.h, tools/wud.cc: WUD is no longer the unportable mess it was. Eliminated warnings. Rev 7284 * all: Eliminating warnings. Rev 7285 * usecode/intrinsics.cc: Intrinsic path_run_usecode drags party members in BG also (confirmed in originals). Rev 7286 * content/bgkeyring/*: Fixing spellcasting AI by disabling it for the time being. Updating Keyring readme. * docs/exult_intrinsics.txt: Updated with changes from quite a ways back. Rev 7288 * combat.cc, gamewin.cc: Fixing bug #2782683 "Background music #10 never played". Rev 7289 * effects.*, usecode/intrinsics.cc: Fixed bug #3186737 "SI: Lightning craziness after body switch. (1.5.0svn)" by only allowing one usecode lightning effect at a time and by forcing usecode lightning to display even while in doors (matches original). 2013-01-12 Dominik Reichardt * configure.ac and all makefile.am files: fixed compiling with current autotools and removed many autotools warnings. 2013-01-10 Marzo Sette Torres Junior * gamewin.cc: Fixing bug exposed by revision 7267 (bug #3600300 "as_npc() causes issues (warning fix regression)") before which the the avatar was being incorrectly cast from Main_actor to unrelated class Npc_actor. 2013-01-10 Malignant Manor * all: Eliminate some Cppcheck errors and noise 2013-01-09 Marzo Sette Torres Junior * all: Collecting all hard-coded usecode functions in separate header until they are properly de-hard-coded. Eliminated warnings. Consolidated 32-bit usecode opcodes with their 16-bit counterparts when they were otherwise identical except for size of data read. Improved string reading functions. Rev 7271: * all: Made party members less prone to teleporting while trying to sit on barges. This is done by having party members persistently repathfinding if the path is blocked, and by ignoring NPCs that aren't sitting, lying down, etc. when determining if it is possible to reach the seat. Also, some more warnings eliminated. Further, actors no longer move aside when they are on the move. Moreover, party members will also stand at rest after a while, as the avatar does, matching the original games. Finally, the avatar will have bad feelings when saving too often. 2013-01-08 Marzo Sette Torres Junior * actor.*, schedule.cc: Renamed Actor::unready_weapon to Actor::empty_hands, which will now empty both hands. The function tries to place on the belt and backpack slots, trying to add to containers if present, or forcing the slot to accept the item if not. This fixes weapons disappearing on sleep bug. Also, party members will not hide their weapons on sleep. * paths.*: Yet more fixes to grabbing. 2013-01-07 Marzo Sette Torres Junior * schedule.*, usecode/intrinsics.cc: Fixed bug #3599714 "Attacked npcs make their bed before defending themselves". Also fixed bug where NPCs were not too concerned about who they share their beds with -- they could lie down with the avatar. Incidentally, this incidentaly fixes the bug reported in the comments of the aforementioned bug report (avatar making a bed that an NPC took right after the avatar woke up). Improved bed occupancy detection routine allows children to be detected too. Rev 7263: * actors.cc, schedule.cc: Actor::unready_weapon causes actor to redraw if a weapon has been unreadied. Forcibly remove the weapon from hand if not a party NPC and belt slot is being used. Places where Actor::unready_weapon were called together with Game_object::add_dirty see the latter removed. Rev 7265: * objs/objnames.cc: Incorrect branch caused undefined behavior. Rev 7266: * shapes/*: Eliminating warnings. Rev 7267: * gamewin.cc: Avatar now properly restores into combat if the game was saved during combat. Correct mouse shape is set in all cases. * gamewin.*, mouse.*: Eliminating warnings. 2013-01-06 Marzo Sette Torres Junior * actions.cc: Fixed Fawn guards sometimes not being able to open doors. * actions.*, actors.cc: Prevent schedule changes from stopping intrinsics path_run_usecode and si_path_run_usecode. This fixes avatar not animating to roll bedroll if sleep is cancelled, and maybe a few other things. * gamewin.cc: Eliminate double check for avatar paralysis. Sleep schedule no longer prevents avatar from moving (sleep flag does that). * paths.cc: More changes to Fast_pathfinder_client::is_grabable, as previous version prevented, for example, the gavel at Spark's from being used. * schedule.*: Refactored code common to patrol and pace schedules. NPCs will now make their beds when getting out of sleep schedule. Children are now better positioned in beds. * schedule.*, usecode/intrinsics.cc: Fixed bugs #3599106 "beds not working properly again" and #3330452 "Sleeping on the first or higher floor not working correctly" (and comments). Also, double-clicking on beds can now be 'cancelled' by moving away while moving towards the bed, as happens in the originals. * actions.*, schedule.*, tqueue.*, usecode/ucsched.*: Const-correctness. Rev 7258: * schedule.cc: Set sleep flag on avatar too for nap_time intrinsic. Rev 7259: * paths.cc: Fixed object manipulation regression due to incorrect condition on rev 7257. 2013-01-05 Malignant Manor * schedule.cc: Add back quality check for dough and clear okay_to_take flag since okay_to_take doesn't get saved. This should fix dough not being used after cache out or reload. 2013-01-05 Marzo Sette Torres Junior * actors.cc: Fixed dying fish turning into bread then fish by only using the 'frame 0 then script to set correct frame' trick if first frame is empty. * effects.cc: Fixing bug #3599105 "Cannons don't fire correctly". * gamewin.cc: Use c_tilesize/2 instead of hard-coded 4. * objs/chunks.cc: Eliminated irrelevant comparison translation. Rev 7255: * usecode/ucsched.cc: Fixed bug #3598888 "fade out doesn't always fade back in" which was caused by usecode function 0x6fb in FoV killing the script that caused the screen to fade back in. This function will now be delayed until the screen is faded in again. 2012-12-30 Marzo Sette Torres Junior * actors.*, gamewin.cc, npctime.cc, objs/egg.cc, usecode/intrinsics.cc: Party members no longer heal to full if knocked out when they cache out. UI_clear_item_flag no longer awakens unconscious NPCs (matches original in e.g., BG usecode 0x6bc). Fire fields no longer awaken knocked out NPCs. Mana no longer regenerates quickly for knocked out NPCs. Trying new dead body positioning method. Fixed last commit to not randomly remove the avatar's target. 2012-12-30 Malignant Manor Rev 7246: * actors.cc, combat.cc: Have the Avatar stop attacking unconscious actors Rev 7248: * defaultkeys.txt: Fix description of walk keys Rev 7249: * gamewin.cc: Save/load combat state Rev 7250: * Fix changelog 2012-12-30 Marzo Sette Torres Junior * exult.cc, keyactions.*, keys.*: Walking and running keys no longer count for the purposes of skipping faces, maps and such, as they could prevent someone from ever seeing the face. Also, enforcing const-ness in KeyBinder class and on key actions. Rev 7245: * actors.*, gamewin.cc, npctime.cc: Fixed bug #3598886 "HP < 1 should regen faster than per hour". Rev 7251 * data/Makefile.am: Making the expack-generated header files exult_bg_flx.h, data/exult_flx.h, data/exult_iphone_flx.h and data/exult_si_flx.h depend on their respective flex files. 2012-12-29 Marzo Sette Torres Junior * shapeid.h, shapes/vgafile.*, usecode/conversation.cc: Fixed bug #3001914: "Cutted texts in voiceovers with Speech disabled" [sic] for the guardian in BG. Also, fill whole game area with background color from large faces so SI guardian and serpents cover the whole screen. * usecode/conversation.h: Spacing. Rev 7241: * usecode/conversation.cc: Center BG guardian vertically too. * actors.cc: Fixed bug #3186728 "SI: Incorrect property flags? (1.5.0svn)" by applying okay-to-take flag *after* the NPC's stuff is moved to the dead body. * gamemap.cc: Make sure okay-to-take flag is read for quantity shapes. Rev 7242: * actors.cc, gamewin.cc, shapes/items.h: Guards now bark messages when coming to arrest you. People calling guards only yell if they can talk. If there are no guards in the area, people will call for help instead of calling guards. Guards are no longer called in dungeons, and people will not yell for them in such places. This should fix bug #3186715 "SI: Automatons in MoF call guards (1.5.0svn)". Rev 7243: * objs/objs.cc: Added some (disabled by default) tracing facilities to debug render order. One day... 2012-12-29 Malignant Manor * actors.cc: Only heal more than 1 hp through mend_hourly if the npc's schedule is sleep. Fix freezing check. Temp of 50 should do damage Allow starving party members to regain health over time if below 0 hp. * npctime.cc: Only wake up npcs over time if they have 1 or more hp. (was 0) Do hunger damage check every minute. Hunger does 1 damage instead of 0-2. * actors.cc, npctime.cc, Stats_gump.cc: Fix hunger check. Food <= 9 is bad 2012-12-29 Marzo Sette Torres Junior * gamewin.*: Fixed incorrect calling of ES if mapedit was still on when Exult is closed (caused by rev #7236). 2012-12-28 Marzo Sette Torres Junior * gumps/Gump_manager.cc: Fixing previous fix to not delete gumps when you want to move them. * combat.cc: Fixed bug #3594342 "Attacking through walls and doors" by using a center-to-center LOF check. * actor.cc: The above fix made apparent a bug that allows party members to cause each other o step through walls and doors by moving aside. Since I haven't isolated the circumstances that cause this, and since it is only likely to happen while in combat, I disabled moving aside while in combat as a workaround (the rationale being that you are too busy fighting to play nice). Rev 7230: * combat.cc: Reverted changes from rev 7229 to fix bug #3598684 "problems attacking medium and large actors (7229 regression)". * paths.cc: Speed improvements for Fast_pathfinder_client::is_grabable. Fast_pathfinder_client::is_straight_path will no longer prematurely quit before the end of the path. * rect.h: Truly fixed Fixed bug #3594342 "Attacking through walls and doors" (and who knows how many other bugs). Rev 7231: * npcnear.cc: Disabling old proximity usecode method. The rabbit hack is not needed anymore since patrol schedule does what it should, so it has gone. * schedule.*: Only loiter, tend shop, dance, hound, sew and bake schedules seem to call proximity usecode in the original. This fixes bug #3598581 "Barks in Serpents' Isle". Rev 7233: * schedule.cc: Completing dance schedule (fixes bug #3435764 "Dance Schedule broken". Tweaked odds of proximity barks for dance schedule. Rev 7234: * paths.*, schedule.cc, pathfinder/PathFinder.h: New Fast_pathfinder_client that checks it the proper way. Fixes issues with ships and beds reported on IRC. Rev 7236: * gamewin.cc: Eliminating segfault when loading a game if map edit mode was active (due to fixed object deletion). * actors.cc: Fixed bugs #3127755 "dead NPC bodies become obstacles" and #3594344 "dead bodies hang in wall - become obstacles", which were caused by the dying NPC blocking the placement of his own body. 2012-12-27 Marzo Sette Torres Junior * all: Removed ungodly amount of uneeded data copies when passing tiles and rectangles around by using const references when possible. * effects.cc: Particledrop base class needs virtual destructor. * paths.cc: Fixed bug #3597397 "can move objects through the door" by using maximum delta-z of 1 in Fast_pathfinder_client::get_step_cost. SI crystal balls are fixed the "proper" way by trying to get within a radius equal to the object's smallest 2d dimension plus 1 from the object. * pathfinder/path.cc: Improved path tracing slightly by having it also print z coordinates. * paths.cc: Fixed a few incorrect results for grabbing objects through walls re-introduced in commit #7224. * paths.cc: Fixed incorrect blocked objects from commits #7224-#7225. * gamewin.h, drag.cc, gumps/Gump_manager.cc: Fixed segfault on dragging a gump and deleting it at the same time (e.g., right click closes gumps). 2012-12-18 Marzo Sette Torres Junior * usecode/*: Fixed longstanding bug in usecode symbol table. Also fixed bug #3011723 "Keyring Mod - targeted NPC spells" by adding a second opcode for indirect function calls with parameters. 2012-12-18 Marzo Sette Torres Junior * configure.ac: Added an option (--enable-pedantic-warnings) to build with pedantic warnings, which is independent of other warning options. Removed some stray left-overs from GIMP plugin code, and fixed version numbers. Some identation changes. * usecode/useval.cc: Fixed bugs #3597062 "Buying reagents from Wis-Sur is broken" and #3597307 "Training in SI broken - result 0 combat points", both due to hard-coding a modulus operator in a generic division/modulus operator. * exult.cc: Fixed bug #3597039 "segfault on main menu quit with only Speech enabled audio". * shapeinf/aniinf.cc: Removing dead code. * game.cc, gamedat.cc, gamemap.cc, readnpcs.cc, gamemgr/bggame.cc, shapes/miscinf.cc, usecode/ucinternal.cc: Using const reference exceptions. Rethrowing using empty throw to avoid unnecessary copies. * windrag.h, files/U7obj.h, shapes/shapeinf.*: More 'correct' assignment operators (ward against self-assignment, non-const return). * imagewin/scale_xbr.h: Made template parameters more explicit. 2012-12-17 Dominik Reichardt * gamemgr/bggame.cc: Only show the BG intro subtitles when audio and speech are disabled. 2012-12-15 Marzo Sette Torres Junior * usecode/ucinternal.cc: Fixed bug #3596110 '"Your hands are too full" even when carrying no inventory'. * objs/contain.*, objs/objs.h: Use bool instead of int for add_quantity. * mapedit/shapeedit.cc: Fixed bug #3172487 "Exult Studio crash from removing frame name property". Fixed incorrect pointer initialization. Also fixed incorrect initialization of fields for all vector data if all entries are invalid (e.g., present in static data but deleted in patch) and ensured that treeview rows are only created if the element in question is not an invalid one. * tools/expack.cc: Expack now extracts to files with 5-digit numbers, as per #3163084 "Expack cannot repack extracted files using a wildcard"; however, this does not mean wildcards will work in non-POSIX shells. Fixed segfault when extracting from a flex file due to double delete. * gamewin.cc: Default back to '(default)' if could not open custom keys or autonotes files. Made alignment and spacing consistent. * all: (rev 7211) Made alignment and spacing consistent. * all: (rev 7212) Applied patch #3591998 "Fixed compiler warnings". * all: (rev 7213) eliminated a few more warnings. 2012-12-12 Marzo Sette Torres Junior * audio/Midi.cc: Fixing segfault when you change the Midi device type and disable midi in one go. 2012-12-11 Marzo Sette Torres Junior * exult.cc: Reverting revision 7197 as it can sometimes cause the mouse to lock on the center of the screen. A better workaround for touchpad issues for now is to disable full-screen fast mouse. * conf/Configuration.cc: Checking for absolute paths after translating any system paths. * files/utils.cc: Consolidating some duplicate code. Spaces to tabs. System paths can now be recursively defined, so putting "" as a path in exult.cfg will correctly translate if used in the definition of other system paths (if correctly escaping < and > as < and > for XML). Added a few security features for recursive system paths, such as a cap to the recursion depth. 2012-12-10 Marzo Sette Torres Junior * keyactions.cc: Toggling fullscreen displays a timed popup asking if you want to keep the change or not. If yes, config is saved; if not, then full screen is toggled back. 2012-12-09 Marzo Sette Torres Junior * exultmenu.cc: Fixing now relevant double-free in menu. * gamewin.cc: Clear the time queue before deleting unused NPCs (just in case). * tqueue.*, objs/animate.*: Fixed leak when loading game while an object is playing SFX through Object_sfx; using time queue for it as it has the only reference to the object. * gumps/AudioOptions_gump.cc: Memory leak on two buttons when enabling or disabling audio. * gumps/VideoOptions_gump.cc: Double delete: set static variables to zero after freeing them. * usecode/conversation.cc: Fixed bug #3001914: "Cutted texts in voiceovers with Speech disabled" [sic]. * exult.cc, imagewin/imagewin.cc: Missing space in video debug output. Fixed "fill" and "fit" fill modes (and aspect correction) when scale is 1. * imagewin/imagewin.cc: Fixed resolution changed oddities from the previous commit while still keeping the fix for scale 1. * usecode/ucinternal.cc, usecode/useval.*: Fixed bug #3001289: "Strange things in NPC dialogues", also fixing a couple of bugs in SI usecode. * usecode/useval.*: Fixing dumb mistake: std::less is operator<, not operator-. * actors.cc: Changed NPCs to leave dead bodies only if they have actual body information (and aren't flagged by monster data otherwise) instead of leaving a default dead body. Fixes the Beatrix part of bug #3186722: "SI: Body issues in Shamino's Castle". * usecode/ucinternal.cc: remove_party_items should return 1 only if it has really removed any items (fixes Cantra's body in bug #3186722: "SI: Body issues in Shamino's Castle"). * exult.cc: Working around an SDL 1.2 issue with touchpads in full-screen programs under X11. * drag.cc: Temporary objects should not stop being temporary because you split a stack in two. * objs/contain.*, objs/obj.h, usecode/ucinternal.*: Implemented previously unknown flags in UI_add_party_items and in UI_add_cont_items, as per bug #3132098: "UI_add_party_items unk is temporary bool". 2012-12-08 Marzo Sette Torres Junior * Changelog: Previous two entries (what was wrong with me?). * configure.ac: Enabling NxBR scalers by default, as they seem stable enough. * schedule.cc, actions.*: Eliminating warnings. * files/Flex.h, files/IFF.h, files/Table.h: Cosmetic: explicitly adding in the virtual destructors, just in case. * exult.cc, exultmenu.cc, gamemap.cc, files/U7fileman.h: Enhancing Valgrind's signal-to-noise ratio, eliminating some warnings. * shapes/vgafile.*: Avoid unnecessary data copying by using references. Part 2: Leaks galore * exultmenu.cc, menulist.*: Fixing memory leaks in menu. * game.cc, shapes/miscinf.cc: Implemented Shapeinfo_lookup::reset. Game::~Game now frees all files and miscellaneous information (fixes lots of errors and memory leaks). Fixed two dumb leaks (passing strdup'ed text to std::string constructor). * gamemap.*: Game_map::clear could be reached before Game_map::init in some cases, which led to some deletes of uninitialized stuff. * gamewin.cc: save_names array could be deleted uninitialized. * shapes/vgafile.*, shapeid.cc: Shape imports are now cleared for gumps and main shapes. Fixed leaks in Shape_frame (construct new, call either read or get_rle_shape). * shapes/font.cc: Multiple loads caused memory leaks. * shapes/items.cc: Alternating games caused memory leaks due to overwriting text pointers without freeing them first. * All others: Straight up alloc-never-free leaks. Part 3: Yet more leaks. * actors.*, objs/objclient.*: Object_client needs a virtual destructor. Added some stuff to increase Valgrind's signal-to-noise ratio. Added a way to kill a schedule without notifying its clients it has gone away, which is called only when the map is being destroyed (which likely means that the clients are invalid). * exult.cc: More increases to Valgrind's signal-to-noise ratio. * gamemap.cc, shapeid.cc, audio/*, gamemgr/bggame.cc, usecode/ucinternal.cc: Straight up leaks. * party.cc, objs/objs.cc: Code cleanup. * schedule.h, audio/midi_drivers/mt32emu/part.h, objs/animate.h, objs/mappatch.h: Several classes in need of virtual destructors. * singles.h: Game_singletons needs no destructor, virtual or otherwise. * gamewin.cc: Unused NPCs need to be manually deletedor they leak. * objs/objlist.h: Nearly 12-year-old massive leak when map got deleted (for example, to load a new game). * objs/egg.cc, shapes/shapeinf/monstinf.cc: Allowing egg-spawned objects of NPC or monster classes to actually spawn as NPCs or monsters. Also, fixed default monster info for shapes that don't have it. 2012-12-07 Marzo Sette Torres Junior * combat.cc: Fixed incorrect animation of slimes after they attacked. * actors.*, combat.cc, monster.cc: De-hard-coded slime and sea-serpent shapes. Fixed incorrect sea serpent attack animation (with improvements over the original game). * actors.cc, schedule.cc: Improvements to sitting down on barges. Facing of NPCs is preserved on more cases. Move aside now ignores facing when it determines if actor is sitting down, kneeling or lying down. * gamewin.cc: Change party members to standing on teleport (barges could be activated by sitting on a barge, teleporting to another and activating the new barge). 2012-12-07 Marzo Sette Torres Junior * schedule.cc: Walk-to-schedule caused instances of the sit-on-air bug because it would teleport the NPC if off-screen and leave him/her sitting/lying down. * actors.cc: Fixed another case of potential sit-on-air source. * exult.cc: Fixed buildmap guard band issue. 2012-11-19 Dominik Reichardt * exult.cc: added command line option to reset the video settings (patch by Malignant Manor). * win32/exult_installer.iss: "reset video settings" shortcut to the Exult Start Menu group on Windows (again thanks to Malignant Manor). 2012-11-16 Marzo Sette Torres Junior * imagewin/scale_xbr.*: Performance improvements for NxBR scalers. 2012-11-11 Dominik Reichardt * varios files: added data/bg|si/autonotes.txt to game flx bundles and the misc option to toggle it. 2012-11-11 Dominik Reichardt * gumps/Notebook_gump.cc: when cheating show location of notes in the notebook. 2012-10-28 Marzo Sette Torres Junior * tools/gnome_shp_thumbnailer.cc: Eliminated deprecation warning. * content/bgkeyring/*: Finally fixed forging of blacksword, courtesy of Malignant Manor. * imagewin/scale_xbr: Added option (by editing the .h file) to use other variants of the algorithm (but still defaulting to Zenju's version, as it looks best). Changed color metric to a Manhattan metric over RGB space for a small speed boost without visual loss. * paths.cc: Fixed opening crates through wall in Monitor store. * All others: Fixed sitting on air/sleeping on ground bugs. Fixed a few schedule-related segfaults due to using objects after they have been deleted by more throughly stopping NPCs when offscreen (may have some side-effects, needs testing). 2012-11-08 Dominik Reichardt * cheat_screen.cc: changed cheat screen keyboard commands so you can easily use them on non-US keyboards. 2012-11-06 Malignant Manor * Fix bug #3581649 by stopping Actor::ready_best_shield from trying to equip the lhand object (weapon). 2012-11-05 Willem Jan Palenstijn * actors.cc: Prevent schedules from being executed for off-screen actors. 2012-11-04 Willem Jan Palenstijn * imagewin/ibuf8.cc: Fix out of bounds memory access in 'static' screens 2012-10-28 Marzo Sette Torres Junior * usecode/ucdisasm.cc: Eliminated warning. * shapes/shapeinf.h: Typo in comment. * All others: Added 2xBR, 3xBR and 4xBR scalers to Exult. They are considered experimental, and require --enable-nxbr to be passed to ./configure to use. Performance is likely atrocious for the time being. 2012-10-27 Dominik Reichardt * gumps/Slider_gump.cc: fixed bug #2801339, clicks outside of the slider gump but on the x-axis of the slider were registered as clicks on the slider. * exult.cc: when scale_method in exult.cfg wasn't a valid scaler Exult would crash. Thanks to sh4rm4 on #exult for this fix. * exult.cc, gamewin.*, gumps/GameplayOptions_gump.cc: added single rightclick pathfind option. Default is still a double rightclick. Thanks to wjp for debugging this. 2012-10-25 Willem Jan Palenstijn * actors.cc: Fix hang when swapping positions on chunk boundary * files/zip/*: Fix build with recent zlib 2012-10-10 Dominik Reichardt * objs/egg.cc: fixed bug #3433026, in a fire field only clear asleep flag when the NPC is actually sleeping. Otherwise we get a cloned passive standing NPC. This is due to Usecode_script::terminate(this); in actors.cc which might need further looking into. 2012-09-07 Malignant Manor * Revert previous change and implement it another way 2012-08-25 Malignant Manor * Add 0x160 mask to find_nearby. This will only return objects that are not okay to take. Make baking schedule use this mask instead of a quality setting since quality isn't saved on quality flags objects. 2012-08-18 Dominik Reichardt * configure.ac, makefile.am: added configure "--with-macosx-code-signature=identity" for using an ID to codesign the Mac OS X bundle. The default identity is "Developer ID Application". 2012-07-06 Malignant Manor * actors.cc: Have party members fight back if Avatar is disabled, not in combat mode, and a party member is hit. The original only switched to combat mode when the Avatar got hit. Fix use of || instead of && that has any actor schedule seek foes * gumps/Spellbook_gump.cc: fix character size * usecode/ucinternal.cc: fix array size 2012-06-15 Marzo Sette Torres Junior * all: Updating Gnome shp thumbnailer to work on Gnome 3. 2012-06-12 Malignant Manor * mapedit/shapeedit.cc: Fix spot frame editing for helmet Fix alt frames editing for ammo, rings, and torso 2012-05-31 Dominik Reichardt * configure.ac, imagewin/imagewin.cc, imagewin/scale_hq*.*: Added configure option --enable-all-hq-scalers, --enable-hq2x, --enable-hq3x, --enable-hq4x. This makes it easier to leave out HQ scalers for quicker compiles, when you need to test things. By default all HQ scalers are enabled. 2012-05-30 Marzo Sette Torres Junior * actor.cc: Fixed bug #3530273: cannot switch bodies with Petra. * content/sifixes/src/header/si/si_externals.uc: Out of synch comment. 2012-05-04 Marzo Sette Torres Junior * objs/chunks.cc: Changed ints->bools. * objs/objs.cc: Fixed memory leak caused by non-deletion of terrain game objects on cache-out. * objs/objlist.h: Removed theoretical object list corruption bug. 2012-04-15 Marzo Sette Torres Junior * Keyring: Merged in the rollable carpet mod. * SI Fixes: Ankh-less ship sails since there is little reason for the locals to add one of the symbols of Beast British's tyrannical commands. 2011-12-03 Marzo Sette Torres Junior * all: Fixing several edge cases in world wrapping. 2011-12-02 Marzo Sette Torres Junior * exult_intrinsics.txt: Updated with new intrinsics create_barge_object and and in_usecode_path. Also documented optional parameters to the following intrinsics: path_run_usecode, move_object, recall_virtue_stone and teleport_to_saved_pos. * usecode/intrinsics.cc, usecode/bgintrinsics.h, usecode/siintrinsics.h, ucinternal.h: Added create_barge_object and in_usecode_path intrinsics. Added a new and optional parameter to path_run_usecode that can toggle SI mode (defaults to true in SI, false otherwise). * objs/barge.cc: Force a barge to reset its center as well as to gather its objects when it is being moved into the game world. Also, force a reset of the barge's center when moving it. Fixed long-standing bug (at least 10 years old) that allowed a flying carpet to land on water. * imagewin/imagewin.cc: Initialization order (removing warning). * mapedit/shapeedit.cc: Fixed insertion bugs on vector data, as well as allocation with new/dealocation with gtk_tree_iter_free. * objs/chunks.cc: Invalid world-wrapping caused assertions to fail at the edges of the world. * all others: Replaced pre-processor hackery for Game_Object::find_nearby* with templates and added a few more overloads. 2011-12-01 Dominik Reichardt * gamewin.*, gumps/misc_options.*: applied patch by i30817 (forum) for dropping stacks of items without confirmation of amount (CTRL drop) and option to make this the default way to drop stacks. * documentation and FAQ updated 2011-11-08 Dominik Reichardt * imagewin/scale_hq4x.cc & .h and various other files: added hq4x scaler. * imagewin/scale_hq2x.cc & .h, scale_hq3x.cc: streamlined scale_hqnx.h include 2011-10-25 Marzo Sette Torres Junior * actors.cc: Fixed uninitialized variable restored_schedule. Fixed two cases of '!rand()%XX'. * effects.cc: Uninitialized 'start' variables in Snowstorm_effect and in Sparkle_effect could cause these weather effects to fail. * keyactions.cc: 'skip' was used initialized, and in a useless manner. This caused actor/paperdoll gumps to use a wrong sequence. * schedule.cc: Made sure to set removed objects to zero. * usecode/intrinsics.cc: Intrinsics using Game_window::teleport_party were assuming an extra optional parameter; now they explicitly check for the presence of said parameter. * usecode/useval.h: In some cases, an Usecode array with no elements could get passed to Usecode_internal::get_item, resulting in an invalid value. 2011-09-28 Dominik Reichardt * shapes/pngio.cc: 'jmpbuf' has been deprecated for a long time and libpng >=1.5 will will give an error instead of a warning. 'png_jmpbuf' has been availlable before libpng 1.2 so it should be ok to use without an explicit check. 2011-09-16 Malignant Manor * exult.cc: remove unused variable in setup_video 2011-09-15 Dominik Reichardt * exult.cc: fix fullscreen toggle problem in setup_video function when using the TOGGLE_FULLSCREEN parameter 2011-03-16 Dominik Reichardt * audio/midi_drivers/CoreAudioMidiDriver.cpp: accepted patch #3214169 which adds soundfont loading to OS X' CoreAudio driver. Full path to soundfont needs to be in