aboutsummaryrefslogtreecommitdiff
path: root/sword2/memory.cpp
AgeCommit message (Collapse)Author
2005-05-12Whitespace: "(type *)something" instead of "(type *) something", becauseTorbjörn Andersson
that's how we write it in most other places. svn-id: r18069
2005-02-22Moved some debugging stuff into the debugger class.Torbjörn Andersson
svn-id: r16859
2005-01-17Updated copyright header, as discussed on the mailing list.Torbjörn Andersson
svn-id: r16580
2005-01-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
2004-11-14CleanupTorbjörn Andersson
svn-id: r15810
2004-09-12Made the output from the "mem" debugger command a bit more informative, andTorbjörn Andersson
sorted it to output the biggest memory blocks first. svn-id: r15078
2004-09-07Fixed debug output.Torbjörn Andersson
svn-id: r14951
2004-09-07Much like an early civilization with no concept of the number zero, theTorbjörn Andersson
new memory manager didn't have the concept of the NULL pointer. Now it does. If ScummVM ever crashed for you when using the phone early in the game, this patch hopefully fixes that bug. (If it didn't crash for you, memory block zero was still allocated, so 0 still decoded to a valid pointer.) svn-id: r14937
2004-06-10Added another assert(). I'm hunting - unsuccessfully so far - for aTorbjörn Andersson
reproducable crash where an invalid pointer is decoded. Strangely, I never saw it being encoded... Oh well, I'll find it eventually. svn-id: r13951
2004-06-08Added a few comments, rewrote a few others, and added a couple of assert()sTorbjörn Andersson
svn-id: r13947
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-28More format string fixes.Torbjörn Andersson
svn-id: r13407
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-18fix warningsPaweł Kołodziejski
svn-id: r12504
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
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-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-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-10-28bs2 -> sword2Max Horn
svn-id: r10997
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-04removed Sword2 prefixes of most classes (made obsolete by our namespace ↵Max Horn
usage); renamed Sword2State to Sword2Engine svn-id: r10583
2003-10-04added namespace Sword2Max Horn
svn-id: r10581
2003-10-03Some renaming (ironic in the light of Fingolfin's recent namespaceTorbjörn Andersson
suggestion, but I prepared the patch long before reading the mail :-). Also, the remaining parts of the control panel etc. have been moved into a class of their own. This is still work in progress. I'm well aware that some of the classes aren't as well separated as they ought to be, and that using global variables to keep track of the different classes probably isn't pretty. svn-id: r10561
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-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-17cleanupTorbjörn Andersson
svn-id: r10267
2003-09-13cleanupMax Horn
svn-id: r10236
2003-07-28rename memory struct as wellJonathan Gray
svn-id: r9234
2003-07-28rename functions with windows specific namesJonathan Gray
svn-id: r9233
2003-07-28Compiles on mingw nowTravis Howell
svn-id: r9222
2003-07-28bs2Jonathan Gray
svn-id: r9211