Commit Graph

24 Commits

Author SHA1 Message Date
Torbjörn Andersson
4c3a68027f Use the same syntax for accessing script variables as BS1 does, i.e. now
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-03-17 09:03:15 +00:00
Torbjörn Andersson
802a301a16 Removed some of the #includes from sword2.h
svn-id: r12739
2004-02-05 14:19:07 +00:00
Paweł Kołodziejski
2c3dd03d26 fix warnings
svn-id: r12504
2004-01-18 20:57:46 +00:00
Torbjörn Andersson
065f2bb9eb It's a new year in BS2 land, too!
svn-id: r12181
2004-01-06 13:44:17 +00:00
Torbjörn Andersson
6ae8218d53 Hopefully the last big renaming. Now the datatypes have names like
"StandardHeader" instead of "_standardHeader".

svn-id: r11997
2003-12-28 15:08:12 +00:00
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