Difference between revisions of "AGIWiki/add.to.pic"

Jump to navigation Jump to search
6 bytes removed ,  20:58, 11 May 2016
→‎Example: Fix syntax highlighting
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]]).


<syntax type = "C++">
<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);
</syntax>
</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:


<syntax type = "C++">
<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);
</syntax>
</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]]:


<syntax type = "C++">
<source lang="cpp">
if (cutscene_block) {
if (cutscene_block) {
   set(f7);  
   set(f7);  
Line 102: Line 102:
   reset(f7);
   reset(f7);
}
}
</syntax>
</source>


== Technical Information ==
== Technical Information ==
TrustedUser
2,147

edits

Navigation menu