aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sci.cpp
AgeCommit message (Collapse)Author
2009-08-18Removed the maxMemory parameter of the resource manager and replaced it with ↵Filippos Karapetis
a define svn-id: r43503
2009-08-17SCI: Add autodetection for DoSound. Cleanup.Walter van Niftrik
svn-id: r43482
2009-08-16SCI: Stage 1 of the game detection overhaul. The end goal is to autodetectWalter van Niftrik
as much as possible. All SCI_VERSION_* information was removed from detection.cpp (much of it was incorrect anyway). svn-id: r43449
2009-08-15SCI: Rename sci_version_t to SciVersionWalter van Niftrik
svn-id: r43407
2009-08-15SCI: Added enum for map and volume versions. Removed res_version setting fromWalter van Niftrik
detection.cpp (should be detectable). Cleanup. svn-id: r43390
2009-07-25Use new Common::String::printfWillem Jan Palenstijn
svn-id: r42744
2009-07-11Moved the kernel and the vocabulary outside of the engine state (they're ↵Filippos Karapetis
static data, which never changes during a game) svn-id: r42398
2009-07-08Some cleanup for the script debugger code:Filippos Karapetis
- Renamed struct DebugState to ScriptState and r_amp_rest to restAdjust inside EngineState. Changed restAdjust to be a uint16 (actually it is a uint16, but it was being casted back and forth from an unsigned integer, so this clears up its type and size) - Moved the script state variables from inside the run_vm() into the ScriptState struct, so that they can be accessed by the console commands and the script debugger all the time, and removed the weird isValid code svn-id: r42260
2009-07-07Added auto-detection for games with older headers for script blocks, and ↵Filippos Karapetis
removed game flag GF_SCI0_OLD svn-id: r42211
2009-07-07- Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA ↵Filippos Karapetis
has been removed and versions SCI_VERSION_01_EGA and SCI_VERSION_01_VGA have been merged into SCI_VERSION_01 - Simplified the checks for EGA and VGA graphics - Fixed a bug in script_adjust_opcode_formats() - Simplified the code in GfxResManager::getView() a bit svn-id: r42206
2009-07-07Prevent a crash when the engine errors out before the game state is initializedFilippos Karapetis
svn-id: r42201
2009-07-06Replaced sciprintf() calls with printf, DebugPrintf, warning and error callsFilippos Karapetis
svn-id: r42167
2009-07-05Merged the two SCI1 versions in one more fileFilippos Karapetis
svn-id: r42136
2009-07-05SCI1 games with absolute parameters to lofs instructions are automatically ↵Filippos Karapetis
detected now. Removed the GF_SCI1_LOFSABSOLUTE game flag svn-id: r42118
2009-07-04- Merged the "early" and "late" SCI1 versions - these are functionally ↵Filippos Karapetis
equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early") - Cleanup of the vocabulary setting functions - Cleanup of the cursor manipulation code svn-id: r42097
2009-07-04Newer DoSound() semantics are now detected automatically, by the existence ↵Filippos Karapetis
of the "setVol" selector. Removed game flag GF_SCI1_NEWDOSOUND svn-id: r42087
2009-07-03SCI0 games using older graphics functions are automatically detected now, ↵Filippos Karapetis
from the presence of the "TimesSin" and "SinMult" kernel functions. Removed the GF_SCI0_OLDGFXFUNCS game flag svn-id: r42081
2009-07-03- Pushed debugstate into debug.hFilippos Karapetis
- When an error occurs, manipulate the execution stack before error() opens the console inside getDebugger(), like FreeSCI did. Added another method for obtaining the SCI console for use by the engine itself. svn-id: r42062
2009-07-03Simplified the kernel name loading code: Merged the default SCI0 and SCI1 ↵Filippos Karapetis
kernel name tables in one table. vocab.999 is only used in SCI0 and SCI01 games if it exists as an override to the default kernel name table (which works with SCI0/SCI01 demos with no vocab.999, like KQ1 and xmas1998). Removed GF_SCI0_SCI1VOCAB. svn-id: r42050
2009-06-25After discussing with waltervn, committing my fix for the King's Quest I ↵Matthew Hoops
Demo (original from Patch #2795916). I'm also fixing the full game as well :) svn-id: r41841
2009-06-06Objectified the graphics driverFilippos Karapetis
svn-id: r41214
2009-06-04SCI: Renamed EngineState::flags and version to _flags and _version ↵Max Horn
(following our conventions); also slightly changed the EngineState constructor to init _version & _flags, and used this to make them constant svn-id: r41177
2009-06-03- Moved the engine state and the console to be private members of SciEngineFilippos Karapetis
- Implemented pauseEngineIntern() - Music now stops and resumes when entering/leaving the debugger svn-id: r41139
2009-06-02Moved some more console commands to ScummVM's debug consoleFilippos Karapetis
svn-id: r41126
2009-06-02Removed some unused variables from the engine stateFilippos Karapetis
svn-id: r41123
2009-05-31Removed script_error_flag and script_debug_flag, which were used to error ↵Filippos Karapetis
out if something went wrong and open the debugger console. Changed all the places where they were used to error() out instead, as ScummVM's debugger console can open on error() svn-id: r41073
2009-05-30- Removed debug_mode from the engine stateFilippos Karapetis
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function - Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND - Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables svn-id: r41033
2009-05-30SCI: Moved the rest of the console code out of sciconsole.cpp and into ↵Filippos Karapetis
console.cpp. "list" and "hexgrep" have been added to the console commands. parse_reg_t() has been moved to kmovement.cpp (as it's the only code using it). Note that the debug commands in scriptdebug.cpp have not been converted yet, so they don't work at the moment svn-id: r41024
2009-05-29- Moved some debug code into console.cpp, adding 3 console commands: ↵Filippos Karapetis
resource_types, sci0_palette and exit - Removed the "man" command - Removed the commands which set the SCI01 priority table flags and the crossblit alpha threshold (they're too specific, and not really useful anymore) - Removed some leftover debug code from gfxop_clear_box() svn-id: r41010
2009-05-29SCI: Converted several fprintf(stderr) calls to warning/error (the remaining ↵Max Horn
fprintf calls should probably be replaced by suitable debug/debugC/debugN invocations) svn-id: r40993
2009-05-29- Rewrote kSetCursor to be a bit simpler to understand, and got rid of ↵Filippos Karapetis
GF_SCI1_NEWSETCURSOR - Removed the 3 mouse pointer view, loop and cell variables (and their 3 "save" versions) from the game state, as they're all actually not used anywhere - Cleanup svn-id: r40976
2009-05-20removed trailing whitespacesMax Horn
svn-id: r40742
2009-05-18SCI: cleanupMax Horn
svn-id: r40689
2009-05-15- Moved all the files out of /sci/scicore and into /sciFilippos Karapetis
- Moved /scicore/sciconsole.h into /engine, and renamed /engine/scriptconsole.cpp to /engine/sciconsole.cpp svn-id: r40608
2009-05-15SCI: Keep a single copy of the versionNames array; this fixes warning about ↵Max Horn
it (well, one of its many copies) being unused svn-id: r40600
2009-05-15Simplified SCI versions to be SCI version generations, and fixed some game ↵Filippos Karapetis
entries in the process. Also, added a sanity check for invalid game entries svn-id: r40596
2009-05-14SCI: Stop SCI1.1 games from complaining about an 'invalid' savedir by ↵Max Horn
setting the savedir string to the only value our kValidPath considers valid, namely '/' svn-id: r40579
2009-05-14Fixed regression in EGA gamesFilippos Karapetis
svn-id: r40567
2009-05-14Added a parameter to the graphics resource manager to determine if the ↵Filippos Karapetis
running SCI1 game is VGA or not (better than modifying the detected SCI resource version) svn-id: r40566
2009-05-14Added the EGA version of Longbow, and partially reverted my previous commit. ↵Filippos Karapetis
SCI1 EGA games should *really* be working now svn-id: r40565
2009-05-14Started using game-specific flags and removed/replaced some SCI version ↵Filippos Karapetis
checks with flags. - The SCI0 new script header and the angles check have been replaced by the GF_SCI0_OLD flag - The SCI0 new drawpic parameter and the new priority check have been replaced by the GF_SCI0_OLDGFXFUNCS flag - Removed the code which retries to use the newer script header in SCI0 games if the detected one is wrong, as that case should be covered by the GF_SCI0_OLD flag - Removed the leftover min_version and max_version variables from gamestate - Cleaned up kGetTime() a bit svn-id: r40552
2009-05-11SCI: Hacked stuff up so that debugger commands also print on the GUI consoleMax Horn
svn-id: r40460
2009-05-11SCI: Replace global vars cmd_paramlength & cmd_params by ↵Max Horn
Common::Array<cmd_param_t> param to console hook commands svn-id: r40452
2009-05-11SCI: Reduced header depsMax Horn
svn-id: r40451
2009-04-27SCI: Removed unused vars; doxygenified some comments; cleanupMax Horn
svn-id: r40159
2009-04-27SCI: Renamed gfx_state_t -> GfxStateMax Horn
svn-id: r40155
2009-04-21Restored the ability to change the active port bound, by moving it inside ↵Filippos Karapetis
gfx_state_t (it makes much more sense for it to be there, instead of inside user-defined settings). Placed notes inside gfxr_draw_pic01() and gfxr_draw_pic11() for the usage of the current titlebar size in there svn-id: r40057
2009-04-07Print out the SCI interpreter version and not the resource version when ↵Matthew Hoops
saying what version we're emulating svn-id: r39892
2009-04-02pic_port_bounds was only set from command-line parameters it seems, so it's ↵Filippos Karapetis
safe to put it together with the rest of the options svn-id: r39800
2009-04-01- Wrapped all the code for custom graphics options around a ↵Filippos Karapetis
CUSTOM_GRAPHICS_OPTIONS define. Most of these options don't work in 256-color mode, plus there is currently no way to actually set/change them somehow (other than modifying the code) - Added a FIXME for the abuse of the pic_port_bounds graphics option - it's actually set by the game itself in kSetPort() - Added some test code for setting palette intensity in KPalette() (currently disabled) svn-id: r39794