Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
I'm having trouble drawing background after using text/drawing commands from drawing.h.
After drawing the score and some lines to the screen when I try to load the background for the win/lose screen it looks glitchy and weird. I know it's something to do with using the drawing functions in drawing.h in conjunction with the background?
if (enemy_score != player_score) {
wait_vbl_done();
HIDE_BKG;
set_bkg_data(0,212, &win_data);
set_bkg_tiles(0,0,20,18,&win_map);
HIDE_SPRITES;
SHOW_BKG;
waitpad(J_START);
waitpadup();
}
else {
wait_vbl_done();
HIDE_BKG;
set_bkg_data(0,180, &lose_data);
set_bkg_tiles(0,0,20,18,&lose_map);
HIDE_SPRITES;
SHOW_BKG;
waitpad(J_START);
waitpadup();
}
Offline
Yep. I'm prettu sure you can't mix drawing.h with anything else (and you should avoid drawing.h anyways), due to how Game Boy gfx work.
Offline
ISSOtm wrote:
Yep. I'm prettu sure you can't mix drawing.h with anything else (and you should avoid drawing.h anyways), due to how Game Boy gfx work.
It's just for drawing lines and gprintf etc.
So there's really no way to fix it? All I want it to do is draw a background. Is there no way I can flush the memory of VRAM or do some kind of work around?
Offline
You can clear the tilemap, that should remove all the glitchiness.
Offline