Skip to content

Commit

Permalink
Added 3 hidden silverfish blocks (closes equalpants#24, closes equalp…
Browse files Browse the repository at this point in the history
…ants#26, closes equalpants#27)

Added mossy and cracked stone bricks (closes equalpants#21, closes equalpants#22)

	modified:   blockimages.cpp
	modified:   blockimages.h
  • Loading branch information
jcornwellshiel committed Sep 27, 2011
1 parent 6274952 commit 09c51f7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
19 changes: 17 additions & 2 deletions blockimages.cpp
Expand Up @@ -1310,10 +1310,16 @@ void BlockImages::setOffsets()
blockOffsets[offsetIdx(96, 6)] = 279;
blockOffsets[offsetIdx(96, 7)] = 280;

setOffsetsForID(97, 325, *this); // hidden silverfish - default is stone
blockOffsets[offsetIdx(97, 1)] = 326; // cobble
blockOffsets[offsetIdx(97, 2)] = 327; // stone brick

setOffsetsForID(98, 281, *this); // Stone brick
// blockOffsets[offsetIdx(98, 1)] = 281; // mossy
// blockOffsets[offsetIdx(98, 2)] = 281; // cracked
blockOffsets[offsetIdx(98, 1)] = 323; // mossy
blockOffsets[offsetIdx(98, 2)] = 324; // cracked

// Note: the mushroom stuff only draws two types of blocks for each mushroom type: stalk and top.
// There are actually multiple combinations of face textures for head blocks, hence the multiple offsets.
setOffsetsForID(99, 310, *this); // huge brown mushroom
blockOffsets[offsetIdx(99, 1)] = 309;
blockOffsets[offsetIdx(99, 2)] = 309;
Expand Down Expand Up @@ -1366,6 +1372,7 @@ void BlockImages::setOffsets()
blockOffsets[offsetIdx(109, 3)] = 285;
blockOffsets[offsetIdx(109, 4)] = 286;
blockOffsets[offsetIdx(109, 5)] = 287;

}

void BlockImages::checkOpacityAndTransparency(int B)
Expand Down Expand Up @@ -1801,7 +1808,15 @@ bool BlockImages::construct(int B, const string& terrainfile, const string& fire

drawFire(img, getRect(189), firetile, B); // fire


drawBlockImage(img, getRect(325), tiles, 1, 1, 1, B); // hidden silverfish - stone
drawBlockImage(img, getRect(326), tiles, 16, 16, 16, B); // hidden silverfish - cobble
drawBlockImage(img, getRect(327), tiles, 54, 54, 54, B); // hidden silverfish - stone brick

drawBlockImage(img, getRect(281), tiles, 54, 54, 54, B); // stone brick
drawBlockImage(img, getRect(323), tiles, 100, 54, 54, B); // mossy stone brick
drawBlockImage(img, getRect(324), tiles, 101, 54, 54, B); // cracked stone brick

drawBlockImage(img, getRect(292), tiles, 136, 136, 137, B); // melon block

drawBlockImage(img, getRect(307), tiles, 125, 125, 125, B); // big red mushroom head
Expand Down
10 changes: 9 additions & 1 deletion blockimages.h
Expand Up @@ -114,7 +114,7 @@ struct BlockImages
bool construct(int B, const std::string& terrainfile, const std::string& firefile);
};

#define NUMBLOCKIMAGES 323
#define NUMBLOCKIMAGES 327

// block image offsets:
//
Expand Down Expand Up @@ -256,4 +256,12 @@ struct BlockImages
// 321 iron bars facing N
// 322 iron bars facing S

// 323 mossy stone brick
// 324 cracked stone brick
// 325 hidden silverfish - stone
// 326 hidden silverfish - cobblestone
// 327 hidden silverfish - stone brick



#endif // BLOCKIMAGES_H

0 comments on commit 09c51f7

Please sign in to comment.