Commit Graph

45 Commits

Author SHA1 Message Date
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
Torbjörn Andersson
8277c6cb79 The graphics detail settings partially work now. They only affect how
sprites are drawn, but I think that's how it should be.

1: No bells or whistles.
2: This setting adds sprite blending, e.g. the smoke at the docks or the
   display cases at the Glease Gallery.
3: This setting adds light map support, e.g. when walking under the shack
   at the docks.
4: This setting adds better scaling algorithms.

The first three settings should work fine now. In fact, the third setting
is what we used to implement. The fourth setting still needs work and
testing. I've added code for downscaling case, but frankly I'm not
convinced the result is any better than with the simpler scaler. I usually
can't even tell the difference.

Of course, my translation of the original code could very well be buggy.

svn-id: r9867
2003-08-26 06:53:00 +00:00
Jonathan Gray
011d7b897d use less generic file name for settings.dat, I assume filenames > 8.3 are ok for everyone?
svn-id: r9849
2003-08-24 14:13:12 +00:00
Jonathan Gray
527fa147c5 make settings use SaveFileManager stuff as well
svn-id: r9848
2003-08-24 13:46:42 +00:00
Torbjörn Andersson
df247cff62 Unstubbed the Create/Draw/DeleteSurface() functions, and removed some
unnecessary stuff from our own Surface class. The former allows the in-game
dialogs to at least sort of work, and the latter gained me a few frames per
second, according to the built-in FPS counter.

svn-id: r9825
2003-08-23 13:02:21 +00:00
James Brown
ec447fdfbb Remove a bunch of unneeded cruft - but barely the surface of it. This code is depressing and duplicated all over the place... I don't think I can bear to touch this code until it's undergone some MAJOR cleanup :)
svn-id: r9782
2003-08-19 14:57:26 +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
Travis Howell
ccc40eecc9 Compiles on mingw now
svn-id: r9222
2003-07-28 03:12:49 +00:00
Max Horn
55cbdd5c5f more warnings
svn-id: r9218
2003-07-28 02:14:28 +00:00
Jonathan Gray
f020d28b5e bs2
svn-id: r9211
2003-07-28 01:44:38 +00:00