- This wiki is out of date, use the continuation of this wiki instead
Scroll
From FenixWiki
Revision as of 12:34, 8 March 2008 (edit) Sandman (Talk | contribs) m (→Members of one Struct) ← Previous diff |
Revision as of 16:19, 8 March 2008 (edit) (undo) Sandman (Talk | contribs) Next diff → |
||
Line 25: | Line 25: | ||
| '''INT''' y1 || - The [[Y]]-coordinate of the the background graphic.* | | '''INT''' y1 || - The [[Y]]-coordinate of the the background graphic.* | ||
|- | |- | ||
- | | '''INT''' z || - The [[Z]]-coordinate of the scroll window (default: 512). | + | | '''INT''' z || - The [[Z]]-coordinate of the scroll window (default: 512).** |
|- | |- | ||
- | | '''INT''' camera || - The [[processID]] of the process to be followed (default: 0).** | + | | '''INT''' camera || - The [[processID]] of the process to be followed (default: 0).*** |
|- | |- | ||
- | | '''INT''' ratio || - The ratio in percent the foreground will move related to the background (default: 200).**,*** | + | | '''INT''' ratio || - The ratio in percent the foreground will move related to the background (default: 200).***,**** |
|- | |- | ||
- | | '''INT''' speed || - The maximum speed of the foreground, 0 for no limit (default: 0).** | + | | '''INT''' speed || - The maximum speed of the foreground, 0 for no limit (default: 0).*** |
|- | |- | ||
- | | '''INT''' region1 || - The [[region]] in which the scroll won't move, -1 for none (default: -1).** | + | | '''INT''' region1 || - The [[region]] in which the scroll won't move, -1 for none (default: -1).*** |
|- | |- | ||
- | | '''INT''' region2 || - The [[region]] in which the maximum speed is ignored, -1 for none (default: -1).** | + | | '''INT''' region2 || - The [[region]] in which the maximum speed is ignored, -1 for none (default: -1).*** |
|- | |- | ||
| '''INT''' flags1 || - The [[bit flags]] for the foreground graphic. | | '''INT''' flags1 || - The [[bit flags]] for the foreground graphic. | ||
Line 48: | Line 48: | ||
| '''<nowiki>*</nowiki>''' || - These fields become ''read only'' when the scroll window is in automatic mode (see [[#Notes|notes]]). | | '''<nowiki>*</nowiki>''' || - These fields become ''read only'' when the scroll window is in automatic mode (see [[#Notes|notes]]). | ||
|- | |- | ||
- | | '''<nowiki>**</nowiki>''' || - | + | | '''<nowiki>**</nowiki>''' || - [[Process]]es use this [[z]] value (see [[#Notes|notes]]). |
|- | |- | ||
- | | '''<nowiki>***</nowiki>''' || - The ratio is in percent: 200 means the background moves twice as slow. | + | | '''<nowiki>***</nowiki>''' || - These fields only make sense when the scroll window is in automatic mode (see [[#Notes|notes]]). |
+ | |- | ||
+ | | '''<nowiki>****</nowiki>''' || - The ratio is in percent: 200 means the background moves twice as slow. | ||
|} | |} | ||
== Notes == | == Notes == | ||
There are two main method of controlling a [[scroll window]]. One is the manual way, thus changing the values of the x0,y0,x1 and y1 manually. This mode is used when the ''camera'' field is not set (is 0). When it is set with a [[processID]], the scroll window is in automatic mode and will follow that [[process]]' coordinates and will try to keep it centered. This can be influenced by other members of the scroll struct. | There are two main method of controlling a [[scroll window]]. One is the manual way, thus changing the values of the x0,y0,x1 and y1 manually. This mode is used when the ''camera'' field is not set (is 0). When it is set with a [[processID]], the scroll window is in automatic mode and will follow that [[process]]' coordinates and will try to keep it centered. This can be influenced by other members of the scroll struct. | ||
+ | |||
The foreground is the plane to be controlled and the background moves relative to the foreground. | The foreground is the plane to be controlled and the background moves relative to the foreground. | ||
+ | |||
+ | [[Process]]es in a scroll take over the [[z]] value of that scroll's z. Between processes on the same scroll the [[local variable]] [[z]] of that process does have the expected effect. | ||
== Example == | == Example == | ||
{{Globals}} | {{Globals}} |
Revision as of 16:19, 8 March 2008
Contents |
Definition
STRUCT[9] Scroll
Scroll is a global variable struct array, containing information about the current state of the ten available scrolls (0..9). It is used to influence the settings of a scroll window, initiated by start_scroll().
Members of one Struct
Member name | - Description |
INT x0 | - The X-coordinate of the foreground graphic.* |
INT y0 | - The Y-coordinate of the foreground graphic.* |
INT x1 | - The X-coordinate of the the background graphic.* |
INT y1 | - The Y-coordinate of the the background graphic.* |
INT z | - The Z-coordinate of the scroll window (default: 512).** |
INT camera | - The processID of the process to be followed (default: 0).*** |
INT ratio | - The ratio in percent the foreground will move related to the background (default: 200).***,**** |
INT speed | - The maximum speed of the foreground, 0 for no limit (default: 0).*** |
INT region1 | - The region in which the scroll won't move, -1 for none (default: -1).*** |
INT region2 | - The region in which the maximum speed is ignored, -1 for none (default: -1).*** |
INT flags1 | - The bit flags for the foreground graphic. |
INT flags2 | - The bit flags for the background graphic. |
INT follow | - The scrollID of the scroll window to follow, -1 means none (default: -1). |
INT[6] reserved | - Seven reserved integers. |
* | - These fields become read only when the scroll window is in automatic mode (see notes). |
** | - Processes use this z value (see notes). |
*** | - These fields only make sense when the scroll window is in automatic mode (see notes). |
**** | - The ratio is in percent: 200 means the background moves twice as slow. |
Notes
There are two main method of controlling a scroll window. One is the manual way, thus changing the values of the x0,y0,x1 and y1 manually. This mode is used when the camera field is not set (is 0). When it is set with a processID, the scroll window is in automatic mode and will follow that process' coordinates and will try to keep it centered. This can be influenced by other members of the scroll struct.
The foreground is the plane to be controlled and the background moves relative to the foreground.
Processes in a scroll take over the z value of that scroll's z. Between processes on the same scroll the local variable z of that process does have the expected effect.
Example
Global variables | |
• Argc • Argv • Cdinfo • Dump_type • Fading • Fileinfo • Fps • Frame_time • Full_screen • Graph_mode • Mouse • Os_id • Restore_type • Scale_mode • Scroll • Sound_channels • Sound_freq • Sound_mode • Text_flags • Text_z • Timer • |