Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated the readme, and did some minor fixes in the menu.

  • Loading branch information...
commit bba53ed131b28ad061c68df6efed4e7a6db57d4a 1 parent aa80153
@DusteDdk authored
View
5 README
@@ -1 +1,4 @@
-Look in docs the wizard whispers.
+Automatically (thus, untested and bleeding edge) builds are available for Linux, Windows and Wiz here:
+http://jenkins.cyberstalker.dk/job/Wizznic/
+
+As for the rest of the documentation, have a look in the docs directory.
View
4 game.c
@@ -43,7 +43,6 @@ static int timeBeforeRestart=0;
static int spentTimeBeforeRestart=0;
int debugNumInit=0;
-int debugNumCleanUp=0;
int mouseGrab=0;
@@ -108,8 +107,7 @@ int initGame(SDL_Surface* screen)
void cleanUpGame()
{
- if(!player()->gameStarted) { printf("ERROR: Called cleanup when no game was running\n"); return; }
- debugNumCleanUp++;
+ if(!player()->gameStarted) return;
resetBtnAll();
cleanUpDraw();
View
31 menu.c
@@ -198,12 +198,20 @@ int runMenu(SDL_Surface* screen)
resetBtn(C_UP);
getInpPointerState()->timeSinceMoved=POINTER_SHOW_TIMEOUT;
decPosY();
+ if( menuState==menuStatePaused && menuPosY==1 && !player()->gameStarted )
+ {
+ decPosY();
+ }
}
if(getButton(C_DOWN))
{
resetBtn(C_DOWN);
getInpPointerState()->timeSinceMoved=POINTER_SHOW_TIMEOUT;
incPosY();
+ if( menuState==menuStatePaused && menuPosY==1 && !player()->gameStarted )
+ {
+ incPosY();
+ }
}
if(getButton(C_LEFT) )
@@ -244,17 +252,17 @@ int runMenu(SDL_Surface* screen)
waveImg(&waving);
- //Blink "Press B"
- if(dir) txtWriteCenter(screen, FONTSMALL, STR_MENU_PRESS_B, HSCREENW, HSCREENH+70);
+ //Blink "Press B" (NOT dir, it will disappear when mouse is moved)
+ if(!dir) txtWriteCenter(screen, FONTSMALL, STR_MENU_PRESS_B, HSCREENW, HSCREENH+70);
//Show version
- txtWrite(screen, FONTSMALL, VERSION_STRING, HSCREENW+160-((strlen(VERSION_STRING))*9),HSCREENH+100);
+ txtWrite(screen, FONTSMALL, VERSION_STRING, HSCREENW+160-((strlen(VERSION_STRING))*9),HSCREENH+106);
//Show games played world wide
if( setting()->solvedWorldWide )
{
- sprintf(buf, "Puzzles worldwide: %i",setting()->solvedWorldWide);
- txtWrite(screen, FONTSMALL, buf, HSCREENW-150, HSCREENH+100);
+ sprintf(buf, STR_MENU_PUZZLES_WORLDWIDE,setting()->solvedWorldWide);
+ txtWrite(screen, FONTSMALL, buf, HSCREENW-158, HSCREENH+95);
}
//Wait for keypress
@@ -321,7 +329,6 @@ int runMenu(SDL_Surface* screen)
if(getButton(C_BTNMENU) || isPointerEscapeClicked() )
{
- resetMouseBtn();
resetBtn(C_BTNMENU);
menuPosY=0;
setMenu(menuStatePaused);
@@ -508,14 +515,11 @@ int runMenu(SDL_Surface* screen)
menuPosY=0;
}
- if( player()->gameStarted )
+ if( player()->gameStarted && (dir || menuPosY!= 1 ) )
{
- if(dir || menuPosY!= 1)
- {
- txtWriteCenter(screen, FONTSMALL, STR_MENU_RESUME_CHOICE, HSCREENW, HSCREENH-50);
- if( isBoxClicked( getTxtBox() ) )
- menuPosY=1;
- }
+ txtWriteCenter(screen, FONTSMALL, STR_MENU_RESUME_CHOICE, HSCREENW, HSCREENH-50);
+ if( isBoxClicked( getTxtBox() ) )
+ menuPosY=1;
}
if(dir || menuPosY!= 2)
@@ -1006,7 +1010,6 @@ int runMenu(SDL_Surface* screen)
if( getButton(C_BTNB) || isPointerEscapeClicked() )
{
resetBtn(C_BTNB);
- resetMouseBtn();
packFreeGfx();
//If it's a different pack
if(menuPosY != packState()->selected)
View
2  pointer.c
@@ -20,6 +20,7 @@
#include "defs.h"
#include "sprite.h"
#include "pixel.h"
+#include "input.h"
static inpPointerState_t inpPointer;
static SDL_Surface* ptrBackImg;
@@ -108,6 +109,7 @@ int_fast8_t isPointerEscapeClicked()
if( inpPointer.escEnable && isBoxClicked( &ptrBackRect ) )
{
inpPointer.hitABox=0;
+ resetMouseBtn();
return(1);
}
return(0);
View
2  stats.c
@@ -402,7 +402,7 @@ void statsUpload(int level, int time, int moves, int combos, int score, const ch
#if defined (PLATFORM_SUPPORTS_STATSUPLOAD)
if( (setting()->online || ignoreIfOnline) )
{
- printf("StatsUpload with session = %i\n",setting()->session );
+// printf("StatsUpload with session = %i\n",setting()->session );
int b = sprintf( curlbuf, "%s\"version=%s&pack=%s&level=%i&time=%i&moves=%i&combos=%i&score=%i&action=%s&session=%i&platform=%s\"",\
UPLOAD_PROGRAM, VERSION_STRING, packState()->cp->path,\
level,time,moves,combos,score,action, setting()->session, STR_PLATFORM );
View
11 strings.h
@@ -33,7 +33,6 @@
//Entering highscores
#define STR_MENU_HIGHSCORE_NAME_CONTROLS "B:Type A:Delete "
-
//Game
#define STR_GAME_RESTARTCONFIRM "Press A to confirm"
#define STR_GAME_PRESSB "Press B to Play"
@@ -116,19 +115,17 @@
///General strings
+
#ifdef BUILD_NUMBER
- #define VERSION_STRING_BUILD_NUMBER " (b"BUILD_NUMBER")"
+ #define VERSION_STRING "v1.0-dev (build "BUILD_NUMBER")"
#else
- #define VERSION_STRING_BUILD_NUMBER ""
+ #define VERSION_STRING "v1.0-dev"
#endif
-#define VERSION_STRING "v1.0.0-dev"VERSION_STRING_BUILD_NUMBER
-
//Menu
+#define STR_MENU_PUZZLES_WORLDWIDE "Puzzles worldwide: %i"
#define STR_MENU_NEW_GAME "New Game!"
-
-
#define STR_MENU_PAUSE_HEADLINE "Pause!"
#define STR_MENU_WIZZNIC_HEADLINE "Wizznic!"
View
4 wizznic.cbp
@@ -34,6 +34,10 @@
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
+ <Add option="-Winit-self" />
+ <Add option="-Wredundant-decls" />
+ <Add option="-Wunreachable-code" />
+ <Add option="-Wmissing-include-dirs" />
<Add option="-Wmain" />
<Add option="-Wfatal-errors" />
<Add option="-Wall" />
Please sign in to comment.
Something went wrong with that request. Please try again.