Bienvenido a los foros de FT81x Manía. Te invitamos a regístrate totalmente gratis. Disfruta de tu experiencia con un grandes amigos y Staff.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Thread Contributor: jblazegconverting with gd2asset

#1
0
hello,

i tried to convert graphics with gd2asset but with no luck. The screen stays dark after uploading.

Even a already converted asset which seem to work elsewhere keeps the screen dark (see attachment). WHat am I doing wrong? I tried to convert with gd2asset and gd3asset - no change. After gd2 conbversion i get no error - just the normal "Assets report"

Cheers
Hendrik

attached is the jpg-file. converted gd2 is here: http://hsitc.de/t/heise.gd2

header:
#define LOAD_ASSETS()  GD.load("heise.gd2");
#define HEISE_HANDLE 0
#define HEISE_WIDTH 46
#define HEISE_HEIGHT 43
#define HEISE_CELLS 1
#define ASSETS_END 3956UL
static const shape_t HEISE_SHAPE = {0, 46, 43, 0};

ino:
#include <EEPROM.h>
#include <SPI.h>
#include <GD2.h>

#include "heise.h"

const unsigned int LOGO_TAG = 42;

unsigned int logo_x;
unsigned int logo_y;

void setup() {
 GD.begin();
 LOAD_ASSETS();
 set_logo_position();
}

void loop() {
 GD.ClearColorRGB(0xffffff);
 GD.Clear();
 
 GD.Begin(BITMAPS);
 GD.Tag(LOGO_TAG);
 GD.Vertex2ii(logo_x, logo_y, HEISE_HANDLE, 0);
 
 GD.ColorRGB(0x444444);
 GD.cmd_text(240, 136, 30, OPT_CENTER, "c't Hardware Hacks");
 
 GD.get_inputs();
 if (GD.inputs.tag == LOGO_TAG)
   set_logo_position();
 
 GD.swap();
}

void set_logo_position() {
 logo_x = GD.random(480 - HEISE_WIDTH);
 logo_y = GD.random(272 - HEISE_HEIGHT);
}


Attached Files
.jpg   heise.jpg (Size: 3.07 KB / Downloads: 11)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)