aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/game.cpp
AgeCommit message (Collapse)Author
2009-09-12- Made obj_get and obj_get_name methods of SegManager (getObject and ↵Filippos Karapetis
getObjectName, respectively) - Renamed alloc_List -> allocateList, alloc_Node->allocateNode, alloc_hunk_entry->allocateHunkEntry, free_hunk_entry->freeHunkEntry, for consistency svn-id: r44039
2009-09-06SCI: Rename SegManager::exports_wide to _exportsAreWide and changed it to a ↵Max Horn
bool, and rename setExportWidth() to setExportAreWide() svn-id: r43988
2009-09-06SCI: Cleanup for some SegManager internalsMax Horn
- rename segGet and getSegment to getScriptSegment; the two can be distinguished by the parameter count. - rename type SCRIPT_GET to ScriptLoadType to conform with our code formatting conventions - rename get_class_address to getClassAddress - some cleanup svn-id: r43981
2009-09-02Some renaming:Filippos Karapetis
getresourceManager -> getResourceManger resourceManager -> resMan segmentManager ->segMan svn-id: r43908
2009-09-01- Reverted the *vga targets back to *sci, and used the extras field again ↵Filippos Karapetis
for VGA remakes - The extras field is now filled by the fallback detector for VGA games svn-id: r43893
2009-09-01- Added MD5's for the 5 different Crazy Nick's collectionsFilippos Karapetis
- Added the MD5's of the French versions of GK2 and SQ6 (bug reports #2846842 and #2846515) - Added a different game id for QFG1 VGA (SCI1.1), to distinguish it from the older EGA version (SCI0) and added detection for the VGA version in the fallback detector - Changed some VGA SCI game IDs: lsl1sci -> lsl1vga, pq1sci -> pq1vga, sq1sci -> sq1vga, to distinguish SCI VGA remakes from SCI EGA remakes (like with QFG1VGA) svn-id: r43891
2009-09-01- Moved the Sierra game ID conversion code inside game.cpp, so that any ↵Filippos Karapetis
game-specific workarounds are tested against ScummVM IDs - Added detection for the EcoQuest 1 demo in the fallback detector - Partially reverted my previous "fix" for EcoQuest 1 CD, and turned it into a script-specific hack for that game, for now - Added handling of kDisposeScript calls made with 2 parameters, e.g. in KQ5CD and others (still untested, haven't found a test case) svn-id: r43887
2009-08-31Removed many bogus return values in the SCI graphics functions - some ↵Filippos Karapetis
functions always returned "true", whereas in others they errored out in fatal conditions before any value was returned. FreeSCI was returning values from the graphics drivers it used. In ScummVM, we have one graphics driver, and we error out in fatal conditions anyway, so these error checks are no longer necessary, and the resulting code looks much neater svn-id: r43851
2009-08-30SCI: Add lofs detection.Walter van Niftrik
svn-id: r43824
2009-08-25- Simplified the parameters of some functionsFilippos Karapetis
- Replaced some EngineState parameters - The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions - Plugged 2 leaks in the fallback detector - Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency svn-id: r43722
2009-08-23- Added more mappings from Sierra's internal IDs to our own ones. Hopefully, ↵Filippos Karapetis
all SCI0-SCI11 games can now be detected correctly from the fallback detector - Simplified some checks for old script types svn-id: r43678
2009-08-19SCI: Add partial support for Amiga SCI1 games.Walter van Niftrik
svn-id: r43549
2009-08-18- Added game ID detection to the fallback detector. We still need to map ↵Filippos Karapetis
some of Sierra's internal IDs to our own ones - The class table is now created in the segment manager constructor svn-id: r43504
2009-08-17- Simplified some functions to accept only the parts of the EngineState they ↵Filippos Karapetis
need as parameters, instead of the whole EngineState - Moved the class table in the Segment manager - it's the only class using it directly - Removed the sci11 flag from save games (we already know this, we don't need to store it) - Moved script_get_segment() and get_class_address() inside the segment manager class - Removed the script_locate_by_segment wrapper - Simplified script_lookup_export() a lot by removing some paranoia checks - Added some WIP code for automatically determining the game id in the fallback detector (still not working) - General cleanup svn-id: r43458
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: Added enum for map and volume versions. Removed res_version setting fromWalter van Niftrik
detection.cpp (should be detectable). Cleanup. svn-id: r43390
2009-08-10SCI: Improved multilanguage support for SCI1 and SCI1.1.Walter van Niftrik
svn-id: r43217
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-07Removed the weird checks for a maximum resource number (the ↵Filippos Karapetis
sci_max_resource_nr array), as it doesn't serve any real purpose and leads to strange errors: if a resource is found which is bigger than the maximum number, it will be remapped to an incorrect number from this check. This makes KQ5CD work properly again (resources would be remapped to incorrect resource numbers from this code as a result of not updating this array with the latest SCI version merges). svn-id: r42219
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-06Renamed SCI_VERSION_01 -> SCI_VERSION_01_EGAFilippos Karapetis
svn-id: r42181
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-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-06-07SCI: Moved resource36 handling into resource manager.Walter van Niftrik
svn-id: r41349
2009-06-06Moved some more debug commands to ScummVM's coneoleFilippos Karapetis
svn-id: r41227
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-02Removed the gfxw_new_visual and gfxw_new_port wrappers, moved _kfuncTable ↵Filippos Karapetis
inside the Kernel class and moved gfxw_find_port inside the GfxVisual struct svn-id: r41125
2009-06-02Removed some unused variables from the engine stateFilippos Karapetis
svn-id: r41123
2009-06-01Some fixes for saving/loading (still broken)Filippos Karapetis
svn-id: r41102
2009-06-01Split the kernel functions away from the vocabulary functions (WIP, ↵Filippos Karapetis
saving/loading is broken) svn-id: r41101
2009-05-31Further objectification of the SCI vocabulary functions. Removed the ↵Filippos Karapetis
"kernel_words" console command, as it's exactly the same as "parser_words" svn-id: r41065
2009-05-31More objectification of the Vocabulary functionsFilippos Karapetis
svn-id: r41057
2009-05-30Started objectifying the vocabulary functions (WIP)Filippos Karapetis
svn-id: r41051
2009-05-30- Moved 3 more commands to console.cpp: "draw_pic", "draw_rect" and ↵Filippos Karapetis
"fill_screen" - Removed some FreeSCI-specific variables for checking of the on-screen console - Removed the Control-1 key combo - the console command "visual_state" can be used for the same reason svn-id: r41040
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-30Moved 3 more debug commands to console.cpp ("simkey", "segment_table" and ↵Filippos Karapetis
"show_map") and removed the GFXWC macro. Some cleanup svn-id: r41032
2009-05-30Moved some script debug commands to console.cpp: "clear_screen", ↵Filippos Karapetis
"redraw_screen", "save_game", "restore_game", "restart_game", "class_table", "parser_words", "current_port" and "parse_grammar" svn-id: r41029
2009-05-29- Fixed usage of kSetCursor in SCI1.1 games (e.g. when starting KQ6 floppy)Filippos Karapetis
- Removed a static variable (vocab_version) - vocab.996 is now freed after creating the class table in SCI1 games, like in SCI0 games svn-id: r40979
2009-05-29Moved the "size" console debugger command to console.cpp and silenced a warningFilippos Karapetis
svn-id: r40978
2009-05-29CleanupFilippos Karapetis
svn-id: r40977
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-28SCI: Turned SfxState into a proper class (i.e., convert the sfx_ funcs to ↵Max Horn
member methods) svn-id: r40973
2009-05-28SCI: Renamed sfx_state_t -> SfxState, preparing it to become a class eventuallyMax Horn
svn-id: r40958
2009-05-27Fixed a typo, and added parentheses to clarify orderFilippos Karapetis
svn-id: r40938
2009-05-26SCI: Merged vocab_debug.cpp into vocabulary.cpp; cleanupMax Horn
svn-id: r40915
2009-05-26Turned some static tables into static const tables; added some FIXME ↵Max Horn
comments to global static vars that should be removed (many more exist in SCI, Tinsel, and some other engines) svn-id: r40908
2009-05-21SCI: Removed the 'save_dir' gui hackMax Horn
svn-id: r40772
2009-05-21Removed the PREG, PSTK, IS_NULL_REG and REG_EQ definesFilippos Karapetis
svn-id: r40767