Code: Select all
u16 VDP_drawBitmap(u16 plan, const Bitmap *bitmap, u16 x, u16 y);
Code: Select all
VDP_drawBitmap(VDP_PLAN_A, car, 3, 3);
Moderator: Stef
Code: Select all
u16 VDP_drawBitmap(u16 plan, const Bitmap *bitmap, u16 x, u16 y);
Code: Select all
VDP_drawBitmap(VDP_PLAN_A, car, 3, 3);
Code: Select all
VDP_drawBitmap(VDP_PLAN_A, car, 3, 3);
Code: Select all
BITMAP car "car.bmp" -1
Code: Select all
src\main.c|10|error: incompatible type for argument 2 of `VDP_drawBitmap'|
Hi Mixail, thank you for your response. My project setup is already based on the sample sprite, it copies everything but the main.c and res.Mixail wrote:matteus, use sample ...\sample\sprite
Oh sorry, my fault, you have to pass the pointer of the structure of course :matteus wrote:Code
Code: Select all
VDP_drawBitmap(VDP_PLAN_A, car, 3, 3);
Res file
ErrorCode: Select all
BITMAP car "car.bmp" -1
Code: Select all
src\main.c|10|error: incompatible type for argument 2 of `VDP_drawBitmap'|
Code: Select all
VDP_drawBitmap(VDP_PLAN_A, &car, 3, 3);
Well when I say bitmap engine I mean the bitmap based VDP methodsStef wrote:Oh sorry, my fault, you have to pass the pointer of the structure of course :matteus wrote:Code
Code: Select all
VDP_drawBitmap(VDP_PLAN_A, car, 3, 3);
Res file
ErrorCode: Select all
BITMAP car "car.bmp" -1
Code: Select all
src\main.c|10|error: incompatible type for argument 2 of `VDP_drawBitmap'|
And if you intend to use the bitmap engine directly then use the BMP_xxx methods insteadCode: Select all
VDP_drawBitmap(VDP_PLAN_A, &car, 3, 3);
Code: Select all
VDP_drawImage(VDP_PLAN_A, &car_image, 3, 0);
VDP_drawImage(VDP_PLAN_B, &background_image, 3, 0);
Code: Select all
#include <genesis.h>
#include "gfx.h"
#include "music.h"
int main()
{
u16 palette[32];
u16 ind;
// initialization
VDP_setScreenWidth320();
// set all palettes to black
VDP_setPaletteColors(0, palette_black, 64);
// load background
ind = TILE_USERINDEX;
VDP_drawImageEx(BPLAN, &background_image, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 4, 0, FALSE, TRUE);
ind += background_image.tileset->numTile;
VDP_drawImageEx(APLAN, &character_image, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, ind), 4, 0, FALSE, TRUE);
ind += character_image.tileset->numTile;
// prepare palette
memcpy(&palette[0], background_image.palette->data, 16 * 2);
memcpy(&palette[16], character_image.palette->data, 16 * 2);
//VDP_drawImage(VDP_PLAN_B, &background_image, 3, 0);
//VDP_drawImage(VDP_PLAN_A, &character_image, 3, 0);
// fade in
VDP_fadeIn(0, (2 * 16) - 1, palette, 20, FALSE);
while(1)
{
VDP_waitVSync();
}
return 0;
}