Difference between revisions of "Gb.begin"

From Gamebuino Wiki
Jump to: navigation, search
(Example: updated url)
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
__NOTOC__
 
__NOTOC__
= Description =
+
== Description ==
Initialize the Gamebuino and displays the startup screen. Should be called once at the beginning of the setup() function.
+
Initialize the Gamebuino. Should be called once at the beginning of the <code>setup()</code> function, followed by <code>[[gb.titleScreen]]()</code> and <code>[[gb.pickRandomSeed]]()</code>.
  
= Syntax =
+
== Syntax ==
<code>gb.begin(F("name"), logo)</code>
+
<pre>gb.begin();</pre>
  
= Parameters =
+
== Parameters ==
* F("name") ''(optional)'': Replace "name" with the name of your game (but keep the " "). Will be displayed in the start menu.
+
none
* logo ''(optional)'': The logo of your game. Any size from 8*8px up to 64*28px.
 
  
= Returns =
+
== Returns ==
 
none
 
none
  
= Example =
+
== Example ==
<pre>
+
<gistit>https://github.com/Rodot/Gamebuino/blob/master/examples/5.Reference/core/begin/begin.ino</gistit>
#include <SPI.h>
 
#include <Gamebuino.h>
 
Gamebuino gb;
 
 
 
static unsigned char PROGMEM logo[]=
 
{
 
  8,8,
 
  B00000000,
 
  B00100100,
 
  B00011000,
 
  B01111110,
 
  B00111100,
 
  B01111110,
 
  B00111100,
 
  B00000000,
 
};
 
 
 
void setup(){
 
  // initialize the Gamebuino object
 
  gb.begin(F("Example game"), logo);
 
}
 
</pre>
 
  
= See also =
+
== See also ==
*[TODO]Logo encoding
+
* [[gb.titleScreen]]
*[TODO]Progmem text
+
* [[gb.pickRandomSeed]]

Latest revision as of 2016-12-15T01:54:08

Description

Initialize the Gamebuino. Should be called once at the beginning of the setup() function, followed by gb.titleScreen() and gb.pickRandomSeed().

Syntax

gb.begin();

Parameters

none

Returns

none

Example

See also