Skip to content

Commit 4159cac

Browse files
committed
Clean up credits image
1 parent ed4eebc commit 4159cac

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

assets/images/credits.bmp

35.5 KB
Binary file not shown.

assets/images/message.bmp

-307 KB
Binary file not shown.

include/Textures.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ class Textures {
2222
SDL_Texture * getStaticSprites() { return staticSprites; };
2323
SDL_Texture * getTankSprites() { return tankSprites; };
2424
SDL_Texture * getTeeSprites() { return teeSprites; };
25+
SDL_Texture * getWaterSprite() { return waterSprite; };
2526

2627
SDL_Texture * getMainKeysSprite() { return mainKeysSprite; };
2728
SDL_Texture * getMainBlocksSprite() { return mainBlocksSprite; };
28-
SDL_Texture * getMessageSprite() { return messageSprite; };
29-
SDL_Texture * getWaterSprite() { return waterSprite; };
29+
SDL_Texture * getCreditsSprite() { return creditsSprite; };
3030

3131
private:
3232

@@ -44,7 +44,7 @@ class Textures {
4444

4545
SDL_Texture * mainKeysSprite;
4646
SDL_Texture * mainBlocksSprite;
47-
SDL_Texture * messageSprite;
47+
SDL_Texture * creditsSprite;
4848
SDL_Texture * waterSprite;
4949

5050
SDL_Texture * loadImage(const std::string &filename);

include/Tile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ class MessageDied : public Static
10571057

10581058
protected: //functions
10591059
virtual void Display() {
1060-
// draw->BlitSquare(textures->getMessageSprite(), rotation%14 ,rotation/14, x_pos, y_pos);
1060+
// draw->BlitSquare(textures->getCreditsSprite(), rotation%14 ,rotation/14, x_pos, y_pos);
10611061
const char * messages[] = {
10621062
"Press Enter to restart",
10631063
"U to undo move"
@@ -1113,7 +1113,7 @@ class MessageCredits : public Static
11131113
protected: //functions
11141114
virtual void Display() {
11151115
if (LARGE_TEXTURES_SUPPORTED) {
1116-
draw->BlitSquare(textures->getMessageSprite(), rotation%14 ,rotation/14, x_pos, y_pos);
1116+
draw->BlitSquare(textures->getCreditsSprite(), rotation%14 ,rotation/14, x_pos, y_pos);
11171117
} else {
11181118
const char * messages[] = {
11191119
"David Dewey",

src/Board.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void Board::YouDefeated() {
216216
}
217217

218218
void Board::Credits() {
219-
for (int y=ROWS/2-5, yy=3; y<ROWS/2+6; y++, yy++) {
219+
for (int y=ROWS/2-5, yy=0; y<ROWS/2+6; y++, yy++) {
220220
for (int x=COLUMNS/2-7, xx=0; x<COLUMNS/2+7; x++, xx++) {
221221
Tile* temp=array[x][y]->over;
222222
array[x][y]->over=new MessageCredits(x,y,draw,textures,sound,this,yy*14+xx);

src/Textures.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Textures::~Textures() {
2323
if (LARGE_TEXTURES_SUPPORTED) {
2424
SDL_DestroyTexture(mainKeysSprite);
2525
SDL_DestroyTexture(mainBlocksSprite);
26-
SDL_DestroyTexture(messageSprite);
26+
SDL_DestroyTexture(creditsSprite);
2727
}
2828
}
2929

@@ -42,7 +42,7 @@ bool Textures::load() {
4242
if (LARGE_TEXTURES_SUPPORTED) {
4343
mainKeysSprite = loadImage("maink.bmp");
4444
mainBlocksSprite = loadImage("mainb.bmp");
45-
messageSprite = loadImage("message.bmp");
45+
creditsSprite = loadImage("credits.bmp");
4646
}
4747

4848
return
@@ -58,7 +58,7 @@ bool Textures::load() {
5858
waterSprite != nullptr &&
5959
(mainKeysSprite != nullptr || !LARGE_TEXTURES_SUPPORTED) &&
6060
(mainBlocksSprite != nullptr || !LARGE_TEXTURES_SUPPORTED) &&
61-
(messageSprite != nullptr || !LARGE_TEXTURES_SUPPORTED);
61+
(creditsSprite != nullptr || !LARGE_TEXTURES_SUPPORTED);
6262

6363
}
6464

0 commit comments

Comments
 (0)