Add files via upload
Edited main.cpp and Added stone pictures.
This commit is contained in:
parent
ec00db9108
commit
c23697f179
4 changed files with 35 additions and 10 deletions
|
@ -7,6 +7,8 @@ using namespace std;
|
||||||
const COLORREF MY_LIGHTBLUE = RGB(75, 127, 196);
|
const COLORREF MY_LIGHTBLUE = RGB(75, 127, 196);
|
||||||
const COLORREF MY_BISQUE = RGB(255, 214, 89);
|
const COLORREF MY_BISQUE = RGB(255, 214, 89);
|
||||||
|
|
||||||
|
const int BLOCK_SIZE = 120;
|
||||||
|
|
||||||
const int BLOCK_TYPE = 0;
|
const int BLOCK_TYPE = 0;
|
||||||
const int QUEST_TYPE = 1;
|
const int QUEST_TYPE = 1;
|
||||||
const int WATER_TYPE = 2;
|
const int WATER_TYPE = 2;
|
||||||
|
@ -40,6 +42,10 @@ HDC quest;
|
||||||
HDC water;
|
HDC water;
|
||||||
HDC fire;
|
HDC fire;
|
||||||
|
|
||||||
|
HDC light_stone;
|
||||||
|
HDC dark_stone;
|
||||||
|
HDC vdark_stone;
|
||||||
|
|
||||||
HDC orange_but;
|
HDC orange_but;
|
||||||
HDC green_but;
|
HDC green_but;
|
||||||
HDC blue_but;
|
HDC blue_but;
|
||||||
|
@ -57,10 +63,15 @@ int main()
|
||||||
{
|
{
|
||||||
txCreateWindow(1300, 600);
|
txCreateWindow(1300, 600);
|
||||||
|
|
||||||
block = txLoadImage("pictures\\block.bmp");
|
block = txLoadImage("pictures\\block.bmp");
|
||||||
quest = txLoadImage("pictures\\question.bmp");
|
quest = txLoadImage("pictures\\question.bmp");
|
||||||
water = txLoadImage("pictures\\water.bmp");
|
water = txLoadImage("pictures\\water.bmp");
|
||||||
fire = txLoadImage("pictures\\fire.bmp");
|
fire = txLoadImage("pictures\\fire.bmp");
|
||||||
|
|
||||||
|
light_stone = txLoadImage("pictures\\stone_light.bmp");
|
||||||
|
dark_stone = txLoadImage("pictures\\stone_dark.bmp");
|
||||||
|
vdark_stone = txLoadImage("pictures\\stone_vdark.bmp");
|
||||||
|
|
||||||
//orange_but = txLoadImage("pictures\\orange-but.bmp");
|
//orange_but = txLoadImage("pictures\\orange-but.bmp");
|
||||||
//green_but = txLoadImage("pictures\\green-but.bmp");
|
//green_but = txLoadImage("pictures\\green-but.bmp");
|
||||||
//blue_but = txLoadImage("pictures\\blue-but.bmp");
|
//blue_but = txLoadImage("pictures\\blue-but.bmp");
|
||||||
|
@ -99,6 +110,10 @@ int main()
|
||||||
txDeleteDC(water);
|
txDeleteDC(water);
|
||||||
txDeleteDC(fire);
|
txDeleteDC(fire);
|
||||||
|
|
||||||
|
txDeleteDC(light_stone);
|
||||||
|
txDeleteDC(dark_stone);
|
||||||
|
txDeleteDC(vdark_stone);
|
||||||
|
|
||||||
txDisableAutoPause();
|
txDisableAutoPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,6 +411,8 @@ void mainFunc()
|
||||||
lvlfile << "";
|
lvlfile << "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
txMessageBox("Level File created!", "Information");
|
||||||
}
|
}
|
||||||
|
|
||||||
txSleep(10);
|
txSleep(10);
|
||||||
|
@ -416,17 +433,25 @@ bool addingBlock(bool clicked, RECT blockBut, HDC pic,
|
||||||
if (!(txMouseButtons() & 1) && clicked) {
|
if (!(txMouseButtons() & 1) && clicked) {
|
||||||
|
|
||||||
if (*arrElem < MAP_LENGHT) {
|
if (*arrElem < MAP_LENGHT) {
|
||||||
mapParts[*arrElem] = {
|
|
||||||
{
|
if (txMouseX() < txGetExtentX() - BLOCK_SIZE) {
|
||||||
txMouseX() - 30, txMouseY() - 30, txMouseX() + 30, txMouseY() + 30
|
|
||||||
}, true, pic, blocktype
|
mapParts[*arrElem] = {
|
||||||
};
|
{
|
||||||
(*arrElem)++;
|
txMouseX() - 30, txMouseY() - 30, txMouseX() + 30, txMouseY() + 30
|
||||||
|
}, true, pic, blocktype
|
||||||
|
};
|
||||||
|
|
||||||
|
(*arrElem)++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
char maplen_str[50];
|
char maplen_str[50];
|
||||||
|
|
||||||
sprintf(maplen_str, "You cannot add more than %d blocks", MAP_LENGHT);
|
sprintf(maplen_str, "You cannot add more than %d blocks", MAP_LENGHT);
|
||||||
txMessageBox(maplen_str, "Error");
|
txMessageBox(maplen_str, "Error");
|
||||||
|
|
||||||
(*arrElem)--;
|
(*arrElem)--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
stone_dark.png
Normal file
BIN
stone_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 171 KiB |
BIN
stone_light.png
Normal file
BIN
stone_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
BIN
stone_vdark.png
Normal file
BIN
stone_vdark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
Loading…
Add table
Reference in a new issue