Merge pull request #19 from IngCenter/DarkCat09-patch-1

Add files via upload
This commit is contained in:
Mikhail Abramov 2019-11-02 13:49:51 +03:00 committed by GitHub
commit 8c9f527c79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 10 deletions

View file

@ -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;
@ -61,6 +67,11 @@ int main()
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) {
if (txMouseX() < txGetExtentX() - BLOCK_SIZE) {
mapParts[*arrElem] = { mapParts[*arrElem] = {
{ {
txMouseX() - 30, txMouseY() - 30, txMouseX() + 30, txMouseY() + 30 txMouseX() - 30, txMouseY() - 30, txMouseX() + 30, txMouseY() + 30
}, true, pic, blocktype }, true, pic, blocktype
}; };
(*arrElem)++; (*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

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
stone_light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
stone_vdark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB