Commit Graph
86814 Commits
Author SHA1 Message Date
Jody Northup 828ed66555 Reinstated static inline Graphics::PixelFormat::createFormatCLUT8(), which I am told was not supposed to be removed with the others.
svn-id: r42268
2009-07-08 16:07:58 +00:00
Filippos Karapetis 5ca94c5cce - Moved printObject inside the Console class
- Enabled the parts where disassemble() is called

svn-id: r42263
2009-07-08 13:08:51 +00:00
Filippos Karapetis d351c7b9cb Only the kernel needs to be initialized before anything else, when saving/loading
svn-id: r42262
2009-07-08 10:44:25 +00:00
Filippos Karapetis a764f274f8 Fixed saving/loading again (broken with the latest changes for game feature auto-detection)
svn-id: r42261
2009-07-08 10:35:51 +00:00
Filippos Karapetis 62499054a0 Some cleanup for the script debugger code:
- 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-08 10:25:37 +00:00
Filippos Karapetis 90422f6bd3 Added guards to only include the Shorten audio code when the SAGA2 code in the SAGA engine is enabled
svn-id: r42259
2009-07-08 07:28:13 +00:00
Filippos Karapetis 4e44217047 Also added the ENABLE_IHNM and ENABLE_SAGA2 preprocessor definitions to the scummvm project files, not only the saga project files
svn-id: r42258
2009-07-08 07:25:09 +00:00
Filippos Karapetis 570d157ff3 The ENABLE_* flags are only checked for *.cpp files in MSVC, so move the ENABLE_* checks to sjis.cpp to fix compilation under MSVC
svn-id: r42257
2009-07-08 07:13:56 +00:00
Filippos Karapetis c3a335aacb Updated the MSVC project files of the scummvm project (added graphics/sjis.*)
svn-id: r42256
2009-07-08 07:11:43 +00:00
Filippos Karapetis 4f39ef18c1 Synced the MSVC project files of the gob engine
svn-id: r42255
2009-07-08 07:09:03 +00:00
Denis Kasak 6b2991f488 Made Script::run() seek in SEEK_CUR mode when jumping instead of the default SEEK_SET. It also now checks whether there is a non-zero jump value set before doing the jump.
svn-id: r42254
2009-07-08 06:14:17 +00:00
Travis Howell 20ca572e45 Fix recent regression in vc61().
svn-id: r42252
2009-07-08 01:07:41 +00:00
Denis Kasak 0ec737db69 Stopped doing a screen update immediately after changing the palette. This caused a noisy effect when changing rooms because the palette was changed before the new scene was loaded.
svn-id: r42251
2009-07-08 00:48:03 +00:00
Denis Kasak 32d692aea6 Made the engine clear some more caches when it changes rooms (room, sprites and palette caches). Made the DraciEngine destructor delete the rooms, overlays and animations archives.
svn-id: r42250
2009-07-08 00:40:22 +00:00
Denis Kasak d8c33f6836 * Implemented GPL jumps
* Implemented c_If, c_Goto and c_Let opcodes
* Changed the interpreter to work with signed ints instead of uints (the interpreter uses negative values sometimes)
* Fixed documentation of Script::run() which said it is a disassembler (forgot to change it earlier)

svn-id: r42249
2009-07-08 00:34:53 +00:00
Travis Howell 3e47aaa151 Merged revisions 42205-42206,42208-42209,42211-42212,42214-42217,42219,42221-42222,42229-42235,42238-42240 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

........
  r42205 | dreammaster | 2009-07-07 17:41:02 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Removed the shooting workaround delay - the overlay number can vary, so it isn't a reliable way of identifying the specific message
........
  r42206 | thebluegr | 2009-07-07 17:44:25 +1000 (Tue, 07 Jul 2009) | 4 lines
  
  - Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA 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
........
  r42208 | strangerke | 2009-07-07 17:51:18 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Add detection of Playtoons 2 En
........
  r42209 | thebluegr | 2009-07-07 17:51:26 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Added a SCI1.1 case in the lofss opcode, like in the lofsa opcode (essentially, lofss and lofsa both load an offset, with lofsa loading it in the accumulator and lofss in the stack). lofss is rarely used in SCI1.1 games, which explains why no lofss-related crashes have been observed in SCI1.1
........
  r42211 | thebluegr | 2009-07-07 20:28:05 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Added auto-detection for games with older headers for script blocks, and removed game flag GF_SCI0_OLD
........
  r42212 | thebluegr | 2009-07-07 21:14:18 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Cleanup: added an enum for the auto-detected features, removed the selectors which are only used for auto-detection from the convenience selector map and placed feature auto-detection in a separate function. Also, now the automatically detected graphics resources are shown in the console.
........
  r42214 | strangerke | 2009-07-07 21:58:22 +1000 (Tue, 07 Jul 2009) | 2 lines
  
  - Separate Playtoons gametypes from  in GobEngine::initGameParts()
  - Add a specific save/load class for Playtoons as some specific files need to be tested
........
  r42215 | strangerke | 2009-07-07 22:03:27 +1000 (Tue, 07 Jul 2009) | 3 lines
  
  - Add a new gametype for 'The Land of the Magic Stones'
  - Add detection of the french version
  - Add a new game feature for 800*600
........
  r42216 | thebluegr | 2009-07-07 22:29:55 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Removed the superfluous sci_version_types array (it's essentially the same as the versionNames array)
........
  r42217 | strangerke | 2009-07-07 22:51:21 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Change SaveLoad_Playtoons case
........
  r42219 | thebluegr | 2009-07-07 23:39:24 +1000 (Tue, 07 Jul 2009) | 1 line
  
  Removed the weird checks for a maximum resource number (the 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).
........
  r42221 | lordhoto | 2009-07-08 00:22:23 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Add generic functionallity to draw FM-Towns ROM. (To be used by KYRA and SCI)
........
  r42222 | lordhoto | 2009-07-08 00:22:39 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Adapt KYRA to use the new Graphics::FontSJIS code.
........
  r42229 | sev | 2009-07-08 03:11:29 +1000 (Wed, 08 Jul 2009) | 2 lines
  
  kFeatures800 -> kFeatures800x600 in order to have more meaningful name
........
  r42230 | lordhoto | 2009-07-08 04:10:35 +1000 (Wed, 08 Jul 2009) | 2 lines
  
  - Added support for outlined FM-Towns ROM drawing
  - Adapted KYRA to use that
........
  r42231 | lordhoto | 2009-07-08 04:17:30 +1000 (Wed, 08 Jul 2009) | 2 lines
  
  - Rename FontSJIS::enableShadow to enableOutline.
  - Initialize outline to false by default in FontTowns.
........
  r42232 | lordhoto | 2009-07-08 05:00:39 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Change "FM-Towns" to "FM-TOWNS" for consistency.
........
  r42233 | lordhoto | 2009-07-08 05:00:51 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Add guards to only include SJIS font code, when KYRA or SCI is enabled.
........
  r42234 | lordhoto | 2009-07-08 05:18:32 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Simply compile guard of SJIS code and fix comment.
........
  r42235 | lordhoto | 2009-07-08 05:18:53 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Change all uses of FM-Towns/fm-towns to FM-TOWNS.
........
  r42238 | thebluegr | 2009-07-08 06:01:15 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Added a workaround for incorrect font references in LSL1VGA (which was the original purpose of the code removed in rev. 42219)
........
  r42239 | thebluegr | 2009-07-08 06:17:07 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Improved the LSL1VGA workaround after talking with waltervn
........
  r42240 | thebluegr | 2009-07-08 06:43:27 +1000 (Wed, 08 Jul 2009) | 1 line
  
  Silenced the very chatty song iterator console messages by converting them to appropriate debug messages
........

svn-id: r42248
2009-07-07 23:24:34 +00:00
Denis Kasak 68ec1350c0 Fixed two mismatched (de)allocations in BArchive and BAFile.
svn-id: r42247
2009-07-07 21:46:34 +00:00
Denis Kasak dd955bb08e * Made Game::_variables private and, instead, added Game::{get,set}Variable() methods.
* Removed obsolete comment about the cyclic field not being used in Game::loadAnimation()

svn-id: r42246
2009-07-07 21:30:36 +00:00
Denis Kasak bab9293f97 Implementend F_Not GPL function.
svn-id: r42245
2009-07-07 21:24:39 +00:00
Denis Kasak 586af0ab42 * From Game::GameObject removed the following _idxSeq, _numSeq, _animObj, _seqTab (not used anymore), added Common::Array<int> _anims.
* Handled cylic animations properly
* Handled the Z coordinate properly

svn-id: r42244
2009-07-07 21:18:28 +00:00
Denis Kasak 9246e9cf4a * Added some more animation debug info
* Reordered Animation::nextFrame() a bit to make sure the timings are correct (particularly the last frame)
* Added checks to AnimationManager::play() and AnimationManager::stop() so it doesn't dereference a null pointer.

svn-id: r42243
2009-07-07 21:11:36 +00:00
Denis Kasak b6b1402368 * Changed Game::_variables to public since the GPL interpreter needs to use it and made it int instead of uint16
* Implemented variable accessing by the math evaluator
* Fixed bug from previous commit (should have used && when checking for ending instructions, not ||)

svn-id: r42242
2009-07-07 20:57:14 +00:00
Denis Kasak 318d406242 Made GPL interpreter exit on both gplend and exit instructions.
svn-id: r42241
2009-07-07 20:46:26 +00:00
Filippos Karapetis a62b26ea80 Silenced the very chatty song iterator console messages by converting them to appropriate debug messages
svn-id: r42240
2009-07-07 20:43:27 +00:00
Filippos Karapetis ee15f8f51a Improved the LSL1VGA workaround after talking with waltervn
svn-id: r42239
2009-07-07 20:17:07 +00:00
Filippos Karapetis 802abfd8cb Added a workaround for incorrect font references in LSL1VGA (which was the original purpose of the code removed in rev. 42219)
svn-id: r42238
2009-07-07 20:01:15 +00:00
Denis Kasak d37d49e50c Removed testing hack from Game::init() that displayed the dragon in the upper left corner. Replaced some more instances of magic numbers with kDragonObject. Made Game::init() a bit more readable.
svn-id: r42237
2009-07-07 19:53:40 +00:00
Denis Kasak fd2ab9e3c0 Added enum constant for the dragon object (kDragonObject) and made Script::start() a bit more readable.
svn-id: r42236
2009-07-07 19:50:12 +00:00
Johannes Schickel 4dc454581c Change all uses of FM-Towns/fm-towns to FM-TOWNS.
svn-id: r42235
2009-07-07 19:18:53 +00:00
Johannes Schickel 832540f64f Simply compile guard of SJIS code and fix comment.
svn-id: r42234
2009-07-07 19:18:32 +00:00
Johannes Schickel 2a117d9a90 Add guards to only include SJIS font code, when KYRA or SCI is enabled.
svn-id: r42233
2009-07-07 19:00:51 +00:00
Johannes Schickel e35dd4df1c Change "FM-Towns" to "FM-TOWNS" for consistency.
svn-id: r42232
2009-07-07 19:00:39 +00:00
Johannes Schickel 8c65d4d4a9 - Rename FontSJIS::enableShadow to enableOutline.
- Initialize outline to false by default in FontTowns.

svn-id: r42231
2009-07-07 18:17:30 +00:00
Johannes Schickel 62eebc3e17 - Added support for outlined FM-Towns ROM drawing
- Adapted KYRA to use that

svn-id: r42230
2009-07-07 18:10:35 +00:00
Eugene Sandulenko 9bdf1a2ab1 kFeatures800 -> kFeatures800x600 in order to have more meaningful name
svn-id: r42229
2009-07-07 17:11:29 +00:00
Denis Kasak c258eefc82 Made AnimationManager::getAnimation() return NULL when an animation is not found instead of Common::List<>::end().
svn-id: r42228
2009-07-07 15:39:18 +00:00
Denis Kasak d519626c55 Added const keyword to "transparent" local variable in Sprite::draw() and removed leading underscore.
svn-id: r42227
2009-07-07 15:37:50 +00:00
Denis Kasak 4cfdf8c855 Shortened AnimationManager::{play,stop}(). Removed some excessive newlines.
svn-id: r42226
2009-07-07 15:35:35 +00:00
Denis Kasak 2e552bf643 Stopped running the room init scripts twice.
svn-id: r42225
2009-07-07 15:31:13 +00:00
Denis Kasak 7f3af129f2 mplemented changing rooms properly (overlays and objects' animations are deleted before a new room is loaded) and set up a quick demonstration (left click advances to the next room, right click goes back).
svn-id: r42224
2009-07-07 15:21:41 +00:00
Denis Kasak 82e6bcea2f * Added AnimationManager::deleteOverlays().
* Fixed bug in AnimationManager::deleteAnimation() that could result in accessing the Common::List::end() sentinel value.

svn-id: r42223
2009-07-07 14:52:36 +00:00
Johannes Schickel ec2c7cfefa Adapt KYRA to use the new Graphics::FontSJIS code.
svn-id: r42222
2009-07-07 14:22:39 +00:00
Johannes Schickel 8623081666 Add generic functionallity to draw FM-Towns ROM. (To be used by KYRA and SCI)
svn-id: r42221
2009-07-07 14:22:23 +00:00
Scott Thomas bd87b653ac Properly handle odd-sized JPEG files (ie, those not a multiple of 8 pixels)
svn-id: r42220
2009-07-07 14:04:18 +00:00
Filippos Karapetis ab8c3d56b8 Removed the weird checks for a maximum resource number (the 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-07 13:39:24 +00:00
Max Horn 131aaefa0c Don't #define M_PI in graphics/jpeg.h (it clashes with math.h, and it's bad style to #define constants in a header that you only use locally ;); instead use PI from common/scummsys.h
svn-id: r42218
2009-07-07 13:16:23 +00:00
Arnaud Boutonné 09efaaa1c9 Change SaveLoad_Playtoons case
svn-id: r42217
2009-07-07 12:51:21 +00:00
Filippos Karapetis 74670cc834 Removed the superfluous sci_version_types array (it's essentially the same as the versionNames array)
svn-id: r42216
2009-07-07 12:29:55 +00:00
Arnaud Boutonné add4d124b2 - Add a new gametype for 'The Land of the Magic Stones'
- Add detection of the french version
- Add a new game feature for 800*600

svn-id: r42215
2009-07-07 12:03:27 +00:00
Arnaud Boutonné a0ab8c9c0c - Separate Playtoons gametypes from in GobEngine::initGameParts()
- Add a specific save/load class for Playtoons as some specific files need to be tested

svn-id: r42214
2009-07-07 11:58:22 +00:00