aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/debugger.cpp
AgeCommit message (Collapse)Author
2018-06-03SCUMM: Improve 'imuse play' debugger command error handlingAdrian Frühwirth
This commit introduces the following (seemingly non-invasive) changes to make the 'imuse play' debugger command more useful (i.e. don't crash when trying to load the wrong kind of (sound) resource. * ScummEngine::readSoundResource() Instead of fatally error()'ing upon hitting a non-sound resource type, e.g. a room header (0x524d4844 aka RMHD), we now only issue a warning(). This enables the already existing dead code which properly returns 0 (aka no resource loaded). * ResourceManager::validateResource() Instead of fatally error()'ing upon hitting an illegal glob type we now only issue a warning() and return false (also existing dead code). All methods calling validateResource() check its return value so this seems like the right thing to do anyway. * ScummDebugger::Cmd_IMuse() Instead of directly calling ensureResourceLoaded() we now call getResourceAddress() instead (which in turn calls ensureResourceLoaded() and handles other edge cases) and only attempt to play a sound if the returned pointer actually is valid. Fixes Trac#10527.
2016-07-02SCUMM: Add actor/object names to debug outputOri Avtalion
2015-03-22SCUMM: Fix argc check in Cmd_Script()Torbjörn Andersson
2014-05-27ALL: Introduce typesafe Debugger::registerVar functions.Johannes Schickel
This also adds a FIXME to SCI which registered an enum type as int...
2014-05-27ALL: Make Debugger command function names conform to our guidelines.Johannes Schickel
2014-05-27ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd.Johannes Schickel
2014-05-27ALL: Rename Debugger::DVar_Register to Debugger::registerVar.Johannes Schickel
2014-05-27ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf.Johannes Schickel
2014-05-13SCUMM: Remove "level" command from debugger. Replaced by "debuglevel".D G Turner
This required a small amount of extra code changes to ensure that _debugMode is kept in sync when the debugger is used to change the level.
2014-02-18SCUMM: Make GPL headers consistent in themselves.Johannes Schickel
2013-08-04SCUMM: Fix Loom (and some other graphics regressions).Johannes Schickel
These are regressions from c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038. They were caused by VirtualScreen::getPixels differing from Surface::getBasePtr and I accidently used the former in some cases in the conversion. I also fixed a bug in debugger.cpp which exchanged x and y.
2013-08-03SCUMM: Prefer getBasePtr over direct Surface::pixels access.Johannes Schickel
2012-11-16SCUMM: Fix the "drafts" debugger command for Mac LoomTorbjörn Andersson
Mac Loom's drafts appear to be stored from variable 55 and upwards. I'm working under the assumption that there's either only one version of Loom for the Mac, or that they all behave the same. I could be wrong about that.
2012-11-16SCUMM: Remove obsolete part of the "drafts" debugger commandTorbjörn Andersson
It was never quite clear exactly what "drafts fix" did. It wasn't guaranteed to work on all versions of Loom - or at all - and I haven't heard any reports about the data structure getting corrupted for years.
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-02-11SCUMM: Fix actor ID handling in v0Tobias Gunkel
Some object functions allow actor IDs and object IDs as parameters. They are easily distinguishable in engines > 0 as actor IDs are < _numActors and object IDs are bigger. In v0 this is not the case as there are objects with IDs like 3 and 5 (e.g. the hamster). So object ID handling was unified for v0 and the other engines by introducing objIsActor(), objToActor() and ActorToObj().
2012-02-11SCUMM: merge object v0 id and type into one object varTobias Gunkel
2012-02-11SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectTypeTobias Gunkel
2012-02-11SCUMM: fix debugger for v0Tobias Gunkel
2011-11-03SCUMM: Fix copy/paste errorsEugene Sandulenko
2011-05-14SCUMM: Show actor visible height in debuggerMax Horn
2011-05-13SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its ↵Max Horn
_resource member
2011-05-13SCUMM: Remove ResTypeData::_numMax Horn
2011-05-13SCUMM: Rename ResTypeData::num to _numMax Horn
2011-05-13SCUMM: Refactor how resource (types) are srepresentedMax Horn
Previously, we had a couple of arrays of size N (where N = number of resource types), one for each attribute of a resource type (such as as the number of resources of that type. Now, we have one array of size N, whose elements are a record aggregating all the attributes of each resource type.
2011-05-13SCUMM: Move class ResourceManager to its own headerMax Horn
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-28JANITORIAL: Reduce header dependencies in shared codeOri Avtalion
Some backends may break as I only compiled SDL
2011-04-04SCUMM: Extend debug command 'object' to allow querying stateMax Horn
2011-02-07ALL: Fix whitespaces / indentionMax Horn
svn-id: r55818
2010-12-07DEBUG: Let GUI::Debugger::preEnter and postEnter (un)pause the engineMax Horn
svn-id: r54815
2010-10-25SCUMM: Move class Player_V2CMS to its own header fileMax Horn
svn-id: r53829
2010-10-24ALL: Fix various typos (patch #3093266)Max Horn
svn-id: r53762
2010-10-18SCUMM: Fix parts of bug #3087898 (SCUMM: Code analysis warnings)Max Horn
svn-id: r53567
2010-07-17DEBUGGER: Simplify how our console debugger works / is usedMax Horn
* Remove _isAttached member var and isAttached method * Engines now always call the onFrame method; whether it does something is decided by the debugger class resp. its subclasses * Make detach() protected instead of private, so that subclasses can invoke it * Remove _detach_now member var (call detach() instead). * Rename _frame_countdown to _frameCountdown and properly document it. * Add more doxygen comments * Cleanup svn-id: r50963
2010-05-25Patch #2959341: Minor update to SCUMM debugger command 'passcode'Eugene Sandulenko
svn-id: r49221
2010-05-04Move DebugChannel related code to new headerMax Horn
svn-id: r48935
2010-04-27COMMON: Move DebugChannel stuff into a new DebugMan singletonMax Horn
svn-id: r48821
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2009-12-23Patch #2895458: "SCUMM: Add support for SEGA-CD MI Passcodes"Eugene Sandulenko
svn-id: r46516
2009-10-24Made the "drafts" debugger command work with the PC-Engine version. The draftsTorbjörn Andersson
appear to be stored in the same variables as in the DOS CD version. Other than that, I only have the DOS floppy version, so other versions still may or may not work as intended. svn-id: r45358
2009-09-29Add newline after "Available debug channels" in Cmd_Debug, now all debug ↵Johannes Schickel
channels will be listed in separate lines. svn-id: r44463
2009-05-24Strip trailing whitespaces in the whole code base.Johannes Schickel
svn-id: r40867
2009-03-09Rewrote Common::List iterator code to ensure const correctness is preserved.Max Horn
We tried to implement the list iterators in a clever way, to reduce code duplication. But this is essentially impossible to do properly, sadly -- this is one of the places where the ugly drawbacks of C++ really show. As a consequence, our implementation had a bug which allowed one to convert any const_iterator to an iterator, thus allowing modifying elements of const lists. This rewrite reintroduces code duplication but at least ensures that no const list is written to accidentally. Also fix some places which incorrectly used iterator instead of const_iterator or (in the kyra code) accidentally wrote into a const list. svn-id: r39279
2009-02-17clarify scumm debugger error messageWillem Jan Palenstijn
svn-id: r38439
2009-01-30Renamed SpecialDebugLevel to DebugChannelMax Horn
svn-id: r36142
2009-01-30Some more 'special debug levels' tweaksMax Horn
svn-id: r36140
2009-01-30Some work on the 'special debug levels' aka 'engine debug levels' codeMax Horn
svn-id: r36139
2008-11-16Fixed various g++ warnings ("format not a string literal and no format ↵Johannes Schickel
arguments"). svn-id: r35096
2008-11-13* got rid of CDECLMax Horn
* got rid of scumm_strrev * added DISABLE_TEXT_CONSOLE flag which disables printf, warning, debug (but not error) svn-id: r35038