Commit Graph

41 Commits

Author SHA1 Message Date
Torbjörn Andersson
8f8185f035 Major revamping of the BS2 memory manager and, some small changes to the
resource manager. All new code! All new bugs!

svn-id: r13603
2004-04-23 07:02:11 +00:00
Torbjörn Andersson
3a4536e2e2 Cleanup. (Mostly of the comments.)
svn-id: r13579
2004-04-14 07:12:10 +00:00
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
ea39ef6d7d The game sets its own DEMO variable, so we might as well check that one as
checking the GF_DEMO flag. (There's still one "unnecessary" reference to
GF_DEMO in functions.cpp, but I plan on rewriting that function soon so I
don't want to touch it right now.)

svn-id: r12009
2003-12-29 15:30:10 +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
a1e80765f5 More cleanup. Another unused file bites the dust.
svn-id: r11363
2003-11-25 07:35:52 +00:00
Torbjörn Andersson
083c328077 Eliminated some more references to g_sword2. I think the only thing that
still uses it are the engine's global variables which, on the other hand,
are used *everywhere*.

I'll have to think some more about those. I guess I should take a closer
look at how the other engines handle them. (That goes for a lot of things
by the way.)

svn-id: r11349
2003-11-19 18:40:53 +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
446a01ba09 Moved low-level keyboard and mouse handling to a new Input class, and
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-11 07:43:02 +00:00
Torbjörn Andersson
688c80b062 Moved more stuff into classes, changed some static allocation to dynamic,
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-08 15:47:51 +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
Max Horn
53db0a8a07 cleanup: removed version/id from GameSettings
svn-id: r10995
2003-10-28 17:07:25 +00:00
Torbjörn Andersson
7c4cc25cec Enable the debug console. Actually, what I've done is to adapt the debug
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-26 15:42:49 +00:00
Torbjörn Andersson
8b42d65a7e Dumped most of the remaining "driver" code into a new "Display" class. This
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-15 06:40:31 +00:00
Torbjörn Andersson
02a157e745 Moved the text drawing stuff into a class of its own. (Adding another
global variable which will hopefully be dealt with later.)

svn-id: r10734
2003-10-11 12:26:53 +00:00
Torbjörn Andersson
29b646b30a Some cleanup, some code removal and some unstubbing. Nothing important.
svn-id: r10659
2003-10-07 07:07:47 +00:00
Torbjörn Andersson
7174a32c8e Made a separate class for the cutscene functions, removed some unused code
and made some other minor cleanups.

svn-id: r10614
2003-10-05 15:28:15 +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
5a074e6137 added namespace Sword2
svn-id: r10581
2003-10-04 00:52:27 +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
93b8cefe19 Tiny whitespace / comment change.
svn-id: r10478
2003-09-29 06:48:48 +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
09a01e4cbe Replaced abs() with ABS and BOOL with bool, plus some minor cleanups.
svn-id: r10391
2003-09-24 06:40:23 +00:00
Torbjörn Andersson
0ac7aa0671 whitespace fixes
svn-id: r10365
2003-09-23 06:23:29 +00:00
Torbjörn Andersson
3c7c60196f ScummVM code formatting conventions
svn-id: r10350
2003-09-21 16:11:26 +00:00
Torbjörn Andersson
5628ee7417 cleanup
svn-id: r10308
2003-09-19 06:42:22 +00:00
Oliver Kiehl
adcbedbfde hack isn't needed anymore
svn-id: r10212
2003-09-13 10:31:46 +00:00
Oliver Kiehl
9dc282f1d5 endian fixes
svn-id: r10192
2003-09-12 18:52:53 +00:00
Oliver Kiehl
0f85cc3061 rename bs2 to sword2 to have the same name as the original engine.
besides this way all our engines start with an "s" ;)

svn-id: r9301
2003-07-30 19:25:31 +00:00
Jonathan Gray
f22cca2be2 rename _DEBUG define to _BS2_DEBUG to stop it conflicting with VC
svn-id: r9237
2003-07-28 09:49:46 +00:00
Jonathan Gray
77cf6b7c3e add bs2demo target for broken sword 2 demo
svn-id: r9229
2003-07-28 07:00:15 +00:00
Travis Howell
ccc40eecc9 Compiles on mingw now
svn-id: r9222
2003-07-28 03:12:49 +00:00
Max Horn
44048d2434 fixed more warnings
svn-id: r9219
2003-07-28 02:23:04 +00:00
Jonathan Gray
f020d28b5e bs2
svn-id: r9211
2003-07-28 01:44:38 +00:00