Commit graph

31681 commits

Author SHA1 Message Date
Denis Kasak
0ff3c1945f Changed _screenWidth and _screenHeight from member variables to constants because the screen size doesn't change.
svn-id: r41620
2009-06-18 00:33:16 +00:00
Denis Kasak
efef9e4eff Added kNumColours constant and replaced magic numbers with it.
svn-id: r41617
2009-06-17 23:11:24 +00:00
Denis Kasak
1712db9112 Added default parameter to Screen::setPaletteEmpty() so it clears all colours by default.
svn-id: r41614
2009-06-17 21:29:05 +00:00
Denis Kasak
491800c19a Changed the _font DraciEngine member from a Font instance to a pointer to an instance. This way the default constructor is invoked in DraciEngine::init() and can properly initialize the fonts because the game data paths are set.
svn-id: r41612
2009-06-17 21:07:59 +00:00
Denis Kasak
17133fdfa0 Fixed typo.
svn-id: r41608
2009-06-17 14:31:21 +00:00
Eugene Sandulenko
569fe88041 Added prefices to safeguard defines in order to minimize risk of name clash.
svn-id: r41605
2009-06-17 05:18:48 +00:00
Denis Kasak
997b37eff1 Began work on the Screen class. Modified the demo animation to use the it.
svn-id: r41604
2009-06-17 04:48:48 +00:00
Denis Kasak
7420c1bfb6 Added include guards.
svn-id: r41600
2009-06-17 03:14:22 +00:00
Denis Kasak
8249d24a63 Changing font colour constants to an enum.
svn-id: r41553
2009-06-15 17:14:38 +00:00
Denis Kasak
ca7d400dc3 Submitting changes to DraciEngine::go() mentioned in the last commit but omitted by accident. Removed superfluous BArchive::closeArchive() calls.
svn-id: r41552
2009-06-15 17:12:21 +00:00
Denis Kasak
30ef3a1223 Added BArchive::isOpen() method. Modified DraciEngine::go() to use it. Updated BArchive docs.
svn-id: r41550
2009-06-15 17:08:39 +00:00
Denis Kasak
a8c784245c Fixed a memory leak in BArchive::openArchive(). A buffer wasn't being freed.
svn-id: r41535
2009-06-15 03:53:03 +00:00
Denis Kasak
ea3cf31938 Close a file after we're done using it.
svn-id: r41534
2009-06-15 03:50:45 +00:00
Denis Kasak
326cf7e735 Added support for DFW format archives. Rewrote some BArchive methods to be able to seamlessly handle both BAR and DFW archives. Modified the BAFile struct to support both types of files. Tested it by enabling the mouse in the event loop (the cursor was stored in a DFW file). Added and rewrote docs to reflect the changes.
svn-id: r41533
2009-06-15 03:48:16 +00:00
Denis Kasak
a3a9f5c790 Added const to reference parameters of Font::drawString() and Font::getStringWidth().
svn-id: r41530
2009-06-15 00:31:25 +00:00
Denis Kasak
910991ddde Converted default font colours from static members of Font to constants. Moved the initializer list of the Font constructor to the constructor body (for readability).
svn-id: r41529
2009-06-15 00:29:05 +00:00
Denis Kasak
b942082da4 Removed superfluous return from the Sprite constructor.
svn-id: r41525
2009-06-14 19:06:46 +00:00
Denis Kasak
718f84fb97 Added a Font _font variable to the engine instance. Fixed font colour handling by replacing the appropriate colours before drawing. Added Font::setColour() method for changing the current font colour. Added include guards to draci/font.h. Moved kFontBig and kFontSmall constants to draci/font.cpp to prevent redefinition errors.
svn-id: r41524
2009-06-14 18:59:31 +00:00
Denis Kasak
149b45f7a5 Renamed DraciFont class to Font to be more consistent with the rest of the classes and other engines.
svn-id: r41523
2009-06-14 16:33:20 +00:00
Denis Kasak
15a35e359d Changed DraciFont API to accept const Strings when loading fonts and added constants for font types.
svn-id: r41522
2009-06-14 16:21:44 +00:00
Denis Kasak
7e7e96e77d Replaced a call to getEventManager() with Engine::_eventMan.
svn-id: r41518
2009-06-14 14:12:28 +00:00
Eugene Sandulenko
f6f7a1e31a Whitespce fixes
svn-id: r41514
2009-06-14 13:51:07 +00:00
Eugene Sandulenko
682c272e53 Replace hackish getch() with proper event loop at end of the demo.
svn-id: r41513
2009-06-14 13:49:28 +00:00
Eugene Sandulenko
34d41f61aa Designate hack according to our conventions
svn-id: r41512
2009-06-14 13:41:12 +00:00
Denis Kasak
92dd6d5474 Reworded DraciFont docs (with regards to mentioning ASCII).
svn-id: r41511
2009-06-14 13:32:21 +00:00
Denis Kasak
d6ddbf7062 Removed superfluous checks for NULL in DraciFont::freeFont().
svn-id: r41510
2009-06-14 13:10:12 +00:00
Denis Kasak
b8ec907ea0 Added a Sprite class for handling sprites in the Draci format transparently. Modified the test animation to use it.
svn-id: r41509
2009-06-14 12:44:12 +00:00
Denis Kasak
02cd93421d Fixed evaluation of GPL mathematical expressions. The evaluator now checks that, at the end of the evaluation, the stack only contains one value (i.e. the result of the expression).
svn-id: r41477
2009-06-12 11:32:44 +00:00
Denis Kasak
fc22ab5748 Replaced a magic number with a proper constant.
svn-id: r41476
2009-06-12 10:39:33 +00:00
Denis Kasak
5808e4f940 Made DraciFont::drawString() return early if the string is too long to fit on the screen.
svn-id: r41475
2009-06-12 10:37:46 +00:00
Denis Kasak
837f76f61f Made DraciFont::drawString() take a String reference instead of a copy.
svn-id: r41472
2009-06-12 10:25:05 +00:00
Denis Kasak
32d12e90e3 Removed overflow/underflow checks from DraciFont::drawChar(). Instead, we now calculate the number of pixels that can be drawn without overflowing beforehand. Also added asserts to catch any negative value passed for the coordinates.
svn-id: r41471
2009-06-12 10:22:43 +00:00
Denis Kasak
2308748f01 Made the DraciFont::freeFont() method safe to call in any circumstance by making it check for NULL pointers itself to prevent double free / corruption. This also fixes a potential bug in the destructor.
svn-id: r41469
2009-06-12 09:52:35 +00:00
Denis Kasak
51672df700 Properly documented everything (including the new DraciFont class). Reshuffled some old comments.
svn-id: r41467
2009-06-12 09:45:12 +00:00
Denis Kasak
a36a9a0398 Implemented font handling via the DraciFont class. Reprogrammed the test animation to use the original game fonts. Removed the old drawString() hack.
svn-id: r41454
2009-06-11 20:31:36 +00:00
Denis Kasak
293d0ca65d Added support for the new GUI options.
svn-id: r41442
2009-06-11 01:50:10 +00:00
Denis Kasak
4a9ec62e04 Removed special-casing for the colour black as it's no longer needed.
svn-id: r41440
2009-06-10 21:28:16 +00:00
Denis Kasak
78c07b83f8 Shifted the palette one bit to the left aft toemake the dragon animation brighter.
svn-id: r41439
2009-06-10 21:18:14 +00:00
Denis Kasak
b91f93716a Code formatting
svn-id: r41438
2009-06-10 21:12:38 +00:00
Denis Kasak
2c00d65501 Added an additional debuglevel "archiver" to facilitate displaying debug info from the BAR archiver. Also adjusted numeric debug levels.
svn-id: r41436
2009-06-10 18:18:09 +00:00
Eugene Sandulenko
13dca9a176 Backport debugCN() as it is needed for Draci engine
svn-id: r41422
2009-06-10 10:28:43 +00:00
Denis Kasak
10b8d82baa Made handleMathExpression() properly handle mathematical expressions inside GPL bytecode (instead of just searching for the ending byte). The actual callbacks still need to be implemented.
svn-id: r41415
2009-06-10 02:59:53 +00:00
Denis Kasak
ba49e539d1 Redesigned the GPL2 disassembler to improve readability. It now does a linear search in a table of commands (instead of having a giant switch) when searching for the correct bytecode command.
svn-id: r41414
2009-06-10 01:35:47 +00:00
Eugene Sandulenko
2850023cf3 Enable Draci engine by default
svn-id: r41394
2009-06-09 05:25:23 +00:00
Denis Kasak
39a8c71f77 Adding Draci Historie engine skeleton (engine stub, BAR archiver, rudimentary GPL disassembler)
svn-id: r41390
2009-06-08 22:18:52 +00:00
Kari Salminen
cfae016200 Convert FWRenderer and OSRenderer to use Cine::Palette.
Also fix some bugs that came up in testing of Cine::Palette.

svn-id: r41386
2009-06-08 20:46:21 +00:00
John Willis
8b1a6b1b6d Virtual Keyboard: Add some quick changes to the virtual keyboard to activate submit and cancel events from the default lowercase keyboards. This makes it possible to cancel and submit without having to call Common::KEYCODE_F7 again. Sorry for the nasty (temp) graphics.
svn-id: r41385
2009-06-08 20:31:49 +00:00
Johannes Schickel
7f5b28ee83 - Cleanup
- Fix regression in Kyra1 outro

svn-id: r41384
2009-06-08 20:11:07 +00:00
Johannes Schickel
0f116f1c38 Cleanup.
svn-id: r41381
2009-06-08 18:30:28 +00:00
Fabio Battaglia
51d0005af3 sword1: slight cleanup of psx related sound code and comments
svn-id: r41380
2009-06-08 17:54:44 +00:00