Opened 16 years ago

Closed 16 years ago

Last modified 12 months ago

#8297 closed patch

FT: INSANE support

Reported by: sev- Owned by: sev-
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Full Throttle

Description

This is preliminary support of FT INSANE.

Do not expect it to work. This is work in progress.
There is no output to the screen yet, not all hooks are
implemented, too much stubs to let it work at all.

I'll use this place to save the beast in case there
would be some hardware failure or something because it
is growing too far.

The code is ugly, and I know that.

Also indentation is wrong because it is my default
settings in emacs.
If someone has it definitions for scummvm rules, that
would be very appretiated.

Ticket imported from: #839747. Ticket imported from: patches/402.

Attachments (2)

insane.2.patch.bz2 (17.4 KB ) - added by sev- 16 years ago.
FT insane patch version 2
insane.3.patch.bz2 (18.7 KB ) - added by sev- 16 years ago.
FT insane patch version 3

Download all attachments as: .zip

Change History (9)

comment:1 by fingolfin, 16 years ago

http://scummvm.org/documentation.php?view=conventions

by sev-, 16 years ago

Attachment: insane.2.patch.bz2 added

FT insane patch version 2

comment:2 by sev-, 16 years ago

Now code follows scummvm formatting rules.
More things implemented, even more variables got proper name,
some complex structures were found and defined.

comment:3 by fingolfin, 16 years ago

Some comments:
Those init_actorStruct / init_roomConfigStruct / etc. look as if you
really want to use array constructors, and in fact, static arrays.

E.g. instead of using init_actorStruct, you could do something like

static const actor s_actor[9] = {
{ 0, 0, 0, 0, 0, 0 }, // Unused
{ 1, 1, 1, 0, 0, 0 },
{ 12, 1, 1, 0, 0, 0 },
{ 11, 1, 1, 0, 0, 0 },
...
};
That's (IMO) easier (or at least not harder) to read, simplifies the
code a little and the optimizer can work better. But of course it's
mostly cosmetical

---------------------

In Insane::actor1Reaction, why are the case's not ordered
numercially? To match the assembly?

comment:4 by sev-, 16 years ago

The problem is that those structures are not const, they
hold dynamic data. For those structure which keep some
constants I prefer to use 'static const' structure. In fact
Insane object should be a singleton like GUI and should be
created near place where sound is initialized. That is
because it should hold some data between scenes. That would
mean that every struct can be static. What do you think?

As of Insane::actor1Reaction and other functions with switch
statement, yes, now they map assembly code. With this
approach it would be easier to find translation bugs. You
saw zillions of those values and I could miss something or
put wrong value, though I doublecheck every function.

by sev-, 16 years ago

Attachment: insane.3.patch.bz2 added

FT insane patch version 3

comment:5 by sev-, 16 years ago

Another version of the patch. Now most variables are named
properly, also some previous assumptions were wrong (see
roomConfig as an example). It seems that now I hooked the
code at correct places in scummvm, though this has to be
doublechecked yet and there are two hooks still unplugged.

If you apply this patch, define INSANE in config.h to enable
it, however expect to see just debug output and
non-interaction parts of the scenes. From the other hand the
thing which will let see something on the screen is next one
to be implemented. It is modification of smush player to add
possibility to switch smush files and frames on the fly.

comment:6 by Kirben, 16 years ago

Owner: set to sev-
Status: newclosed

comment:7 by digitall, 12 months ago

Component: Engine: SCUMM
Game: Full Throttle
Note: See TracTickets for help on using tickets.