Skip to content
This repository was archived by the owner on May 2, 2019. It is now read-only.

Commit 3ee7007

Browse files
author
Patrick Rye
committed
Update to v0.7.0
## [0.7.0] - 2015-09-10 ### Added * Dragging for editing map * Prompt for getting new map * Prompt for quitting if hitting 'Q' or ESC ### Changed * Windows Font from Arial to Garamound
1 parent d37a91a commit 3ee7007

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

Documentation/ChangeLog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented here.
44
This project adheres to [Semantic Versioning](http://semver.org/)
55

6+
## [0.7.0] - 2015-09-10
7+
### Added
8+
* Dragging for editing map
9+
* Prompt for getting new map
10+
* Prompt for quitting if hitting 'Q' or ESC
11+
12+
### Changed
13+
* Windows Font from Arial to Garamound
14+
15+
616
## [0.6.0] - 2015-09-10
717
### Added
818
* Restarting of map

Source/main.cpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,10 @@ void Toolbar::draw() {
477477
}
478478
/**********************************************************************************************************************************************/
479479
void Toolbar::check_events(SDL_Event* e) {
480-
if ( e->type == SDL_MOUSEBUTTONDOWN) {
480+
static bool blnButtonDown;
481+
if (e->type == SDL_MOUSEBUTTONUP) {blnButtonDown = false;}
482+
if ( e->type == SDL_MOUSEBUTTONDOWN || blnButtonDown) {
483+
blnButtonDown = true;
481484
//get Mouse position
482485
int x, y;
483486
SDL_GetMouseState(&x, &y);
@@ -538,8 +541,10 @@ void Toolbar::check_events(SDL_Event* e) {
538541
case SDLK_q:
539542
case SDLK_ESCAPE:
540543
//change the event type to be a quit.
541-
e->type = SDL_QUIT;
542-
return;
544+
if (Screen::promptuser(promptYesNo, "Do you really want to quit?") == 'Y') {
545+
e->type = SDL_QUIT;
546+
return;
547+
}
543548
break;
544549

545550
//Menu cases
@@ -611,10 +616,12 @@ void Map::load() {
611616
/**********************************************************************************************************************************************/
612617
void Map::newmap() {
613618
//New map; completely blank
614-
for (uint y = 0; y < DEFINED_MAP_HEIGHT; y++) {
615-
for (uint x = 0; x < DEFINED_MAP_WIDTH; x++) {
616-
Global::map[y][x] = tileSpace;
617-
}
618-
}
619+
if (Screen::promptuser(promptYesNo, "Do you really want to completely blank the map?") == 'Y') {
620+
for (uint y = 0; y < DEFINED_MAP_HEIGHT; y++) {
621+
for (uint x = 0; x < DEFINED_MAP_WIDTH; x++) {
622+
Global::map[y][x] = tileSpace;
623+
} //end for xh
624+
} //end for y
625+
} //end if yes
619626
}
620627
/**********************************************************************************************************************************************/

Source/main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
/**********************************************************************************************************************************************/
1010
#if defined(_WIN32) ||defined(_WIN64)
1111
#define DEFINED_DEFAULT_IMAGE_PATH ".\\Images\\"
12-
#define DEFINED_MESSAGE_FONT "C:\\Windows\\Fonts\\Arial.ttf"
12+
#define DEFINED_MESSAGE_FONT "C:\\Windows\\Fonts\\GARA.ttf"
1313
#elif defined(__unix__) || defined(__linux__)
1414
#define DEFINED_DEFAULT_IMAGE_PATH "./Images/"
1515
#define DEFINED_MESSAGE_FONT "/usr/share/fonts/truetype/freefont/FreeMono.ttf"
1616
#elif defined(__CYGWIN__)
1717
#define DEFINED_DEFAULT_IMAGE_PATH "./Images/"
18-
#define DEFINED_MESSAGE_FONT "C:/Windows/Fonts/Arial.ttf"
18+
#define DEFINED_MESSAGE_FONT "C:/Windows/Fonts/GARA.ttf"
1919
#else
2020
#define DEFINED_DEFAULT_IMAGE_PATH "OS NOT SUPPORTED!"
2121
#define DEFINED_MESSAGE_FONT "OS NOT SUPPORTED!"

Source/version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
//Standard Version Type
1212
#define DEFINED_VER_MAJOR 0
13-
#define DEFINED_VER_MINOR 6
13+
#define DEFINED_VER_MINOR 7
1414
#define DEFINED_VER_PATCH 0
1515

1616
//Miscellaneous Version Types
1717
//Don't forget to increment the build number before each build
18-
#define DEFINED_VER_RC_FILEVERSION 0,6,0,6
19-
#define DEFINED_VER_RC_FILEVERSION_STRING "0,6,0,6\0"
20-
#define DEFINED_VER_FULLVERSION_STRING "0.6.0"
18+
#define DEFINED_VER_RC_FILEVERSION 0,7,0,3
19+
#define DEFINED_VER_RC_FILEVERSION_STRING "0,7,0,3\0"
20+
#define DEFINED_VER_FULLVERSION_STRING "0.7.0"
2121

2222
//Software Status
2323
#define DEFINED_VER_STATUS "Alpha"

0 commit comments

Comments
 (0)