gb.save.get

Description

//number:
int32_t gb.save.get( uint16_t block )
//buffer:
void gb.save.get( uint16_t block , void* buffer , uint8_t buffersize )
//object:
void gb.save.get( uint16_t , T object )

gb.save.get gets a variable off of the savefile. This operation is slow!

  • Number You just specify the block number and it returns the integer.
  • Buffer You need to specify a pointer and the size of the buffer
  • Object You can specify an arbitrary object which will get populated.

Parameters

  • uint16_t block: saveblock to fetch
  • for the others: see above

Returns

see above

Example

#include <Gamebuino-Meta.h>

void setup() { gb.begin();

// fetch a number int32_t number = gb.save.get(0);

// fetch a buffer uint8_t buffer[10]; gb.save.get(1, buffer, 10); }

void loop() {

}