Commit graph

105 commits

Author SHA1 Message Date
Filippos Karapetis
522b161bec Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
2009-07-06 10:39:22 +00:00
Filippos Karapetis
6fa8541aed - Pushed debugstate into debug.h
- 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-03 14:22:50 +00:00
Max Horn
a6b57dc3a9 - Added GCC_PRINTF attribute to several funcs where it makes sense
- change some constants from double to float, to avoid "loss of precision due to implicit conversion" warnings
- removed duplicate prototypes for some funcs
- fixed some "increases required alignment of target type" warnings

svn-id: r42009
2009-07-01 20:51:04 +00:00
Filippos Karapetis
60f5ac3300 Replaced GFXWARN with warning and GFXDEBUG with debugC
svn-id: r41367
2009-06-08 11:42:13 +00:00
Johannes Schickel
22ab4cc4c4 Fix unused variable warnings.
svn-id: r41231
2009-06-06 17:10:15 +00:00
Filippos Karapetis
26b03dd359 Some uint8 -> byte conversions
svn-id: r41216
2009-06-06 10:40:32 +00:00
Filippos Karapetis
8033a39128 Objectified the graphics driver
svn-id: r41214
2009-06-06 10:21:48 +00:00
Filippos Karapetis
24cb130b26 Removed some unused code and performed some cleanup
svn-id: r41197
2009-06-05 18:05:45 +00:00
Filippos Karapetis
70effa46e5 Reordered the numpad keys so that they make more sense, and simplified the code which returns the values of shifted function keys
svn-id: r41155
2009-06-04 08:28:20 +00:00
Filippos Karapetis
317da8756e - Moved the engine state and the console to be private members of SciEngine
- Implemented pauseEngineIntern()
- Music now stops and resumes when entering/leaving the debugger

svn-id: r41139
2009-06-03 14:09:25 +00:00
Filippos Karapetis
780926991e Moved some more console commands to ScummVM's debug console
svn-id: r41126
2009-06-02 19:03:43 +00:00
Torbjörn Andersson
0999534749 The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
2009-05-31 10:02:16 +00:00
Johannes Schickel
abe8cf0625 Typo.
svn-id: r41054
2009-05-31 01:11:06 +00:00
Max Horn
70a04c8b51 SCI: Made vocab_version static again (a global static var is bad, but a really global var is worse); also clarified some FIXME comments that we want to avoid *any* non-const global var, no matter whether it is static or not
svn-id: r41045
2009-05-30 20:37:33 +00:00
Filippos Karapetis
b1997801da - Moved some debug code into console.cpp, adding 3 console commands: 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-29 17:19:39 +00:00
Max Horn
813853ccc2 SCI: Converted several fprintf(stderr) calls to warning/error (the remaining fprintf calls should probably be replaced by suitable debug/debugC/debugN invocations)
svn-id: r40993
2009-05-29 13:07:14 +00:00
Filippos Karapetis
e9444e2b93 - Rewrote kSetCursor to be a bit simpler to understand, and got rid of 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-29 08:25:42 +00:00
Willem Jan Palenstijn
183c9e56ed SCI: Only let gfxop_set_color use priority/control if mask has their bits set.
This fixes a regression from r39089 where text in the KQ5(floppy) intro
was displayed behind trees.

svn-id: r40893
2009-05-25 19:48:52 +00:00
Willem Jan Palenstijn
fd0578f151 SCI: reset system palette when loading a new PIC.
This improves the colours of background images, but is still partially
broken. The mouse cursor becomes transparent when changing scenes, and
there is a brief moment of palette corruption between scenes.

svn-id: r40870
2009-05-24 18:41:19 +00:00
Willem Jan Palenstijn
725ff24170 SCI: re-xlate pixmap when palette revision changed
svn-id: r40859
2009-05-24 12:56:06 +00:00
Max Horn
bba91075bf removed trailing whitespaces
svn-id: r40742
2009-05-20 17:53:31 +00:00
Filippos Karapetis
78bf8c490d Reverted the SQ5 change introduced with commit #40574, as this makes the mouse cursor invisible in games which have multicolored cursors
svn-id: r40605
2009-05-15 12:41:27 +00:00
Filippos Karapetis
61d9a42c56 Fixed the detection entry for SQ3 Amiga, and added a special case for cursor hiding in SQ5
svn-id: r40574
2009-05-14 21:51:36 +00:00
Filippos Karapetis
443aacee79 Added a parameter to the graphics resource manager to determine if the running SCI1 game is VGA or not (better than modifying the detected SCI resource version)
svn-id: r40566
2009-05-14 19:33:03 +00:00
Filippos Karapetis
e940bcff23 - Simplified SCI version detection a bit and clarified the different version feature flags (not used yet)
- Removed the version verification functions (they were only used for two specific cases, but the SCI executable reader is able to detect the exact SCI game version anyway, so there is no point in having these)
- Removed the empty GameFlags structure and replaced it with a 32-bit integer instead

svn-id: r40524
2009-05-13 16:52:41 +00:00
Max Horn
0255cd0213 SCI: Removed sci_memory.h/.cpp
svn-id: r40514
2009-05-12 23:30:10 +00:00
Max Horn
7c75e8e2ef SCI: Reduced header deps
svn-id: r40451
2009-05-11 13:31:17 +00:00
Max Horn
de114d3d52 SCI: Got rid of code for endian adjusting pixmaps
svn-id: r40387
2009-05-08 16:02:22 +00:00
Max Horn
e34c6316c6 SCI: Replaced gfx_driver_t::set_palette and install_palette by directly invoking their OSystem counterparts
svn-id: r40385
2009-05-08 16:00:39 +00:00
Max Horn
e6a7b8ef34 SCI: Renamed text_fragment_t -> TextFragment and changed TextHandle to store the text fragments and pixmaps in Common::Arrays
svn-id: r40178
2009-04-28 12:32:59 +00:00
Max Horn
6322478508 SCI: renamed gfx_text_handle_t -> TextHandle; changed some string code to use Common::String
svn-id: r40162
2009-04-27 14:21:39 +00:00
Max Horn
356288ce8d SCI: Rewrote dirty rect code to use Common::List
svn-id: r40156
2009-04-27 11:12:25 +00:00
Max Horn
b73301748a SCI: Renamed gfx_state_t -> GfxState
svn-id: r40155
2009-04-27 11:12:08 +00:00
Walter van Niftrik
c0805599ca SCI: Fixed mouse cursor hotspots in ECO1.
svn-id: r40110
2009-04-24 12:30:57 +00:00
Max Horn
6fef323ec7 SCI: Changed GFXERROR to be fatal
svn-id: r40102
2009-04-24 10:44:10 +00:00
Filippos Karapetis
78f892f87c The mouse cursor is now working in Eco Quest 1, though the hotspot is still wrong. Many thanks to waltervn for his findings on this.
svn-id: r40095
2009-04-23 20:37:41 +00:00
Filippos Karapetis
20cc4f3dd7 Restored the ability to change the active port bound, by moving it inside 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-21 19:57:11 +00:00
Filippos Karapetis
1e8bd16c1e - Wrapped all the code for custom graphics options around a 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
2009-04-01 20:32:45 +00:00
Filippos Karapetis
a3a7893f16 Changed the font flag defines to an enumeration
svn-id: r39690
2009-03-25 17:51:22 +00:00
Filippos Karapetis
a6f49a636b - Moved palette initialization inside the graphics resource manager
- The static palette is no longer needlessly referenced directly outside the graphics resource manager
- Moved the SCI interpreter version inside the graphics resource manager, instead of gfx_state_t

svn-id: r39626
2009-03-23 08:43:53 +00:00
Filippos Karapetis
e3f9acc3e6 Further objectification of the graphics resource manager
svn-id: r39621
2009-03-22 23:11:43 +00:00
Max Horn
277b8e6190 SCI: Fixed nasty bug in simulate_stippled_line_draw, caught only thanks to warnings by the Wii compiler.
svn-id: r39616
2009-03-22 22:02:25 +00:00
Filippos Karapetis
3d5ad1e6a3 Cleaned up gfxop_draw_rectangle(). Also, removed a check insode BASIC_CHECKS() which is impossible to occur
svn-id: r39540
2009-03-19 21:27:01 +00:00
Filippos Karapetis
11601f88e1 Fixed issues with commit #39449, fixing some graphical glitches with the GUI widgets
svn-id: r39534
2009-03-19 19:52:05 +00:00
Filippos Karapetis
c9eff6e1f8 Cleaned up graphics initialization a bit
svn-id: r39513
2009-03-18 11:07:29 +00:00
Filippos Karapetis
b670070c6c Cleanup
svn-id: r39506
2009-03-18 07:59:46 +00:00
Filippos Karapetis
e546c60948 Further objectification of the graphics resource manager
svn-id: r39499
2009-03-17 23:30:57 +00:00
Johannes Schickel
4edee56b3f Fix warning.
svn-id: r39498
2009-03-17 22:56:20 +00:00
Filippos Karapetis
063ce3938d Started objectifying the graphics resource manager (refer to patch #2689887)
svn-id: r39492
2009-03-17 21:08:33 +00:00
Filippos Karapetis
0e8dfe09c9 Replaced some rect_t operations with our common ones. For now, two helper functions are used to easily change types between Common::Rect and rect_t, until rect_t is removed
svn-id: r39449
2009-03-16 15:36:09 +00:00