TrustedUser
2,147
edits
m |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{AGIWiki}} | {{AGIWiki}} | ||
{{AGIWiki/Object and View commands}} | {{AGIWiki/Object and View commands}} | ||
The '''add.to.pic''' command draws a [[AGIWiki/Cel|cel]] from a [[AGIWiki/View|view]] to the [[AGIWiki/Visual picture screen|visual picture screen]] in memory. There is an [[AGIWiki/Indirect command|indirect]] version of this command called '''add.to.pic.v'''. | The '''add.to.pic''' command draws a [[AGIWiki/Cel|cel]] from a [[AGIWiki/View|view]] to the [[AGIWiki/Visual picture screen|visual picture screen]] in memory. There is an [[AGIWiki/Indirect command|indirect]] version of this command called '''add.to.pic.v'''. | ||
Line 61: | Line 62: | ||
The following example uses <code>add.to.pic</code> to draw cel 3 from loop 2 of view 15 at position (40, 120) with a priority of 9 and a margin of 0 ([[AGIWiki/Unconditional barrier|unconditional barrier]]). | The following example uses <code>add.to.pic</code> to draw cel 3 from loop 2 of view 15 at position (40, 120) with a priority of 9 and a margin of 0 ([[AGIWiki/Unconditional barrier|unconditional barrier]]). | ||
< | <syntaxhighlight lang="cpp"> | ||
load.view(15); | load.view(15); | ||
add.to.pic(15, 2, 3, 40, 120, 9, 0); | add.to.pic(15, 2, 3, 40, 120, 9, 0); | ||
</ | </syntaxhighlight> | ||
The next example uses the [[AGIWiki/Indirect command|indirect command]] <code>add.to.pic.v</code> to accomplish the same thing: | The next example uses the [[AGIWiki/Indirect command|indirect command]] <code>add.to.pic.v</code> to accomplish the same thing: | ||
< | <syntaxhighlight lang="cpp"> | ||
load.view(15); | load.view(15); | ||
Line 80: | Line 81: | ||
add.to.pic.v(v200, v201, v202, v203, v204, v210, v215); | add.to.pic.v(v200, v201, v202, v203, v204, v210, v215); | ||
</ | </syntaxhighlight> | ||
Avoiding problems with script buffer and memory while restoring the original room without [[AGIWiki/new.room|new.room]]: | Avoiding problems with script buffer and memory while restoring the original room without [[AGIWiki/new.room|new.room]]: | ||
< | <syntaxhighlight lang="cpp"> | ||
if (cutscene_block) { | if (cutscene_block) { | ||
set(f7); | set(f7); | ||
Line 101: | Line 102: | ||
reset(f7); | reset(f7); | ||
} | } | ||
</ | </syntaxhighlight> | ||
== Technical Information == | == Technical Information == |