erkan
Junior Member
Posts: 12
|
Post by erkan on May 28, 2019 5:15:43 GMT -8
Hi,
Convert asset like;
C:\g3>gd3.exe C.ttf,size=100
Assets report
-------------
Header file: default_assets.h
GD3 RAM used: 575092
Flash used: 38256 But I cannot load from code why? It gives this error;
In file included from src\main.cpp:6:0:
include/font.h: At global scope:
include/font.h:1163:3: error: 'Bitmap' does not name a type
Bitmap al_c;
^
include/font.h:1166:1: error: too many initializers for '<anonymous struct>'
};
^
src\main.cpp: In function 'void setup()':
include/font.h:1160:65: error: 'class GDClass' has no member named 'loadptr'
#define LOAD_ASSETS() (GD.copy(__assets, sizeof(__assets)), GD.loadptr = ASSETS_END)
^
src\main.cpp:11:3: note: in expansion of macro 'LOAD_ASSETS'
LOAD_ASSETS(); My code is;
#include <EEPROM.h>
#include <SPI.h>
#include <GD3.h>
#include "font.h"
void setup()
{
GD.begin(0);
LOAD_ASSETS();
}
void loop()
{
GD.ClearColorRGB(0x103000);
GD.Clear();
GD.cmd_text(240, 136, C_HANDLE, OPT_CENTER, "Hello");
GD.swap();
}
is there problem with loading assets for GD3 lib?
|
|