Commit Graph

61 Commits

Author SHA1 Message Date
Torbjörn Andersson
638231cc59 Make it possible to quit while showing in-game dialogs. (Regression fix.)
svn-id: r12273
2004-01-09 07:54:16 +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
eb5c4a1449 Made sure the screen is really cleared when drawing a dialog window, plus
some other cleanups. (This was a regression caused by the less stupid
screen updates implemented recently.)

svn-id: r12180
2004-01-06 13:33:28 +00:00
Torbjörn Andersson
8a91ae3257 Adapted LavosSpawn's idea for more efficient screen updating. It still
renders the entire screen every frame, but it tries to update (i.e. copy to
the backend) only the parts of the screen that actually changed. At least
approximately so.

svn-id: r12142
2004-01-04 15:11:30 +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
Nicolas Bacca
9e1dda1f68 Make VC6/EVC happier
svn-id: r11764
2003-12-20 01:17:02 +00:00
Torbjörn Andersson
dc0c7bf845 Implemented scroll wheel handling for save/load dialogs. (This turned up a
few other hitherto harmless bugs, which I've hopefully managed to fix.)

svn-id: r11762
2003-12-19 16:50:03 +00:00
Travis Howell
d78ccc55a4 Change Broken Sword 2 default to no subtitles
To match original version and other games.

svn-id: r11479
2003-12-03 01:04:54 +00:00
Torbjörn Andersson
6d3c760ffd Since all other engines have been changed to use "subtitles" instead of
"nosubtitles", let's change this one as well. Of course, it does break
compatibility with old config files, but I guess the worst that can happen
is that we have an unused "nosubtitles" line in addition to the used
"subtitles" line...

svn-id: r11464
2003-12-02 10:25:12 +00:00
Torbjörn Andersson
3f115ba95d Removed some spurious semi-colons pointed out in patch #847464
svn-id: r11366
2003-11-25 17:08:46 +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
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
ba098a3a5b Create g_logic dynamically. More moving of stuff into classes.
svn-id: r11129
2003-11-04 18:02:49 +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
Paweł Kołodziejski
9588a6fd31 fixed warnings
svn-id: r11046
2003-11-02 10:12:08 +00:00
Torbjörn Andersson
ae9fe77479 Instead of having a function that reverses the panning table, we now have a
function that creates the panning table. The difference is that you now
have to tell whether you want one for normal or reverse stereo, so you are
not dependent on the previous state of the table.

(I still think it may be possible to get rid of the panning table
completely, but that's for later cleanups.)

svn-id: r11027
2003-11-01 18:12:04 +00:00
Torbjörn Andersson
0435658b96 Create the gui object dynamically
svn-id: r11026
2003-11-01 17:08:23 +00:00
Torbjörn Andersson
94edf540ef More moving of stuff into classes
svn-id: r11025
2003-11-01 16:55:20 +00:00
Torbjörn Andersson
6011bd6cdc Save the config file when options are changed.
svn-id: r11014
2003-10-31 07:43:26 +00:00
Torbjörn Andersson
d7bd7d44b8 Use the ScummVM config manager instead of a separate BS2-specific config
file, plus some other cleanup. I don't know how the config manager decides
if/when to save the settings to file, but we can worry about that later.

svn-id: r11001
2003-10-29 07:53:05 +00:00
Max Horn
2fef2dcb84 bs2 -> sword2
svn-id: r10997
2003-10-28 19:51:30 +00:00
Torbjörn Andersson
7418c47b48 If we fail to read the game settings, use sensible defaults.
svn-id: r10990
2003-10-28 13:46:28 +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
3be2f0f1e0 Moved some more stuff into the Logic class.
svn-id: r10923
2003-10-21 08:54:50 +00:00
Torbjörn Andersson
3a43829b88 Moved the opcode functions into the Logic class.
svn-id: r10885
2003-10-18 08:11:50 +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
e8b6016e33 Renamed the FontRenderer class as FontRendererGui since there's another
font renderer for the game itself. (It just doesn't live in any separate
class yet.)

svn-id: r10658
2003-10-07 07:06:50 +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
Max Horn
0e645f88ae renamed namespace ScummVM to Common
svn-id: r10544
2003-10-02 17:43:02 +00:00
Torbjörn Andersson
2a41216f08 ScummVM naming conventions and cleanup in the Sword2Sound class.
svn-id: r10514
2003-10-01 06:36:25 +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
b8fa67a8bb Changed the "logic" object to use ScummVM naming conventions.
svn-id: r10496
2003-09-30 06:40:01 +00:00
Torbjörn Andersson
796fcfff7e Removed inaccurate comment
svn-id: r10428
2003-09-27 16:05:40 +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
57d99796ea Changed the keyboard handling to store "keyboard events", rather than just
characters. Hopefully this will make things work smoother on the Mac, but I
have no way of testing that.

svn-id: r10376
2003-09-23 15:59:52 +00:00
Torbjörn Andersson
3c7c60196f ScummVM code formatting conventions
svn-id: r10350
2003-09-21 16:11:26 +00:00
Torbjörn Andersson
a412dd9fcb cleanup
svn-id: r10337
2003-09-20 16:39:17 +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
29607a17ef Cleanup
svn-id: r10126
2003-09-09 11:52:43 +00:00
Torbjörn Andersson
0b86100456 Complete rewrite of the in-game dialogs (quit, restart, settings, save and
load). The new code is smaller, hopefully a bit easier to read and doesn't
use up all the CPU time.

Of course, it may some new and exciting bugs too. ;-)

svn-id: r10079
2003-09-08 06:38:16 +00:00