On Sun, 25 Nov 2007 16:20:53 -0800
"G33K" <[EMAIL PROTECTED]> wrote:

> > Names can't be used currently, so atm using addresses is the only
> > way. I don't think anyone really tried that up to now. I don't
> > remeber off-hand what animateActor() exactly expect, but if just
> > giving the address doesn't work try to divide it by 4.
> 
> After playing around a while, It seems that the mapping is indeed a
> division by 4, but you have to subtract 2 first. So, anim 26 in the
> .scost maps to 6 in the code, 30 maps to 7, and so on. The numbers
> inbetween seem to be useless. And, of course, you have to avoid the
> predefined stuff. I'll experiment further and update you on this.

In fact it work like this: addr = anim_num*4 + direction
The costume grammar must be modified a bit to better reflect this.
Something like this I think:

anim NAME @ anim_num = {
  N = { .... };
  S = { .... };
};

> > you could quite easily make a script to make  
> > Carol the cleaner wander about and "clean" the room.
> 
> Her vacuum cleaner is dragging a cable behind. Until she gets a
> battery-powered one, she needs to stay where she is. :-) But the
> commander is actually supposed to wander about all the time. Can you
> implement that?

That should be easy, a simple generic solution could look like this:

script walkActorAround(int actor, int* wp, int num_point) {
  int dst;
  while(1) {
    // Select a destination
    dst = getRandomNumber(num_point-1);
    walkActorTo(actor,wp[dst*2],wp[dst*2+1]);
    waitForActor(actor);
  }
}

local script entry() {
  ...
  // Define some waypoints
  waypoints[0] = [ 10, 10,
                   20, 10,
                   40, 40 ];
  walkActorAround(commander,waypoints,3);
  ...
}


local script exit() {
  ...
  // Kill the script and waypoint list
  stopScript(walkActorAround);
  undim(waypoints);
  ...
}


> There's also possibly an issue problem with the dialogs code. The
> dialog questions are indexed after the order in which they are added,
> but the answers' indexes are hardcoded in the switch statement. In
> this small game, there's only one optional question, which I added
> last. However, in more complex games, many questions might be added
> or not, according to some flags set in the game's progress. Wouldn't
> this mess up the mapping?

With the current code you can add empty entries (ie pass 0 instead of a
string). They won't be displayed but will still count for the id.

> Finally, the blue cup is supposed to fall down into the circular
> terminal at the end of the game. Can I change y without changing z?

I'm not really sure what you mean. Assuming the cup is an actor you can
just walk it to the destination.

> While playing with the z clipping, I got the following error
> statements:
> 
> "Function setActorZClip needs 0 args, 1 found."
> "getActorLayer is not a known function or script."
> 
> Both functions are listed in the Wiki though, setActorZClip with one
> parameter, "clip". Any ideas?

Bugs :( I fixed both.

> > There is another SCUMM compiler project out there called scummgen  
> > which targets V8, but from what i've seen it's still early days.
> 
> Yeah, I've noticed that one too. Once that guy gets his project
> running for real, we might wanna join forces.

Nice, in fact the author of scummgen (seubz) contacted me a few month
ago with a few scumm related questions. Good to see that it's going
forward.

I saw that he is using xml for the ressource definitions, that's
probably a good idea, it will make things easier from the editor side.

Actually sometime ago I thought about using xml for this very reason.
But that would be a lot work, the ressource definition are something
like half the grammar in scummc. On the other hand generating scummc
source from an xml definition would be trivial. And honestly for those
how prefer working with code instead of IDE (which doesn't exist atm
anyway) the C like syntax is imho much more digestable than xml.

But beside this it would make a lof of sense if both project used the
same grammar for the scripts. Code library could then be used with both
compiler.

        Albeu


_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general

Reply via email to