Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

version 0.5.6

  • Loading branch information...
commit 08cdebac294bf10cc4756a8bfa20d04dc4917506 1 parent ad90be5
@calex22 authored
Showing with 20 additions and 3 deletions.
  1. +18 −2 Trash run/game.cpp
  2. +2 −1  Trash run/game.h
View
20 Trash run/game.cpp
@@ -32,7 +32,16 @@ int modeLEFT = 1;
int modeRIGHT = 1;
char fediaPlayerName[] = "Siy Da"; // CHARACTER NAME
-
+void gameClass::drawQ()
+{
+ ob = SDL_LoadBMP("skilt.bmp");
+ SDL_Rect box;
+ box.h = 384;
+ box.w = 256;
+ box.x = 50;
+ box.y = 20;
+ SDL_BlitSurface(ob, NULL, screen, &box);
+}
bool gameClass::collision(SDL_Rect* rect1,SDL_Rect* rect2)
{
if(rect1->y >= rect2->y + rect2->h)
@@ -249,7 +258,7 @@ if(mode == 1)
}
else
{
- cout << "ehJ";
+ drawQ();
}
}
@@ -514,6 +523,13 @@ void gameClass::start()
//cout << "Fedia --> " << "couldn't load splashscreen" << endl; // hmm har du glemt at lægge bmp. filen i mappen?
}
}
+ if(modeGame == 1)
+ {
+ }
+ else if(modeGame == 0)
+ {
+ drawQ();
+ }
SDL_Flip(screen);
if(1000/FPS > SDL_GetTicks()-start) { // Vi kan ikke have 1000 fps -.-
SDL_Delay(1000/FPS-(SDL_GetTicks()-start));
View
3  Trash run/game.h
@@ -18,7 +18,7 @@ class gameClass{
int points,del,width,height;
char direction;
bool get;
- SDL_Surface* screen, *text, *image, *character, *quest, *img2, *img3, *img4, *img5, *img6, *img7, *img8, *vand;
+ SDL_Surface* screen, *text, *image, *character, *quest, *img2, *img3, *img4, *img5, *img6, *img7, *img8, *vand, *ob;
TTF_Font* font;
void drawRect();
void putfood();
@@ -28,6 +28,7 @@ class gameClass{
void drawInterface();
void makeMap(int mapID);
void drawQuest();
+ void drawQ();
// MÅ HELLER IK SLETTES
fediaMap map;
Please sign in to comment.
Something went wrong with that request. Please try again.