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

Commit

Permalink
Update to v0.7.0
Browse files Browse the repository at this point in the history
## [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
  • Loading branch information
Patrick Rye committed Sep 10, 2015
1 parent d37a91a commit 3ee7007
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
10 changes: 10 additions & 0 deletions Documentation/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented here.
This project adheres to [Semantic Versioning](http://semver.org/)

## [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


## [0.6.0] - 2015-09-10
### Added
* Restarting of map
Expand Down
23 changes: 15 additions & 8 deletions Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,10 @@ void Toolbar::draw() {
}
/**********************************************************************************************************************************************/
void Toolbar::check_events(SDL_Event* e) {
if ( e->type == SDL_MOUSEBUTTONDOWN) {
static bool blnButtonDown;
if (e->type == SDL_MOUSEBUTTONUP) {blnButtonDown = false;}
if ( e->type == SDL_MOUSEBUTTONDOWN || blnButtonDown) {
blnButtonDown = true;
//get Mouse position
int x, y;
SDL_GetMouseState(&x, &y);
Expand Down Expand Up @@ -538,8 +541,10 @@ void Toolbar::check_events(SDL_Event* e) {
case SDLK_q:
case SDLK_ESCAPE:
//change the event type to be a quit.
e->type = SDL_QUIT;
return;
if (Screen::promptuser(promptYesNo, "Do you really want to quit?") == 'Y') {
e->type = SDL_QUIT;
return;
}
break;

//Menu cases
Expand Down Expand Up @@ -611,10 +616,12 @@ void Map::load() {
/**********************************************************************************************************************************************/
void Map::newmap() {
//New map; completely blank
for (uint y = 0; y < DEFINED_MAP_HEIGHT; y++) {
for (uint x = 0; x < DEFINED_MAP_WIDTH; x++) {
Global::map[y][x] = tileSpace;
}
}
if (Screen::promptuser(promptYesNo, "Do you really want to completely blank the map?") == 'Y') {
for (uint y = 0; y < DEFINED_MAP_HEIGHT; y++) {
for (uint x = 0; x < DEFINED_MAP_WIDTH; x++) {
Global::map[y][x] = tileSpace;
} //end for xh
} //end for y
} //end if yes
}
/**********************************************************************************************************************************************/
4 changes: 2 additions & 2 deletions Source/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
/**********************************************************************************************************************************************/
#if defined(_WIN32) ||defined(_WIN64)
#define DEFINED_DEFAULT_IMAGE_PATH ".\\Images\\"
#define DEFINED_MESSAGE_FONT "C:\\Windows\\Fonts\\Arial.ttf"
#define DEFINED_MESSAGE_FONT "C:\\Windows\\Fonts\\GARA.ttf"
#elif defined(__unix__) || defined(__linux__)
#define DEFINED_DEFAULT_IMAGE_PATH "./Images/"
#define DEFINED_MESSAGE_FONT "/usr/share/fonts/truetype/freefont/FreeMono.ttf"
#elif defined(__CYGWIN__)
#define DEFINED_DEFAULT_IMAGE_PATH "./Images/"
#define DEFINED_MESSAGE_FONT "C:/Windows/Fonts/Arial.ttf"
#define DEFINED_MESSAGE_FONT "C:/Windows/Fonts/GARA.ttf"
#else
#define DEFINED_DEFAULT_IMAGE_PATH "OS NOT SUPPORTED!"
#define DEFINED_MESSAGE_FONT "OS NOT SUPPORTED!"
Expand Down
8 changes: 4 additions & 4 deletions Source/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

//Standard Version Type
#define DEFINED_VER_MAJOR 0
#define DEFINED_VER_MINOR 6
#define DEFINED_VER_MINOR 7
#define DEFINED_VER_PATCH 0

//Miscellaneous Version Types
//Don't forget to increment the build number before each build
#define DEFINED_VER_RC_FILEVERSION 0,6,0,6
#define DEFINED_VER_RC_FILEVERSION_STRING "0,6,0,6\0"
#define DEFINED_VER_FULLVERSION_STRING "0.6.0"
#define DEFINED_VER_RC_FILEVERSION 0,7,0,3
#define DEFINED_VER_RC_FILEVERSION_STRING "0,7,0,3\0"
#define DEFINED_VER_FULLVERSION_STRING "0.7.0"

//Software Status
#define DEFINED_VER_STATUS "Alpha"
Expand Down

0 comments on commit 3ee7007

Please sign in to comment.