Man, im really frustrated right now, and I recently read some article about how frustration causes your heartbeart to bounce up down irregularly, so now Im frustrated about how thats feeling
Im trying to get an icon image Ive loaded to show up on the screen, and its JUST NOT WORKING.
dbSprite, dbPasteImage both simply refuse to show me my friggin bitmap.
heres the relevant code:
loading
void sys_loadmedia (p4OS_globals* global)
{
dbSetDir("media");
global->img_minimize = sys_findfreeimage();
dbLoadImage("minimize.bmp",global->img_minimize);
if (dbImageExist(global->img_minimize)==0)
{
MessageBox(NULL, "File "minimize.bmp" does not exist", "MyApp", MB_ICONEXCLAMATION);
}
global->img_maximize = sys_findfreeimage();
dbLoadImage("maximize.bmp",global->img_maximize);
if (dbImageExist(global->img_maximize)==0)
{
MessageBox(NULL, "File "maximize.bmp" does not exist", "MyApp", MB_ICONEXCLAMATION);
}
global->img_close = sys_findfreeimage();
dbLoadImage("close.bmp" ,global->img_close);
if (dbImageExist(global->img_close)==0)
{
MessageBox(NULL, "File "close.bmp" does not exist", "MyApp", MB_ICONEXCLAMATION);
}
}
void gui_windowDraw (p4OS_globals* global)
{
for (int i=0;i<global->gui_windowBuffer.size();i++)
{
p4OS_window temp=global->gui_windowBuffer[i];
// window
dbInk (dbRGB(75,75,105),0);
gui_drawRoundedBox (temp.wXpos,temp.wYpos,temp.wXpos+temp.wXsize,temp.wYpos+temp.wYsize);
// border
dbInk (dbRGB(100,100,140),0);
gui_drawRoundedBox (temp.wXpos+2,temp.wYpos+2,temp.wXpos+temp.wXsize-2,temp.wYpos+temp.wYsize-2);
// content background
dbInk (dbRGB(75,75,105),0);
gui_drawBottomRoundedBox (temp.wXpos+6,temp.wYpos+26,temp.wXpos+temp.wXsize-6,temp.wYpos+temp.wYsize-6);
// title text
gui_textAdd (global,10+temp.wXpos,10+temp.wYpos,temp.wTitle,0);
// close button <- HERES THE PROBLEM
dbPasteImage(global->img_close,0,0);
//dbSprite(1,0,0,global->img_close);
}
}
}
its not some stupid X,Y problem, ive tried all over the screen, it cant be some set current bitmap problem ive tried that, ive tried placing the command in different functions, in the main loop, but no matter what i do, it doesnt want to draw my image.