Difference between revisions of "Bbcodeconvertexample"

From Learn @ Cemetech
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
''How to set up Debug Mode for CEmu''
+
== BBCtoWiki Example ======
<blockquote>1) Enable it in the makefile ''''DEBUGMODE ?= DEBUG'''
 
2) Add ''''#include <debug.h>''' to the makefiles
 
3) Use this code for variables. ''''dbg_sprintf(dbgout, "%d\n", variableName); '''
 
4) Use this code for text. ''''dbg_sprintf(dbgout, "Hi\n");'''
 
</blockquote>
 
''How to Store and Retrieve Highscores or Variables from an AppVar''
 
<blockquote>1) Declare ''''file''' as a ''''ti_var_t''' variable, and ''''highscore''' as an ''''uint8_t'''
 
2) When you want to store a value to the appvar, use this code. Interchange ''''highscore''' with the name of your variable getting stored, and ''''scorevar''' with the name of your appvar.<pre>ti_CloseAll();
 
    file = ti_Open("scorevar", "w");
 
    if (file)
 
        ti_Write(&highscore, sizeof(highscore), 1, file); 
 
}</pre> 3) When you want to store a value from the appvar to a variable, use this code. Interchange ''''highscore''' with the name of your variable getting retrieved, and ''''scorevar''' with the name of your appvar. <pre>ti_CloseAll();
 
file = ti_Open("scorevar", "r");
 
if (file) {
 
ti_Read(&highscore, sizeof(highscore), 1, file);
 
    }</pre>
 
  
</blockquote>
+
''Wassup! ''''This is an example!'''''
 +
<strike>Strike this text, it makes no sense!</strike>
 +
==== And don't forget an image! ======
 +
https://www.cemetech.net/forum/templates/Cemetech6/images/logo.png
 +
Lets indent this code, as well!
 +
<blockquote><pre>codecodecode codecodecode codecodecode
 +
codecodecode codecodecode
 +
codecodecode
 +
codecodecode
 +
codecodecode codecodecode codecodecode
 +
</pre>
 +
</blockquote>[http://www.google.com google]

Latest revision as of 19:25, 23 July 2016

BBCtoWiki Example ====

Wassup! 'This is an example! Strike this text, it makes no sense!

And don't forget an image! ==

logo.png Lets indent this code, as well!

codecodecode codecodecode codecodecode 
codecodecode codecodecode 
codecodecode 
codecodecode 
codecodecode codecodecode codecodecode 

google