2019-09-13 14:43:18 +03:00
|
|
|
#include <TXLib.h>
|
2019-12-07 14:47:15 +03:00
|
|
|
#include "lib\\Consts.h"
|
|
|
|
#include "lib\\ElemFunctions.h"
|
|
|
|
#include "lib\\ModesFunctions.h"
|
|
|
|
|
2019-09-20 15:08:09 +03:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
void background(COLORREF color);
|
2019-11-08 15:36:32 +03:00
|
|
|
|
2019-09-20 15:08:09 +03:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
txCreateWindow(1300, 600);
|
2019-09-27 15:34:57 +03:00
|
|
|
|
2019-11-01 15:36:18 +03:00
|
|
|
block = txLoadImage("pictures\\block.bmp");
|
|
|
|
quest = txLoadImage("pictures\\question.bmp");
|
|
|
|
water = txLoadImage("pictures\\water.bmp");
|
|
|
|
fire = txLoadImage("pictures\\fire.bmp");
|
|
|
|
|
2019-09-20 15:08:09 +03:00
|
|
|
middleX = txGetExtentX() / 2;
|
|
|
|
middleY = txGetExtentY() / 2;
|
|
|
|
extentX = txGetExtentX();
|
|
|
|
extentY = txGetExtentY();
|
|
|
|
|
|
|
|
background(TX_WHITE);
|
|
|
|
txSleep(50);
|
|
|
|
|
|
|
|
txBegin();
|
|
|
|
|
2019-09-23 15:35:44 +03:00
|
|
|
txSleep(1000);
|
2019-09-27 15:34:57 +03:00
|
|
|
|
|
|
|
txSetColor(MY_LIGHTBLUE, 2);
|
|
|
|
txSetFillColor(TX_WHITE);
|
|
|
|
txRectangle(0, 0, extentX, extentY);
|
|
|
|
|
|
|
|
txSetColor(MY_LIGHTBLUE, 2);
|
|
|
|
txSetFillColor(MY_LIGHTBLUE);
|
|
|
|
txRectangle(0, 0, extentX, 50);
|
|
|
|
|
|
|
|
txSetColor(TX_BLACK, 3);
|
|
|
|
txSetFillColor(TX_WHITE);
|
|
|
|
txDrawText(0, 0, extentX, 50, "����������� ������� ���� FallSimulation");
|
|
|
|
|
2019-09-20 15:08:09 +03:00
|
|
|
drawMenu();
|
|
|
|
|
2019-12-04 16:40:25 +03:00
|
|
|
if (lvlCreatingIsStarted) {
|
|
|
|
mainFunc();
|
|
|
|
}
|
|
|
|
else if (gameIsStarted) {
|
|
|
|
playGame(gettedMapParts);
|
|
|
|
}
|
|
|
|
|
2019-09-20 15:08:09 +03:00
|
|
|
txEnd();
|
|
|
|
|
2019-09-27 15:34:57 +03:00
|
|
|
txDeleteDC(block);
|
|
|
|
txDeleteDC(quest);
|
2019-10-11 15:36:39 +03:00
|
|
|
txDeleteDC(water);
|
2019-10-12 17:06:30 +03:00
|
|
|
txDeleteDC(fire);
|
2019-09-27 15:34:57 +03:00
|
|
|
|
2019-11-01 15:36:18 +03:00
|
|
|
txDeleteDC(light_stone);
|
|
|
|
txDeleteDC(dark_stone);
|
|
|
|
txDeleteDC(vdark_stone);
|
|
|
|
|
2019-09-20 15:08:09 +03:00
|
|
|
txDisableAutoPause();
|
|
|
|
}
|
|
|
|
|
|
|
|
void background(COLORREF color)
|
|
|
|
{
|
|
|
|
txSetFillColor(color);
|
|
|
|
txClear();
|
|
|
|
}
|
|
|
|
|