Gerrit, I shall attempt to answer some of these from my limited experience editing the Road example.
On 13 Nov 2007, at 00:50, Gerrit wrote: > With the actor questions pending, I'm now trying to set up a few > objects > in the OpenQuest rooms. Again I ran into problems. The only pickable > object in the Road game is the axe, so I'm somewhat short of examples. > :-) > If you are stuck, you can try my little modification to rd.c which should extract all of the global and local scripts from a SCUMM game, which can provide some insight into the proper usage of SCUMM functions. I will post this separately. > > * For an object that exists only in the inventory (e.g. the character > starts with it or picks it from within a closet), it seems I still > have > to call pickupObject to give it to the actor, setObjectOwner doesn't > work. Is that correct? Looking at the ScummVM source, for an object to initially be placed in an actors inventory you *must* use pickupObject. Although looking at what the function actually does, a better name would probably be putObjectInInventoryAndMakeSureEgoIsTheOwner. :) > > > * For objects that have a room version and an inventory version, can > you > somehow combine them in a single object definition? For the axe, > there's > a Road::axe and a ResRoom::Axe. Wouldn't it be a much more readable > definition if there was only one axe? They must be separate, as there is no logical way they could be a single object - unless of course i missed something in the code. :( > > > * In the case that I can't combine the definitions: Can I at least > test > in which room an object is? In the inventoryHandler, the Icon verb is > called on all inventory objects to allow the non-inventory version to > call setInventoryIcon with the inventory version. I'd like to get > rid of > some of these Icon verbs, as they are mostly the same. If I could > somehow test in which room an object is, I could call setInventoryIcon > directly if it's in the ResRoom. Looking at Alban's function reference, your only hope would be to use the getRoomObjects opcode and iterate through the results. Although keep in mind that Alban also mentions this doesn't work on DOTT, which leads me to suspect its something specific to SamNMax (e.g. used to handle Max's movement?). > > > * Can you have different states with different bitmap sizes? I > couldn't > get it to work, the compiler complains. I'm going to assume Alban had a good reason for making the compiler complain. Likely SCUMM doesn't support this, although you could always just use a large size to encompass all frames. > > > * How do you animate a background object? My guess would be that you > periodically call a script that swaps the object state, but I don't > know > how to do that. The most common method i have observed when playing about with DOTT in ScummVM is that animated background objects are in fact actors. I would suggest reserving a set of actors solely for the purpose of making animated background objects. > > > * How do you change the state of inventory objects and draw the icons > accordingly (e.g. a torchlight turned on and off)? setVerbObject > doesn't > seem to take the state into account... > > * Are the inventory arrows implemented? They don't work for me. No however conversation arrows are implemented, so you could use similar logic in implementing the inventory arrows. In fact, all you really need to do is store an offset and use that when iterating over the inventory list in the inventoryHandler. > > I know it's a lot of issues, but there's also good news: I've set up 2 > rooms (more than one!) and they work. :-) Congratulations! Having made about 3 rooms (one of which was an overhead map view) myself, i can imagine what hell you must have gone through to get this far. Hope i have helped, and good luck with the rest! :) Regards, James S Urquhart _______________________________________________ ScummC-general mailing list [email protected] https://mail.gna.org/listinfo/scummc-general
