TrustedUser
2,147
edits
m |
(→Example: Fix syntax highlighting) |
||
Line 62: | 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]]). | ||
< | <source 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); | ||
</ | </source> | ||
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: | ||
< | <source lang="cpp"> | ||
load.view(15); | load.view(15); | ||
Line 81: | Line 81: | ||
add.to.pic.v(v200, v201, v202, v203, v204, v210, v215); | add.to.pic.v(v200, v201, v202, v203, v204, v210, v215); | ||
</ | </source> | ||
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]]: | ||
< | <source lang="cpp"> | ||
if (cutscene_block) { | if (cutscene_block) { | ||
set(f7); | set(f7); | ||
Line 102: | Line 102: | ||
reset(f7); | reset(f7); | ||
} | } | ||
</ | </source> | ||
== Technical Information == | == Technical Information == |