Commit Graph

45 Commits

Author SHA1 Message Date
Torbjörn Andersson
5eb38cb380 cleanup
svn-id: r11364
2003-11-25 09:05:10 +00:00
Torbjörn Andersson
509235e176 Added experimental (i.e. not tested) resource dumping code.
Added tentative workaround for the bug (a script bug, I think) that causes
the game to hang when examining the lift at the top of the pyramid.

And, of course, some misc. cleanup.

svn-id: r11359
2003-11-23 13:40:24 +00:00
Torbjörn Andersson
50be85ac42 The readFile() function was only used once, for creating the debugger start
menu, and wasn't even necessary there so I've removed it. That means the
tony_gsdk.cpp file is no longer necessary. Sorry Tony, but at least you
still have your own debugger command! ;-)

svn-id: r11342
2003-11-18 08:17:36 +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
aaa5631a99 Mostly cleanup. Also prevented what would probably have been an infinite
loop if ScummVM failed to find a file in the demo. (Now it should error out
instead, which is marginally preferable.)

svn-id: r11298
2003-11-15 09:38:00 +00:00
Torbjörn Andersson
30670deb2c cleanup
svn-id: r11290
2003-11-14 07:41:22 +00:00
Torbjörn Andersson
beed02807f cleanup
svn-id: r11266
2003-11-12 08:21:18 +00:00
Torbjörn Andersson
1f53624d88 Removed SVM_timeGetTime(). We may as well call get_msecs() directly.
svn-id: r11260
2003-11-11 10:30:25 +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
Max Horn
e34f2b8b33 cut down on unnecessary GameDetector references
svn-id: r11239
2003-11-10 01:04:12 +00:00
Torbjörn Andersson
9106229bef Removed some now redundant header files.
svn-id: r11209
2003-11-08 18:15:35 +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
Torbjörn Andersson
7ec257ae3f Even more stuff moving into Sword2Engine. I'm tempted to make a new class
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-02 18:50:09 +00:00
Torbjörn Andersson
2adc147600 Moved some more "homeless" functions into Sword2Engine. (Don't worry -- I
promise I will get rid of g_sword2 later.)

svn-id: r11057
2003-11-02 17:17:10 +00:00
Torbjörn Andersson
db9b8070f6 More moving of stuff into classes. I had to make a few changes/cleanups to
events.cpp, so there could be regressions.

svn-id: r11053
2003-11-02 15:58:45 +00:00
Max Horn
b27a871f87 turned NewGui into a singleton, and made OSystem a pseudo-singleton; added Widget::findWidget (preparing to add support for nested widgets, for the tab widget)
svn-id: r11045
2003-11-02 02:18:16 +00:00
Torbjörn Andersson
94edf540ef More moving of stuff into classes
svn-id: r11025
2003-11-01 16:55:20 +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
Max Horn
a4d2a47820 factor out common debugger code
svn-id: r10984
2003-10-26 21:30:52 +00:00
Max Horn
d581c99ab5 cleanup
svn-id: r10982
2003-10-26 19:16:59 +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
Max Horn
31ba12c800 some more target<->game cleanup
svn-id: r10769
2003-10-12 19:10:17 +00:00
Torbjörn Andersson
1b52e11d55 Moved the "router" code into a new Router class. I'm hoping this is
analogous to the SkyAutoRoute class.

svn-id: r10754
2003-10-12 14:40:04 +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
a29d128bd3 Use RandomSource instead of rand().
svn-id: r10682
2003-10-08 18:02:53 +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
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
23373b0123 The usual cleanup. Removed the "run from CD" check.
This pretty much concludes the first stage of the engine cleanup. All of
the files, except for console/debugging stuff and possibly some header
files, have been changed to use the ScummVM brace style.

As for the console, that one could probably do with some rewriting, in
which case cleaning it up first would just be unnecessary work.

The next stages of the cleanup should include renaming of variables and
functions to follow the ScummVM coding standards, and turning everything
into C++ classes. And so on.

Of course, the driver directory should go through a similar cleanup as
well.

This has all been enormously tedious, so don't count on me doing any of
these things at the moment. Particularly not turning everything into C++
classes. I'm really not that familiar with C++. :-)

svn-id: r10340
2003-09-20 18:33:24 +00:00
Max Horn
468275bb94 added a static method setDefaultDirectory to class File; used this to simplify some code; added a global g_sound pointer in bs2, this cuts down on uses of g_sword2 (of course both should be removed on the long run); some other minor tweaks/fixes
svn-id: r10278
2003-09-17 21:06:16 +00:00
Torbjörn Andersson
fcc904a813 FadeServer() is now called from ServiceWindows(), thus eliminating the need
for the making it a timer handler. This should eliminate the occasional
glitches I've been seeing with fades not being completed.

I'm also hoping that it will fix the problem where the game would sometimes
hang when moving between rooms. I know that at least once when I had that
happen to me the game was busy-waiting for the palette to fade.

At the very least, it's one place less to worry about thread-safety in.

svn-id: r9854
2003-08-25 06:13:28 +00:00
Jonathan Gray
070a746de4 this should be signed
svn-id: r9845
2003-08-24 11:39:32 +00:00
Jonathan Gray
cf9ad3aee3 bring up the restore game menu when any -x param is specified, this is nicer than telling it to load a slot as it validates the saves and doesn't try to load a non existent save etc, its also similiar to what the original did (any command line params at all would load the restore menu)
svn-id: r9843
2003-08-24 06:57:32 +00:00
Jonathan Gray
4df7dd406f fix a resman method and make saving work using SaveFileManager
svn-id: r9828
2003-08-23 14:33:57 +00:00
Jonathan Gray
0649a8e30d enable boot param like option for bs2, valid numbers can be found in startup.inf
svn-id: r9822
2003-08-22 08:40:27 +00:00
Jonathan Gray
b11c3a6c0b remove bs2 specific osystem var
svn-id: r9330
2003-07-31 15:24:23 +00:00
Jonathan Gray
6822552a10 slightly changed version of erik's implmentation of FadeServer
svn-id: r9328
2003-07-31 14:51:02 +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
f1a6025aa2 turn d_sound.cpp into class BS2Sound
svn-id: r9280
2003-07-29 12:34: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
Jonathan Gray
f020d28b5e bs2
svn-id: r9211
2003-07-28 01:44:38 +00:00