Difference between revisions of "Bbcodeconvertexample"

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

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