AGIWiki/Room

From ScummVM :: Wiki
< AGIWiki
Revision as of 19:22, 17 February 2013 by Sact (talk | contribs) (Created page with "{{AGIWiki}} A '''room''' in an AGI game is, roughly, a division between areas in the game. A room might also be called a "screen." In a loose sense, you know tha...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
AGIWiki


A room in an AGI game is, roughly, a division between areas in the game. A room might also be called a "screen." In a loose sense, you know that ego has gone to a new room when the background picture changes.

In a technically accurate sense, to be "in a room" means that the current value of v0 is the number of the room that you are in. Normally, the [[AGIWiki/Logic|logic resource] with the same number as the current room number will be called on each interpreter cycle (this does not happen automatically, however; the AGI Studio Template Game has already included the appropriate code to do this in logic 0). This gives each room its own behavior. When the game switches to a new room, the flag f5 is set to indicate that this is the first interpreter cycle in the new room.

There is a limit of 255 rooms in an AGI game. Logic 0 is special, so a room number of 0 is not valid, but logics 1-255 are available. It should be noted, however, that the AGI Studio Template Game uses logics 90-99 for additional game functions and logic 1 for the game's introduction.

See also