This may help you solve your spelling problem.azaron08 wrote:Wht the h*ll does that mean
This may help you solve your IRC problem.
Google may help you solve the rest of your problems.
Do you even think before you type?
Moderator: PC Supremacists
This may help you solve your spelling problem.azaron08 wrote:Wht the h*ll does that mean
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
First, do not insult our intelligence by intentionally making yourself seem stupider than you claim to be. If you don't at least try to spell things correctly, there is no way in hell that we will take you seriously.azaron08 wrote:Yes I knw how 2 spell I just choose not 2.....I rlly need help with programming plz don't be a Dick and help me......
We call it "bmp" because that's the typical filename suffix. Yes, bmp is short for Bitmap, and the 24-bit aspect is rather incidental in this case, just as it's incidental that the colors are in BGR order.azaron08 wrote:i cant save as just a bmp i can only save it as a "24-bit Bitmap (*.bmp;*.dib) is that it????
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Dude, seriously? Format your code using the code tag for god sake. -_-azaron08 wrote:it doesnt look like any thing is wrong with the code!! u tell me!! i cant figure it out.....it will pull up a white screen but no image:
#include <SDL.h>
#include <string>
#include <iostream>
using namespace std;
int main( int argc,char* args[] )
{
//initilization,setup screen,running screen
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Surface*screen,*image;
screen=SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
bool running=true;
const int FPS=30;
Uint32 start;
bool b[4]={0,0,0,0};
SDL_Rect rect;
rect.x=10;
rect.y=10;
rect.w=20;
rect.h=20;
Uint32 color=SDL_MapRGB(screen->format,0xff,0xff,0xff);
Uint32 color2=SDL_MapRGB(screen->format,0xff,0x00,0x00);
image=SDL_LoadBMP("bmp.bmp");
cout<<image;
while (running)
{
start=SDL_GetTicks();
SDL_Event event;
while(SDL_PollEvent(&event))
{
switch(event.type)
{
case SDL_QUIT:
running=false;
break;
break;
}
}
//logic
//render
SDL_FillRect(screen,&screen->clip_rect,color);
//SDL_FillRect(screen,&rect,color2);
SDL_BlitSurface(image,NULL,screen,NULL);
SDL_Flip(screen);
if(1000/FPS>SDL_GetTicks()-start)
SDL_Delay(1000/FPS-(SDL_GetTicks()-start));
}
SDL_FreeSurface(image);
SDL_Quit();
return 0;
}
Code: Select all
#include <SDL.h>
#include <string>
#include <iostream>
using namespace std;
int main( int argc,char* args[] )
{
//initilization,setup screen,running screen
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Surface*screen,*image;
screen=SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
bool running=true;
const int FPS=30;
Uint32 start;
bool b[4]={0,0,0,0};
SDL_Rect rect;
rect.x=10;
rect.y=10;
rect.w=20;
rect.h=20;
Uint32 color=SDL_MapRGB(screen->format,0xff,0xff,0xff);
Uint32 color2=SDL_MapRGB(screen->format,0xff,0x00,0x00);
image=SDL_LoadBMP("bmp.bmp");
cout<<image;
while (running)
{
start=SDL_GetTicks();
SDL_Event event;
while(SDL_PollEvent(&event))
{
switch(event.type)
{
case SDL_QUIT:
running=false;
break;
break;
}
}
//logic
//render
SDL_FillRect(screen,&screen->clip_rect,color);
//SDL_FillRect(screen,&rect,color2);
SDL_BlitSurface(image,NULL,screen,NULL);
SDL_Flip(screen);
if(1000/FPS>SDL_GetTicks()-start)
SDL_Delay(1000/FPS-(SDL_GetTicks()-start));
}
SDL_FreeSurface(image);
SDL_Quit();
return 0;
}
Dude...the button to the right of the 'Quote' one, clearly says 'Code'. Ah well. :3azaron08 wrote:sorry i didnt know how....
Code: Select all
system("pwd"); // for unix
system("dir"); // for Windows