aboutsummaryrefslogtreecommitdiff
path: root/sword2/build_display.cpp
AgeCommit message (Collapse)Author
2004-11-14CleanupTorbjörn Andersson
svn-id: r15810
2004-09-28Rename remaining OSystem methods to match our coding guidelinesMax Horn
svn-id: r15332
2004-06-11Hopefully fixed the displayMsg() fade-up glitch I accidentally introducedTorbjörn Andersson
yesterday. svn-id: r13955
2004-06-10If the 'time' parameter to displayMsg() is 0, wait until the user clicksTorbjörn Andersson
or presses a button. This is how displayMsg() was always used, so the only difference is that the code to check for events is no longer outside the function. In the process, it turned out that removeMsg() was probably unnecessary so I have removed it. May cause regressions, but we can deal with them later. svn-id: r13953
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-04-24fetchObjectName() no longer assumes that the resource will still be in theTorbjörn Andersson
cache after it's been closed. (Currently it always is, but ideally I'd like for BS to work even if resource caching is disabled.) svn-id: r13610
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-04-07Cleanup.Torbjörn Andersson
svn-id: r13494
2004-03-28Fixed format string to match parameters.Torbjörn Andersson
svn-id: r13405
2004-03-28Cleanup.Torbjörn Andersson
One of the changes, I'm not quite sure about: buildDisplay() used to open and close the _thisScreen.background_layer_id resource for each layer it processed. In particular, it used to "release the screen resource before cacheing the sprites". I have no idea why, because I can't see any trace of a sprite cache, and I can't think of any harm in keeping the resource open during the whole render cycle. The resource is probably loaded into memory already anyway, though its reference counter may be 0. svn-id: r13401
2004-03-17Use the same syntax for accessing script variables as BS1 does, i.e. nowTorbjörn Andersson
it's Logic::_scriptVars[ID] instead of just ID. Apart from looking cool, it makes it much easier to tell the difference between variables and constants when looking at the code. Of course, this sort of sweeping changes is jolly good for introducing truly weird regressions, which is why I waited until after 0.6.0. svn-id: r13331
2004-02-05Removed some of the #includes from sword2.hTorbjörn Andersson
svn-id: r12739
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2004-01-06Made sure the screen is really cleared when drawing a dialog window, plusTorbjörn Andersson
some other cleanups. (This was a regression caused by the less stupid screen updates implemented recently.) svn-id: r12180
2003-12-28Hopefully the last big renaming. Now the datatypes have names likeTorbjörn Andersson
"StandardHeader" instead of "_standardHeader". svn-id: r11997
2003-11-27Mostly whitespace changes, but also a few modifications to the stillTorbjörn Andersson
experimental resource dumping code. svn-id: r11382
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-13Re-enabled the CD swapping code, after rewriting it a bit.Torbjörn Andersson
If a cluster file isn't found the resource manager will first check if it's one of the files that it expects to find on the hard disk. If so, it's considered a fatal error. Otherwise it will present the user with an "Insert CD1" or "Insert CD2" message, just like the original did. Unlike the original, the user will have to press a button or click the mouse to indicate when he's done. I don't know if we even can detect the CD automatically in any portable way. As far as I can see, we'll need at least two separate path settings for this to actually work: one for the HD install directory, and one or two for the CDs. The file that are supposed to be found on the HD are only on one of the CDs, so the amount of CD swapping would probably be unbearable otherwise. As a consequence, I haven't actually tried running the game from CD yet. By the way, the old caching code has been removed completely now. All it did was to copy the cluster file to HD for faster access. ScummVM never did that, but so far no one has complained. svn-id: r11273
2003-11-11Removed SVM_timeGetTime(). We may as well call get_msecs() directly.Torbjörn Andersson
svn-id: r11260
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-10The script engine frequently needs to pass pointers to various structuresTorbjörn Andersson
etc. to the different opcodes. Until now it has done so by casting the pointer to an int32 (opcode parameters are represented as arrays of int32) and then the opcode function casts it back to whatever pointer it needs. At least in C there is no guarantee that a pointer can be represented as an integer type (though apparently C99 may define such a type), so this has struck me as unsafe ever since I first noticed it. However, since all such pointers appear to point to the memory block owned by the memory manager, we can easily convert them to integers by treating them as offsets into the memory block. So that's what I have done. I hope I caught all the occurences in the opcode functions, or we're going to have some pretty interesting regressions on our hands... svn-id: r11241
2003-11-08Moved more stuff into classes, changed some static allocation to dynamic,Torbjörn Andersson
and removed some of the references to global variables. At this point I believe everything in the main game engine has been moved into classes - not necessarily the correct ones, but still... However, there is some stuff in the driver directory that need to be taken care of as well. svn-id: r11207
2003-11-03The resource and memory managers are now created dynamically.Torbjörn Andersson
Renamed the resource manager's open/close methods openResource() and closeResource() to avoid confusion. (It was I who originally shortened their names to open() and close(), but I've changed my mind now.) Moved more stuff into Sword2Engine. svn-id: r11088
2003-11-02Even more stuff moving into Sword2Engine. I'm tempted to make a new classTorbjörn Andersson
for the mouse stuff, but I need to think about that a bit more. I have a feeling the code could be cleaned up a bit anyway... svn-id: r11060
2003-11-02Moved some more "homeless" functions into Sword2Engine. (Don't worry -- ITorbjörn Andersson
promise I will get rid of g_sword2 later.) svn-id: r11057
2003-11-02More moving of stuff into classes. I had to make a few changes/cleanups toTorbjörn Andersson
events.cpp, so there could be regressions. svn-id: r11053
2003-11-01More moving of stuff into classesTorbjörn Andersson
svn-id: r11025
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-21Moved some more stuff into the Logic class.Torbjörn Andersson
svn-id: r10923
2003-10-18Moved the opcode functions into the Logic class.Torbjörn Andersson
svn-id: r10885
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-11Moved the text drawing stuff into a class of its own. (Adding anotherTorbjörn Andersson
global variable which will hopefully be dealt with later.) svn-id: r10734
2003-10-08Some more cosmetic changes while I'm considering the next move. (Or maybeTorbjörn Andersson
I'm just hoping that if I stall long enough, someone else will make the move for me. :-) svn-id: r10676
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-04Changed to use #include "bs2/..." and removed the inclusion of standard CTorbjörn Andersson
headers. Most (all?) of the ones we need should probably come from stdafx.h instead. svn-id: r10588
2003-10-04added namespace Sword2Max Horn
svn-id: r10581
2003-09-30Moved the memory manager functions into an object of its own (and enabledTorbjörn Andersson
debugging levels). This needs further cleanups, but I believe I have reached a stable point where I can commit it without too much anxiety. svn-id: r10502
2003-09-30Changed the resource manager object to use more ScummVM-like naming.Torbjörn Andersson
svn-id: r10499
2003-09-27Removed CopyScreenBuffer() since it was a no-op anyway.Torbjörn Andersson
svn-id: r10427
2003-09-27More cleanup, and I've replaced most - not quite all - of BS2's debugTorbjörn Andersson
message functions with our own. We still need to go through them and assign sensible debug levels to them. svn-id: r10422
2003-09-26Some more reformatting / cleanup, and removal of comments that did nothingTorbjörn Andersson
but say who added what when. (No disrespect intended, but this information means very little to us.) svn-id: r10413
2003-09-24Replaced abs() with ABS and BOOL with bool, plus some minor cleanups.Torbjörn Andersson
svn-id: r10391
2003-09-21ScummVM code formatting conventionsTorbjörn Andersson
svn-id: r10350
2003-09-19cleanupTorbjörn Andersson
svn-id: r10308
2003-09-17Removed some #includes that seem to be unnecessary. I think we're going toTorbjörn Andersson
have to clean up the header files at some point... svn-id: r10271
2003-09-09Our ServiceWindows() never returns RDERR_APPCLOSED, and we always behave asTorbjörn Andersson
if we have the focus, so there's no need to check. svn-id: r10130
2003-09-09Added a WaitForFade() function, to replace numerous while-loops scatteredTorbjörn Andersson
througout the code. svn-id: r10127
2003-09-08Hide the menus when displaying full-screen messages, e.g. error messagesTorbjörn Andersson
from the save/load dialog. (This probably happened automagically in the original, but we handle screen updates a bit differently now.) svn-id: r10078
2003-09-02Re-formatted the code to be a bit more in line with the rest of ScummVM.Torbjörn Andersson
svn-id: r9964