Commit Graph

19 Commits

Author SHA1 Message Date
Torbjörn Andersson
6f23e2c211 Mostly whitespace changes, but also a few modifications to the still
experimental resource dumping code.

svn-id: r11382
2003-11-27 07:34:19 +00:00
Torbjörn Andersson
fa2b8ba8de More cleanup. I've eliminated all the temporary global variables I've added
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-16 14:18:29 +00:00
Torbjörn Andersson
3d012651fd The script engine frequently needs to pass pointers to various structures
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-10 07:52:15 +00:00
Torbjörn Andersson
b3b0118292 The resource and memory managers are now created dynamically.
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-03 07:47:42 +00:00
Max Horn
2fef2dcb84 bs2 -> sword2
svn-id: r10997
2003-10-28 19:51:30 +00:00
Torbjörn Andersson
4fad04846a Changed to use #include "bs2/..." and removed the inclusion of standard C
headers. Most (all?) of the ones we need should probably come from stdafx.h
instead.

svn-id: r10588
2003-10-04 08:07:03 +00:00
Max Horn
2162df92fc removed Sword2 prefixes of most classes (made obsolete by our namespace usage); renamed Sword2State to Sword2Engine
svn-id: r10583
2003-10-04 01:09:29 +00:00
Max Horn
5a074e6137 added namespace Sword2
svn-id: r10581
2003-10-04 00:52:27 +00:00
Torbjörn Andersson
10fee205e1 Some renaming (ironic in the light of Fingolfin's recent namespace
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-10-03 06:54:44 +00:00
Torbjörn Andersson
da1b4f1e36 Moved the memory manager functions into an object of its own (and enabled
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-30 14:37:42 +00:00
Torbjörn Andersson
568a4bd839 Changed the resource manager object to use more ScummVM-like naming.
svn-id: r10499
2003-09-30 09:27:27 +00:00
Torbjörn Andersson
8ad28e3a7e More cleanup, and I've replaced most - not quite all - of BS2's debug
message functions with our own.

We still need to go through them and assign sensible debug levels to them.

svn-id: r10422
2003-09-27 11:02:58 +00:00
Torbjörn Andersson
b21208e6a9 Some more reformatting / cleanup, and removal of comments that did nothing
but say who added what when. (No disrespect intended, but this information
means very little to us.)

svn-id: r10413
2003-09-26 10:07:18 +00:00
Torbjörn Andersson
2536823c23 cleanup
svn-id: r10267
2003-09-17 06:28:27 +00:00
Max Horn
42bf2a855c cleanup
svn-id: r10236
2003-09-13 18:06:19 +00:00
Jonathan Gray
5d309dd171 rename memory struct as well
svn-id: r9234
2003-07-28 07:52:01 +00:00
Jonathan Gray
d520390cc5 rename functions with windows specific names
svn-id: r9233
2003-07-28 07:47:21 +00:00
Travis Howell
ccc40eecc9 Compiles on mingw now
svn-id: r9222
2003-07-28 03:12:49 +00:00
Jonathan Gray
f020d28b5e bs2
svn-id: r9211
2003-07-28 01:44:38 +00:00