|
Post by mmtbaris on Jan 26, 2016 14:31:03 GMT -8
Hi guys,
I have a problem about loading gd2 files one after another in FT800 ram memory. For example, assume that I have 2 different gd2 assets which contain ARGB4 images. When I run the code below:
GD.Clear();
GD.load("pic1.gd2"); GD.Begin(BITMAPS); GD.Vertex2ii(200, 50);
GD.load("pic2.gd2"); GD.Begin(BITMAPS); GD.Vertex2ii(0, 0);
GD.swap();
the pic2 damages the pic1. In other words, pic2 is displayed correctly, but the pic1 is not. I guess the reason is that "GD.load" function always loads asset files to memory starting from the address 0.
I want to learn that if there is a way to load second asset file beginning from end of the first asset file in FT800 memory, as GD2 library does automatically when loading jpg files below:
GD.begin();
GD.BitmapHandle(0); GD.cmd_loadimage(0, 0); GD.load("sunrise.jpg");
GD.BitmapHandle(1); GD.cmd_loadimage(-1, 0); GD.load("healsky3.jpg");
Could you please help me about this issue?
Thank you in advance
|
|
|
Post by jamesbowman on Jan 27, 2016 7:58:31 GMT -8
Right, the asset files always load data starting at address zero.
Could you put pic1 and pic2 into the same asset file? Then the code would be:
GD.load("pic12.gd2"); GD.Begin(BITMAPS); GD.Vertex2ii(200, 50, PIC1_HANDLE);
GD.Vertex2ii(0, 0, PIC2_HANDLE);
|
|