Age | Commit message (Collapse) | Author |
|
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
|
|
svn-id: r19142
|
|
that's how we write it in most other places.
svn-id: r18069
|
|
svn-id: r17787
|
|
game before it has been initialised the normal way.
svn-id: r17519
|
|
svn-id: r17477
|
|
svn-id: r16859
|
|
classes: Screen and Mouse. Screen handles most of the drawing, except the
mouse cursor and in-game menus.
The old Graphics class is no more.
I've also fixed some "reverse stereo" regressions from the first part of
the restructuring.
I'm not sure what the next step will be, but hopefully it will be smaller
than this one was.
svn-id: r16812
|
|
In this first step, I have moved all opcode functions into functions.cpp,
instead of having them scattered all over the place.
To get things to compile again, I had to rewrite the overly complicated
sound effects handling. It's much simpler now.
The next step will be to move any non-trivial code out of the opcode
functions and into the appropriate object. This, I hope, will make it
easier to create well-separated objects, instead of the current mess.
I also want to tear down the artificial boundary between the main directory
and the "driver" directory. We already have a cross-platform layer; there's
no need to have yet another one. (Actually, the rewriting of the sound
effects code took one first step in this direction.)
At the final stage, I'd like to get rid of the "drivers" directory
completely, but I'll probably need some help with that if I want to
preserve the CVS history of the code.
Things will probably be a bit bumpy along the way, but I seem to have
reached a point of relative stability again, which is why I'm commiting
this now.
svn-id: r16668
|
|
svn-id: r16580
|
|
svn-id: r16397
|
|
svn-id: r15826
|
|
svn-id: r15810
|
|
svn-id: r15297
|
|
command, would close the global script variables and player object
resources, without reopening them again. This made them fair game for the
resource expiration mechanism. The player object is probably referenced
often enough to stay alive, but the variables died on me pretty quickly,
causing ScummVM to crash.
I've also added a "reslist" debug command to make this sort of things
easier to spot. By default it only lists resources with refCount > 0. Use
"reslist 0" to see all the cached resources as well.
svn-id: r14958
|
|
svn-id: r13495
|
|
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
|
|
svn-id: r12739
|
|
svn-id: r12279
|
|
svn-id: r12181
|
|
svn-id: r12152
|
|
"StandardHeader" instead of "_standardHeader".
svn-id: r11997
|
|
experimental resource dumping code.
svn-id: r11382
|
|
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
|
|
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
|
|
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
|
|
loop if ScummVM failed to find a file in the demo. (Now it should error out
instead, which is marginally preferable.)
svn-id: r11298
|
|
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
|
|
svn-id: r11209
|
|
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
|
|
svn-id: r11129
|
|
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
|
|
svn-id: r10997
|
|
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
|
|
svn-id: r10939
|
|
svn-id: r10923
|
|
svn-id: r10885
|
|
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
|
|
analogous to the SkyAutoRoute class.
svn-id: r10754
|
|
headers. Most (all?) of the ones we need should probably come from stdafx.h
instead.
svn-id: r10588
|
|
svn-id: r10581
|
|
svn-id: r10499
|
|
svn-id: r10496
|
|
message functions with our own.
We still need to go through them and assign sensible debug levels to them.
svn-id: r10422
|
|
but say who added what when. (No disrespect intended, but this information
means very little to us.)
svn-id: r10413
|
|
characters. Hopefully this will make things work smoother on the Mac, but I
have no way of testing that.
svn-id: r10376
|
|
svn-id: r10330
|
|
svn-id: r10276
|
|
svn-id: r10274
|
|
svn-id: r10233
|