aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_draw.h
AgeCommit message (Collapse)Author
2005-01-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
2004-07-26I shouldn't be mixing cleanups and bug fixes, but I'm doing so anyway, justTorbjörn Andersson
this once. :-) The parameters to drawLine() aren't clipped to the screen size, which meant that it was accessing memory out of bounds when marking the screen as dirty. The function now uses plotPoint(), which does the bounds checking and screen dirtying for us. Apart from being a little easier to read, it dirties only the parts of the screen the line actually passes through, instead of a rectangle defined by the line's end points. Since drawLine() is only used for debugging, I wouldn't consider this a particularly serious bug. Next change is that only the pixels inside the original parallax layer are considered when creating the block surfaces. This may make the drawing slightly more efficient, since fewer surfaces will be labelled as transparent. Plus some other minor cleanups. svn-id: r14340
2004-06-17Itsy-bitsy cleanup.Torbjörn Andersson
svn-id: r13959
2004-06-09Cleaned up the palette handling a bit. Renamed _palCopy to _palette since ITorbjörn Andersson
found the old name misleading (there is only one array that stores the palette in the engine, though it could be argued that it's a copy of the one used by the backend), and removed some code that I'm almost certain was never used. (I've added assert()s to trigger in the cases where it would have been used.) svn-id: r13949
2004-06-06Cleaned up sprite scaling.Torbjörn Andersson
svn-id: r13944
2004-05-09When drawing lines and points, mark the corresponding screen area as dirtyTorbjörn Andersson
so that it gets properly redrawn. Only the debugging code uses these drawing primitives, so it's no big deal, but it's still the right thing to do. svn-id: r13811
2004-05-05Take advantage of the changes in the backend's mouse cursor handling. ItTorbjörn Andersson
didn't do the change I was hoping for: the coyote stone is still partially see-through, but perhaps it was in the original as well. At least we no longer need to keep the buffer the mouse cursor is decoded to, since that's now handled by the backend. svn-id: r13782
2004-04-23Major revamping of the BS2 memory manager and, some small changes to theTorbjörn Andersson
resource manager. All new code! All new bugs! svn-id: r13603
2004-03-24Use the binary .pal file format that was introduced for 0.6.0.Torbjörn Andersson
Invalidate the lookup table when the screen changes. (TODO: We also have to invalidate it if the change happens between cutscenes, don't we?) Some cleanup, particularly in the BS2 cutscene player. More needed, I guess... svn-id: r13377
2004-01-17Update BS2 cutscene player with changes from roever: overlay support ↵James Brown
(default, 8bit backends should define BACKEND_8BIT for fast colour remapping) and sound syncronisation. svn-id: r12456
2004-01-13cut down pointless header interdependenciesMax Horn
svn-id: r12360
2004-01-13Moved the rest of the MoviePlayer class into animation.cpp/.h, plus someTorbjörn Andersson
minor cleanups. (Mostly spacing and indentation). Unfortunately the Ogg Vorbis playback causes ScummVM to crash for me, so I can't say for certain that I didn't break anything. svn-id: r12356
2004-01-13added legal header; fixed incorrect fscanf use; C++ification (the code still ↵Max Horn
is quite Cish, though :-) svn-id: r12351
2004-01-12- whitespacesPaweł Kołodziejski
- fix for compilation at MAX, at include types - changed to our types svn-id: r12344
2004-01-12Initial libmpeg2 cutscene support based on patch #874510.James Brown
Pre-converted cutscenes w/ palette files available - ask LeChuck about Cutscenes :) svn-id: r12338
2004-01-09Fix a harmless clipping bug (block surfaces were drawn even when theirTorbjörn Andersson
width or height was 0), and use consistent naming for clip rect parameters. svn-id: r12272
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2004-01-04Adapted LavosSpawn's idea for more efficient screen updating. It stillTorbjörn Andersson
renders the entire screen every frame, but it tries to update (i.e. copy to the backend) only the parts of the screen that actually changed. At least approximately so. svn-id: r12142
2003-12-28Hopefully the last big renaming. Now the datatypes have names likeTorbjörn Andersson
"StandardHeader" instead of "_standardHeader". svn-id: r11997
2003-11-16More cleanup. I've eliminated all the temporary global variables I've addedTorbjörn Andersson
over the past few weeks, except for g_sword2. (Of course, this doesn't necessarily make the code any prettier, but we can work on that later.) svn-id: r11309
2003-11-11Moved low-level keyboard and mouse handling to a new Input class, andTorbjörn Andersson
renamed the Display class Graphics for no better reason than me liking the phrase "sound and graphics" better than "sound and display". svn-id: r11258
2003-11-08cleanup whitespacesPaweł Kołodziejski
svn-id: r11212
2003-10-28bs2 -> sword2Max Horn
svn-id: r10997
2003-10-26Enable the debug console. Actually, what I've done is to adapt the debugTorbjörn Andersson
console from the SCUMM engine. I decided that would be easier than to clean up the original console code. Unfortunately there's a bunch of code that I just copied - a pretty lousy form of code-reusal. It'd be nice if the console could be made part of the Engine class, or something like that. Most of the debug commands seem to be working. Some aren't relevant for ScummVM, and some are a bit obscure so I'm not quite sure what they're supposed to be doing. svn-id: r10978
2003-10-15Dumped most of the remaining "driver" code into a new "Display" class. ThisTorbjörn Andersson
touches a lot of the code, of course, and adds yet another global variable (temporarily, I hope), but everything still seems to work. Knock on wood. svn-id: r10806
2003-10-05Made a separate class for the cutscene functions, removed some unused codeTorbjörn Andersson
and made some other minor cleanups. svn-id: r10614
2003-10-04added namespace Sword2Max Horn
svn-id: r10581
2003-09-27cleanupTorbjörn Andersson
svn-id: r10432
2003-09-23Removed ancient version history. Much of it doesn't apply to us, and wasTorbjörn Andersson
cluttering up the files anyway. (Though I do feel a slight twinge of guilt for removing historical records like this. :-) svn-id: r10384
2003-09-23Must ... make ... space ... for ... FotAQ ...Torbjörn Andersson
svn-id: r10383
2003-08-28Removed the Surface class in favor of small struct specially made for theTorbjörn Andersson
block surfaces. (A block surface is a 64x64 tile of a parallax layer.) I've also done a few things to try and optimize the drawing: * The back buffer is no longer cleared between frames. This may cause regressions, but I do believe that the entire picture area is always completely re-rendered for each frame. As a result of this, the menu code is now responsible for clearing the icon areas itself. * A few unnecessary copy_rect() calls were commented out in favor of one big copy_rect() in ServiceWindows(). * Completely opaque block surfaces are copied with memcpy(), one line at a time. Unless we manage to add intelligent screen redrawing, I don't think it will get that much faster than this, though there is some unnecessary data copying in DrawSprite() that could be removed. And the game is still a terrible CPU hog. I believe the animation runs at approximately 12 fps. If there's still time left, it will pump out further frames to get smooth scrolling. We ought to put a cap on that, and if it has already reached the scroll target it should sleep for the rest of the render cycle. svn-id: r9886
2003-08-19Remove a bunch of unneeded cruft - but barely the surface of it. This code ↵James Brown
is depressing and duplicated all over the place... I don't think I can bear to touch this code until it's undergone some MAJOR cleanup :) svn-id: r9782
2003-08-17patch #790060 SWORD2: Initial graphics work from erik very nice indeed :)Jonathan Gray
svn-id: r9737
2003-07-31slightly changed version of erik's implmentation of FadeServerJonathan Gray
svn-id: r9328
2003-07-28bs2 driverJonathan Gray
svn-id: r9212