}\r
void Tile::Draw()\r
{\r
+ this->sprite->blit(\r
+ PLAYGROUND_BORDER_LEFT + this->col * FIELD_UNIT_WIDTH,\r
+ PLAYGROUND_BORDER_TOP + this->row * FIELD_UNIT_HEIGHT,\r
+ 1.0, 1.0, this->subsprite, 0, COLOUR_RGBA(0, 0, 0, 255)\r
+ );\r
#ifdef WIN32\r
D3DXVECTOR3 center(0.0f, 0.0f, 0.0f); // center at the upper-left corner\r
D3DXVECTOR3 position((FLOAT)PLAYGROUND_BORDER_LEFT+subitem_width*col, (FLOAT)PLAYGROUND_BORDER_TOP+subitem_height*row, 0.0f); // position at 50, 50 with no depth\r
#define SCREEN_HEIGHT 480\r
\r
SpriteData defaultSprites[] = {\r
- {SPR_FIELD, "Data/FIELD0.png", 640, 480},\r
- {SPR_TILE, "Data/Tiles0.png", 40, 36},\r
+ {SPR_FIELD, "Data/FIELD0.png", SCREEN_WIDTH, SCREEN_HEIGHT},\r
+ {SPR_TILE, "Data/Tiles0.png", FIELD_UNIT_WIDTH, FIELD_UNIT_HEIGHT},\r
{SPR_NONE, NULL, 0, 0}\r
};\r
\r