diff --git a/data/IntroText.h b/data/IntroText.h index 3a930a110..e16db490b 100644 --- a/data/IntroText.h +++ b/data/IntroText.h @@ -1,28 +1,28 @@ static const char *introTextData = - "\blThe Powder Toy - Version " MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) " - http://powdertoy.co.uk, irc.freenode.net #powder\n" - "\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\n" - "\n" - "\bgControl+C/V/X are Copy, Paste and cut respectively.\n" - "\bgTo choose a material, hover over one of the icons on the right, it will show a selection of elements in that group.\n" - "\bgPick your material from the menu using mouse left/right buttons.\n" - "Draw freeform lines by dragging your mouse left/right button across the drawing area.\n" - "Shift+drag will create straight lines of particles.\n" - "Ctrl+drag will result in filled rectangles.\n" - "Ctrl+Shift+click will flood-fill a closed area.\n" - "Ctrl+Z will act as Undo.\n" - "Middle click or Alt+Click to \"sample\" the particles.\n" - "\n\boUse 'Z' for a zoom tool. Click to make the drawable zoom window stay around. Use the wheel to change the zoom strength\n" - "Use 'S' to save parts of the window as 'stamps'.\n" - "'L' will load the most recent stamp, 'K' shows a library of stamps you saved.\n" - "Use the mouse scroll wheel to change the tool size for particles.\n" - "The spacebar can be used to pause physics.\n" - "'P' will take a screenshot and save it into the current directory.\n" - "\n" - "Contributors: \bgStanislaw K Skowronek (\brhttp://powder.unaligned.org\bg, \bbirc.unaligned.org #wtf\bg),\n" - "\bgSimon Robertshaw, Skresanov Savely, cracker64, Catelite, Bryan Hoyle, Nathan Cousins, jacksonmj,\n" + "\blThe Powder Toy - Version " MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) " - http://powdertoy.co.uk, irc.freenode.net #powder\n" + "\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\n" + "\n" + "\bgControl+C/V/X are Copy, Paste and cut respectively.\n" + "\bgTo choose a material, hover over one of the icons on the right, it will show a selection of elements in that group.\n" + "\bgPick your material from the menu using mouse left/right buttons.\n" + "Draw freeform lines by dragging your mouse left/right button across the drawing area.\n" + "Shift+drag will create straight lines of particles.\n" + "Ctrl+drag will result in filled rectangles.\n" + "Ctrl+Shift+click will flood-fill a closed area.\n" + "Ctrl+Z will act as Undo.\n" + "Middle click or Alt+Click to \"sample\" the particles.\n" + "\n\boUse 'Z' for a zoom tool. Click to make the drawable zoom window stay around. Use the wheel to change the zoom strength\n" + "Use 'S' to save parts of the window as 'stamps'.\n" + "'L' will load the most recent stamp, 'K' shows a library of stamps you saved.\n" + "Use the mouse scroll wheel to change the tool size for particles.\n" + "The spacebar can be used to pause physics.\n" + "'P' will take a screenshot and save it into the current directory.\n" + "\n" + "Contributors: \bgStanislaw K Skowronek (\brhttp://powder.unaligned.org\bg, \bbirc.unaligned.org #wtf\bg),\n" + "\bgSimon Robertshaw, Skresanov Savely, cracker64, Catelite, Bryan Hoyle, Nathan Cousins, jacksonmj,\n" "\bgLieuwe Mosch, Anthony Boot, Matthew \"me4502\", MaksProg, jacob1\n" - "\n" - "\bgTo use online features such as saving, you need to register at: \brhttp://powdertoy.co.uk/Register.html\n" + "\n" + "\bgTo use online features such as saving, you need to register at: \brhttp://powdertoy.co.uk/Register.html\n" "\n" "\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT_PLATFORM " " #ifdef X86 @@ -49,4 +49,4 @@ static const char *introTextData = #ifdef REALISTIC "REALISTIC" #endif - ; \ No newline at end of file + ; \ No newline at end of file diff --git a/data/Shaders.h b/data/Shaders.h index 9eb125b01..ec52733d4 100644 --- a/data/Shaders.h +++ b/data/Shaders.h @@ -1,18 +1,11 @@ -/* - * Shaders.h - * - * Created on: Jan 7, 2012 - * Author: Simon - */ - #ifndef SHADERS_H_ #define SHADERS_H_ const char * fireFragment = "#version 120\n\ uniform sampler2D fireAlpha;\ void main () {\ - vec4 texColor = texture2D(fireAlpha, gl_PointCoord);\ - gl_FragColor = vec4(gl_Color.rgb, texColor.a*gl_Color.a);\ + vec4 texColor = texture2D(fireAlpha, gl_PointCoord);\ + gl_FragColor = vec4(gl_Color.rgb, texColor.a*gl_Color.a);\ }"; const char * fireVertex = "#version 120\n\ void main(void)\ @@ -31,13 +24,13 @@ void main () {\ vec4 transformY = -texture2D(tfY, vec2(gl_TexCoord[0].s, -gl_TexCoord[0].t));\ transformX.r /= xres;\ transformY.g /= yres;\ - vec4 texColor = vec4(\ - texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.75, transformY.g*0.75)).r,\ - texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.875, transformY.g*0.875)).g,\ - texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r, transformY.g)).b,\ - 1.0\ - );\ - gl_FragColor = texColor;\ + vec4 texColor = vec4(\ + texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.75, transformY.g*0.75)).r,\ + texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.875, transformY.g*0.875)).g,\ + texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r, transformY.g)).b,\ + 1.0\ + );\ + gl_FragColor = texColor;\ }"; const char * lensVertex = "#version 120\n\ void main(void)\ @@ -69,7 +62,7 @@ uniform sampler2D airY;\ uniform sampler2D airP;\ void main () {\ vec4 texP = texture2D(airP, gl_TexCoord[0].st);\ - gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0);\ + gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0);\ }"; const char * airPVertex = "#version 120\n\ void main(void)\ @@ -86,7 +79,7 @@ void main () {\ vec4 texX = texture2D(airX, gl_TexCoord[0].st);\ vec4 texY = texture2D(airY, gl_TexCoord[0].st);\ vec4 texP = texture2D(airP, gl_TexCoord[0].st);\ - gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0) + vec4(abs(texX.r)/8.0, abs(texX.r)/8.0, abs(texX.r)/8.0, 1.0) + vec4(abs(texY.g)/8.0, abs(texY.g)/8.0, abs(texY.g)/8.0, 1.0);\ + gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0) + vec4(abs(texX.r)/8.0, abs(texX.r)/8.0, abs(texX.r)/8.0, 1.0) + vec4(abs(texY.g)/8.0, abs(texY.g)/8.0, abs(texY.g)/8.0, 1.0);\ }"; const char * airCVertex = "#version 120\n\ void main(void)\ diff --git a/src/Config.h b/src/Config.h index 0e6673771..0cb3b0e07 100644 --- a/src/Config.h +++ b/src/Config.h @@ -1,10 +1,3 @@ -/* - * Config.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - //#ifndef CONFIG_H_ //#define CONFIG_H_ @@ -99,8 +92,6 @@ #define BRUSH_DIR "Brushes" -#define APPDATA_SUBDIR "\\HardWIRED" - //Number of unique thumbnails to have in cache at one time #define THUMB_CACHE_SIZE 256 @@ -111,7 +102,7 @@ #define M_GRAV 6.67300e-1 #endif -//Number of asynchronous connections used to retrieve thumnails +//Number of asynchronous connections used to retrieve thumbnails #define IMGCONNS 5 //Not sure #define TIMEOUT 100 @@ -139,15 +130,14 @@ #define GRAV_DIFF #define MAXSIGNS 16 -#define TAG_MAX 256 #define ZSIZE_D 16 #define ZFACTOR_D 8 extern unsigned char ZFACTOR; extern unsigned char ZSIZE; -#define CELL 4 -#define ISTP (CELL/2) +#define CELL 4 +#define ISTP (CELL/2) #define CFDS (4.0f/CELL) #define AIR_TSTEPP 0.3f @@ -156,40 +146,24 @@ extern unsigned char ZSIZE; #define AIR_VLOSS 0.999f #define AIR_PLOSS 0.9999f -#define GRID_X 5 -#define GRID_Y 4 -#define GRID_P 3 -#define GRID_S 6 -#define GRID_Z 3 - -#define CATALOGUE_X 4 -#define CATALOGUE_Y 3 -#define CATALOGUE_S 6 -#define CATALOGUE_Z 3 - -#define STAMP_MAX 240 - -#define SAVE_OPS - #define NGOL 24 -#define NGOLALT 24 //NGOL should be 24, but use this var until I find out why #define CIRCLE_BRUSH 0 #define SQUARE_BRUSH 1 #define TRI_BRUSH 2 #define BRUSH_NUM 3 -#define SURF_RANGE 10 -#define NORMAL_MIN_EST 3 -#define NORMAL_INTERP 20 -#define NORMAL_FRAC 16 +#define SURF_RANGE 10 +#define NORMAL_MIN_EST 3 +#define NORMAL_INTERP 20 +#define NORMAL_FRAC 16 -#define REFRACT 0x80000000 +#define REFRACT 0x80000000 /* heavy flint glass, for awesome refraction/dispersion this way you can make roof prisms easily */ -#define GLASS_IOR 1.9 -#define GLASS_DISP 0.07 +#define GLASS_IOR 1.9 +#define GLASS_DISP 0.07 #ifdef WIN #define strcasecmp stricmp @@ -215,10 +189,4 @@ extern unsigned char ZSIZE; #define SDEUT //#define REALHEAT -#define DEBUG_PARTS 0x0001 -#define DEBUG_PARTCOUNT 0x0002 -#define DEBUG_DRAWTOOL 0x0004 -#define DEBUG_PERFORMANCE_CALC 0x0008 -#define DEBUG_PERFORMANCE_FRAME 0x0010 - //#endif /* CONFIG_H_ */ diff --git a/src/Controller.h b/src/Controller.h index 12748bec4..87680bd84 100644 --- a/src/Controller.h +++ b/src/Controller.h @@ -1,10 +1,3 @@ -/* - * Controller.h - * - * Created on: Jan 25, 2012 - * Author: Simon - */ - #ifndef CONTROLLER_H_ #define CONTROLLER_H_ diff --git a/src/Style.cpp b/src/Style.cpp index 9bb5c659f..1972ce85d 100644 --- a/src/Style.cpp +++ b/src/Style.cpp @@ -1,11 +1,3 @@ -// -// Style.cpp -// The Powder Toy -// -// Created by Simon Robertshaw on 14/05/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - #include #include "Style.h" diff --git a/src/Style.h b/src/Style.h index 0463a2208..7ac0a01bf 100644 --- a/src/Style.h +++ b/src/Style.h @@ -1,12 +1,5 @@ -// -// Style.h -// The Powder Toy -// -// Created by Simon Robertshaw on 14/05/2012. -// - -#ifndef The_Powder_Toy_Style_h -#define The_Powder_Toy_Style_h +#ifndef STYLE_H_ +#define STYLE_H_ namespace ui { class Colour; } diff --git a/src/Update.h b/src/Update.h index 118396b30..036f86f59 100644 --- a/src/Update.h +++ b/src/Update.h @@ -1,10 +1,3 @@ -/* - * Update.h - * - * Created on: Jun 21, 2012 - * Author: Simon - */ - #ifndef UPDATE_H_ #define UPDATE_H_ diff --git a/src/cat/CommandInterface.cpp b/src/cat/CommandInterface.cpp index 3ebc795e0..992ce7407 100644 --- a/src/cat/CommandInterface.cpp +++ b/src/cat/CommandInterface.cpp @@ -1,10 +1,3 @@ -/* - * Kitty.cpp - * - * Created on: Feb 2, 2012 - * Author: Simon - */ - #include #include #include diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h index 5b9c31fb8..192e1f917 100644 --- a/src/cat/CommandInterface.h +++ b/src/cat/CommandInterface.h @@ -1,12 +1,5 @@ -/* - * Kitty.h - * - * Created on: Feb 2, 2012 - * Author: Simon - */ - -#ifndef KITTY_H_ -#define KITTY_H_ +#ifndef COMMANDINTERFACE_H_ +#define COMMANDINTERFACE_H_ #include #include "interface/Engine.h" @@ -43,4 +36,4 @@ public: virtual ~CommandInterface(); }; -#endif /* KITTY_H_ */ +#endif /* COMMANDINTERFACE_H_ */ diff --git a/src/cat/LuaScriptHelper.h b/src/cat/LuaScriptHelper.h index 39be80619..860d919ea 100644 --- a/src/cat/LuaScriptHelper.h +++ b/src/cat/LuaScriptHelper.h @@ -1,10 +1,3 @@ -/* - * LuaScriptHelper.h - * - * Created on: Feb 12, 2012 - * Author: Simon - */ - #ifndef LUASCRIPTHELPER_H_ #define LUASCRIPTHELPER_H_ diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index ef0c1f6a3..33e10d279 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1,10 +1,3 @@ -/* - * LuaScriptInterface.cpp - * - * Created on: Feb 11, 2012 - * Author: Simon - */ - #include #include #include @@ -1699,8 +1692,8 @@ void LuaScriptInterface::initGraphicsAPI() int LuaScriptInterface::graphics_textSize(lua_State * l) { - char * text; - int width, height; + char * text; + int width, height; text = (char*)lua_tostring(l, 1); Graphics::textsize(text, width, height); @@ -1711,7 +1704,7 @@ int LuaScriptInterface::graphics_textSize(lua_State * l) int LuaScriptInterface::graphics_drawText(lua_State * l) { - char * text; + char * text; int x, y, r, g, b, a; x = lua_tointeger(l, 1); y = lua_tointeger(l, 2); diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h index 20dada176..0b9f6f3c8 100644 --- a/src/cat/LuaScriptInterface.h +++ b/src/cat/LuaScriptInterface.h @@ -1,10 +1,3 @@ -/* - * LuaScriptInterface.h - * - * Created on: Feb 11, 2012 - * Author: Simon - */ - #ifndef LUASCRIPTINTERFACE_H_ #define LUASCRIPTINTERFACE_H_ diff --git a/src/cat/TPTSTypes.cpp b/src/cat/TPTSTypes.cpp index a8fa9626d..87d10972c 100644 --- a/src/cat/TPTSTypes.cpp +++ b/src/cat/TPTSTypes.cpp @@ -1,10 +1,3 @@ -/* - * TPTSTypes.cpp - * - * Created on: Feb 4, 2012 - * Author: Simon - */ - #include #include #include diff --git a/src/cat/TPTSTypes.h b/src/cat/TPTSTypes.h index dfea42501..6a2cec478 100644 --- a/src/cat/TPTSTypes.h +++ b/src/cat/TPTSTypes.h @@ -1,10 +1,3 @@ -/* - * TPTSTypes.h - * - * Created on: Feb 4, 2012 - * Author: Simon - */ - #ifndef TPTSTYPES_H_ #define TPTSTYPES_H_ diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index 684467fbf..84f55efb0 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -1,10 +1,3 @@ -/* - * TPTScriptInterface.cpp - * - * Created on: Feb 5, 2012 - * Author: Simon - */ - #include #include #include diff --git a/src/cat/TPTScriptInterface.h b/src/cat/TPTScriptInterface.h index 12240faf4..3cb0b5fe6 100644 --- a/src/cat/TPTScriptInterface.h +++ b/src/cat/TPTScriptInterface.h @@ -1,10 +1,3 @@ -/* - * TPTScriptInterface.h - * - * Created on: Feb 5, 2012 - * Author: Simon - */ - #ifndef TPTSCRIPTINTERFACE_H_ #define TPTSCRIPTINTERFACE_H_ diff --git a/src/client/ClientListener.h b/src/client/ClientListener.h index 68721b150..e04572e5f 100644 --- a/src/client/ClientListener.h +++ b/src/client/ClientListener.h @@ -1,10 +1,3 @@ -/* - * ClientListener.h - * - * Created on: Jun 19, 2012 - * Author: Simon - */ - #ifndef CLIENTLISTENER_H_ #define CLIENTLISTENER_H_ diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index d9e9127af..06441c807 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -1318,7 +1318,7 @@ void GameSave::readPSv(char * data, int dataLength) ttv |= (d[p++]); particles[i-1].tmp = ttv; if (ver<53 && !particles[i-1].tmp) - for (q = 1; q<=NGOLALT; q++) { + for (q = 1; q<=NGOL; q++) { if (particles[i-1].type==goltype[q-1] && grule[q][9]==2) particles[i-1].tmp = grule[q][9]-1; } @@ -1500,7 +1500,7 @@ void GameSave::readPSv(char * data, int dataLength) if(ver<51 && ((ty>=78 && ty<=89) || (ty>=134 && ty<=146 && ty!=141))){ //Replace old GOL particles[i-1].type = PT_LIFE; - for (gnum = 0; gnum #include #include "ColourPickerActivity.h" diff --git a/src/console/ConsoleCommand.h b/src/console/ConsoleCommand.h index a40a68832..31e41b05f 100644 --- a/src/console/ConsoleCommand.h +++ b/src/console/ConsoleCommand.h @@ -1,10 +1,3 @@ -/* - * ConsoleCommand.h - * - * Created on: Feb 1, 2012 - * Author: Simon - */ - #ifndef CONSOLECOMMAND_H_ #define CONSOLECOMMAND_H_ diff --git a/src/console/ConsoleController.cpp b/src/console/ConsoleController.cpp index 39e6e517f..602636faf 100644 --- a/src/console/ConsoleController.cpp +++ b/src/console/ConsoleController.cpp @@ -1,10 +1,3 @@ -/* - * ConsoleController.cpp - * - * Created on: Jan 31, 2012 - * Author: Simon - */ - #include #include "ConsoleController.h" diff --git a/src/console/ConsoleController.h b/src/console/ConsoleController.h index d5fc07acb..cf8b36ee0 100644 --- a/src/console/ConsoleController.h +++ b/src/console/ConsoleController.h @@ -1,10 +1,3 @@ -/* - * ConsoleController.h - * - * Created on: Jan 31, 2012 - * Author: Simon - */ - #ifndef CONSOLECONTROLLER_H_ #define CONSOLECONTROLLER_H_ diff --git a/src/console/ConsoleModel.cpp b/src/console/ConsoleModel.cpp index df900a3ba..ceb6b32f4 100644 --- a/src/console/ConsoleModel.cpp +++ b/src/console/ConsoleModel.cpp @@ -1,10 +1,3 @@ -/* - * ConsoleModel.cpp - * - * Created on: Feb 1, 2012 - * Author: Simon - */ - #include "client/Client.h" #include "ConsoleModel.h" diff --git a/src/console/ConsoleModel.h b/src/console/ConsoleModel.h index b340ea851..312739a06 100644 --- a/src/console/ConsoleModel.h +++ b/src/console/ConsoleModel.h @@ -1,10 +1,3 @@ -/* - * ConsoleModel.h - * - * Created on: Feb 1, 2012 - * Author: Simon - */ - #ifndef CONSOLEMODEL_H_ #define CONSOLEMODEL_H_ diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp index 5390cbde8..9a5136660 100644 --- a/src/console/ConsoleView.cpp +++ b/src/console/ConsoleView.cpp @@ -1,10 +1,3 @@ -/* - * ConsoleView.cpp - * - * Created on: Jan 31, 2012 - * Author: Simon - */ - #include "ConsoleView.h" #include "interface/Keys.h" diff --git a/src/console/ConsoleView.h b/src/console/ConsoleView.h index f1182938a..de1c48e6f 100644 --- a/src/console/ConsoleView.h +++ b/src/console/ConsoleView.h @@ -1,10 +1,3 @@ -/* - * ConsoleView.h - * - * Created on: Jan 31, 2012 - * Author: Simon - */ - #ifndef CONSOLEVIEW_H_ #define CONSOLEVIEW_H_ diff --git a/src/dialogues/ConfirmPrompt.cpp b/src/dialogues/ConfirmPrompt.cpp index 1aa75e2ed..0a89efad9 100644 --- a/src/dialogues/ConfirmPrompt.cpp +++ b/src/dialogues/ConfirmPrompt.cpp @@ -1,10 +1,3 @@ -/* - * ConfirmPrompt.cpp - * - * Created on: Apr 6, 2012 - * Author: Simon - */ - #include "ConfirmPrompt.h" #include "Style.h" #include "interface/Label.h" diff --git a/src/dialogues/ConfirmPrompt.h b/src/dialogues/ConfirmPrompt.h index b866338e9..9e38a4829 100644 --- a/src/dialogues/ConfirmPrompt.h +++ b/src/dialogues/ConfirmPrompt.h @@ -1,10 +1,3 @@ -/* - * ConfirmPrompt.h - * - * Created on: Apr 6, 2012 - * Author: Simon - */ - #ifndef CONFIRMPROMPT_H_ #define CONFIRMPROMPT_H_ diff --git a/src/dialogues/ErrorMessage.cpp b/src/dialogues/ErrorMessage.cpp index ef8615224..876bc100c 100644 --- a/src/dialogues/ErrorMessage.cpp +++ b/src/dialogues/ErrorMessage.cpp @@ -1,10 +1,3 @@ -/* - * ErrorMessage.cpp - * - * Created on: Jan 29, 2012 - * Author: Simon - */ - #include "Style.h" #include "ErrorMessage.h" #include "interface/Button.h" diff --git a/src/dialogues/ErrorMessage.h b/src/dialogues/ErrorMessage.h index 769127e27..34cdb0ca7 100644 --- a/src/dialogues/ErrorMessage.h +++ b/src/dialogues/ErrorMessage.h @@ -1,10 +1,3 @@ -/* - * ErrorMessage.h - * - * Created on: Jan 29, 2012 - * Author: Simon - */ - #ifndef ERRORMESSAGE_H_ #define ERRORMESSAGE_H_ diff --git a/src/dialogues/InformationMessage.cpp b/src/dialogues/InformationMessage.cpp index b015b0665..7f861c322 100644 --- a/src/dialogues/InformationMessage.cpp +++ b/src/dialogues/InformationMessage.cpp @@ -1,10 +1,3 @@ -/* - * InformationMessage.cpp - * - * Created on: Jan 29, 2012 - * Author: Simon - */ - #include "Style.h" #include "InformationMessage.h" #include "interface/Button.h" diff --git a/src/dialogues/InformationMessage.h b/src/dialogues/InformationMessage.h index 6f0315473..803231113 100644 --- a/src/dialogues/InformationMessage.h +++ b/src/dialogues/InformationMessage.h @@ -1,10 +1,3 @@ -/* - * InformationMessage.h - * - * Created on: Jan 29, 2012 - * Author: Simon - */ - #ifndef INFORMATIONMESSAGE_H_ #define INFORMATIONMESSAGE_H_ diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp index dbaefd245..cd06a8c44 100644 --- a/src/dialogues/TextPrompt.cpp +++ b/src/dialogues/TextPrompt.cpp @@ -1,10 +1,3 @@ -/* - * ConfirmPrompt.cpp - * - * Created on: Apr 6, 2012 - * Author: Simon - */ - #include #include "TextPrompt.h" #include "interface/Label.h" diff --git a/src/dialogues/TextPrompt.h b/src/dialogues/TextPrompt.h index 1c4a672cf..5478cb553 100644 --- a/src/dialogues/TextPrompt.h +++ b/src/dialogues/TextPrompt.h @@ -1,10 +1,3 @@ -/* - * ConfirmPrompt.h - * - * Created on: Apr 6, 2012 - * Author: Simon - */ - #ifndef TEXTPROMPT_H_ #define TEXTPROMPT_H_ diff --git a/src/elementsearch/ElementSearchActivity.cpp b/src/elementsearch/ElementSearchActivity.cpp index 8bf9e6e62..7156cb1e7 100644 --- a/src/elementsearch/ElementSearchActivity.cpp +++ b/src/elementsearch/ElementSearchActivity.cpp @@ -1,10 +1,3 @@ -/* - * ElementSearchActivity.cpp - * - * Created on: Jun 24, 2012 - * Author: Simon - */ - #include #include "ElementSearchActivity.h" #include "interface/Textbox.h" @@ -187,6 +180,5 @@ void ElementSearchActivity::OnKeyPress(int key, Uint16 character, bool shift, bo } ElementSearchActivity::~ElementSearchActivity() { - // TODO Auto-generated destructor stub } diff --git a/src/elementsearch/ElementSearchActivity.h b/src/elementsearch/ElementSearchActivity.h index de9700da4..987d8fbe6 100644 --- a/src/elementsearch/ElementSearchActivity.h +++ b/src/elementsearch/ElementSearchActivity.h @@ -1,10 +1,3 @@ -/* - * ElementSearchActivity.h - * - * Created on: Jun 24, 2012 - * Author: Simon - */ - #ifndef ELEMENTSEARCHACTIVITY_H_ #define ELEMENTSEARCHACTIVITY_H_ diff --git a/src/game/Brush.h b/src/game/Brush.h index b59d017ca..7671caf85 100644 --- a/src/game/Brush.h +++ b/src/game/Brush.h @@ -1,9 +1,3 @@ -/* - * Brush.h - * - * Created on: Jan 22, 2012 - * Author: Simon - */ #ifndef BRUSH_H_ #define BRUSH_H_ diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h index 80215b52f..ad28766d4 100644 --- a/src/game/EllipseBrush.h +++ b/src/game/EllipseBrush.h @@ -1,10 +1,3 @@ -/* - * ElipseBrush.h - * - * Created on: Jan 26, 2012 - * Author: Simon - */ - #ifndef ELIPSEBRUSH_H_ #define ELIPSEBRUSH_H_ diff --git a/src/game/GameModelException.h b/src/game/GameModelException.h index 05138f27d..c95f7e60a 100644 --- a/src/game/GameModelException.h +++ b/src/game/GameModelException.h @@ -1,12 +1,5 @@ -/* - * SaveLoadException.h - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - -#ifndef SAVELOADEXCEPTION_H_ -#define SAVELOADEXCEPTION_H_ +#ifndef GAMEMODELEXCEPTION_H_ +#define GAMEMODELEXCEPTION_H_ #include #include @@ -23,4 +16,4 @@ public: ~GameModelException() throw() {}; }; -#endif /* SAVELOADEXCEPTION_H_ */ +#endif /* GAMEMODELEXCEPTION_H_ */ diff --git a/src/game/Menu.h b/src/game/Menu.h index 261193e92..3f955e193 100644 --- a/src/game/Menu.h +++ b/src/game/Menu.h @@ -1,10 +1,3 @@ -/* - * Menu.h - * - * Created on: Jan 22, 2012 - * Author: Simon - */ - #ifndef MENU_H_ #define MENU_H_ diff --git a/src/game/Notification.h b/src/game/Notification.h index 4c64dea08..b2bf6f81f 100644 --- a/src/game/Notification.h +++ b/src/game/Notification.h @@ -1,10 +1,3 @@ -/* - * Notification.h - * - * Created on: Jun 20, 2012 - * Author: Simon - */ - #ifndef NOTIFICATION_H_ #define NOTIFICATION_H_ diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp index 5be44b6d9..b0ad67a2d 100644 --- a/src/game/Tool.cpp +++ b/src/game/Tool.cpp @@ -1,10 +1,3 @@ -/* - * Tool.cpp - * - * Created on: Jun 24, 2012 - * Author: Simon - */ - #include #include "Tool.h" #include "game/Brush.h" diff --git a/src/game/Tool.h b/src/game/Tool.h index 22898c777..0c8ab65b0 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -1,10 +1,3 @@ -/* - * Tool.h - * - * Created on: Jan 22, 2012 - * Author: Simon - */ - #ifndef TOOL_H_ #define TOOL_H_ diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp index 70b93a2e2..575167fa8 100644 --- a/src/game/ToolButton.cpp +++ b/src/game/ToolButton.cpp @@ -1,10 +1,3 @@ -/* - * ToolButton.cpp - * - * Created on: Jan 30, 2012 - * Author: Simon - */ - #include "ToolButton.h" #include "interface/Keys.h" @@ -17,7 +10,7 @@ ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_, st void ToolButton::OnMouseClick(int x, int y, unsigned int button) { - isButtonDown = true; + isButtonDown = true; } void ToolButton::OnMouseUnclick(int x, int y, unsigned int button) @@ -94,6 +87,5 @@ int ToolButton::GetSelectionState() } ToolButton::~ToolButton() { - // TODO Auto-generated destructor stub } diff --git a/src/game/ToolButton.h b/src/game/ToolButton.h index b311d0b92..6fdd7332f 100644 --- a/src/game/ToolButton.h +++ b/src/game/ToolButton.h @@ -1,10 +1,3 @@ -/* - * ToolButton.h - * - * Created on: Jan 30, 2012 - * Author: Simon - */ - #ifndef TOOLBUTTON_H_ #define TOOLBUTTON_H_ diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 3a1a2cd4b..1f4aed872 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -1,9 +1,3 @@ -/* - * Renderer.cpp - * - * Created on: Jan 7, 2012 - * Author: Simon - */ #include #include #include diff --git a/src/interface/Appearance.cpp b/src/interface/Appearance.cpp index f2f562c62..a4c21d024 100644 --- a/src/interface/Appearance.cpp +++ b/src/interface/Appearance.cpp @@ -1,10 +1,3 @@ -// -// Appearance.cpp -// The Powder Toy -// -// Created by Simon Robertshaw on 15/05/2012. -// - #include #include "Appearance.h" diff --git a/src/interface/Appearance.h b/src/interface/Appearance.h index b87626930..1c1bb5a41 100644 --- a/src/interface/Appearance.h +++ b/src/interface/Appearance.h @@ -1,12 +1,5 @@ -// -// Appearance.h -// The Powder Toy -// -// Created by Simon Robertshaw on 15/05/2012. -// - -#ifndef The_Powder_Toy_Appearance_h -#define The_Powder_Toy_Appearance_h +#ifndef APPEARANCE_H_ +#define APPEARANCE_H_ #include "Border.h" #include "Colour.h" diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 95de0e8e2..a2ecf8f50 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -1,10 +1,3 @@ -/* - * Button.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - #include #include "interface/Button.h" #include "graphics/Graphics.h" @@ -156,21 +149,21 @@ void Button::Draw(const Point& screenPos) void Button::OnMouseUnclick(int x, int y, unsigned int button) { - if(button == 1) - { - if(isButtonDown) + if(button == 1) + { + if(isButtonDown) { - isButtonDown = false; + isButtonDown = false; DoAction(); } - } - else if(button == 3) - { - if(isAltButtonDown) - { - isAltButtonDown = false; - DoAltAction(); - } + } + else if(button == 3) + { + if(isAltButtonDown) + { + isAltButtonDown = false; + DoAltAction(); + } } } @@ -178,8 +171,8 @@ void Button::OnMouseClick(int x, int y, unsigned int button) { if(!Enabled) return; - if(button == 1) - { + if(button == 1) + { if(isTogglable) { toggle = !toggle; @@ -187,14 +180,14 @@ void Button::OnMouseClick(int x, int y, unsigned int button) isButtonDown = true; } else if(button == 3) - { + { isAltButtonDown = true; } } void Button::OnMouseEnter(int x, int y) { - isMouseInside = true; + isMouseInside = true; if(!Enabled) return; if(actionCallback) @@ -208,8 +201,8 @@ void Button::OnMouseEnter(int x, int y) void Button::OnMouseLeave(int x, int y) { - isMouseInside = false; - isButtonDown = false; + isMouseInside = false; + isButtonDown = false; } void Button::DoAction() diff --git a/src/interface/Button.h b/src/interface/Button.h index dff15b414..05f466d4b 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -1,10 +1,3 @@ -/* - * Button.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - #ifndef BUTTON_H_ #define BUTTON_H_ diff --git a/src/interface/Checkbox.cpp b/src/interface/Checkbox.cpp index 22c6a4272..7caf18b22 100644 --- a/src/interface/Checkbox.cpp +++ b/src/interface/Checkbox.cpp @@ -1,10 +1,3 @@ -/* - * Checkbox.cpp - * - * Created on: Jan 26, 2012 - * Author: Simon - */ - #include "Checkbox.h" using namespace ui; @@ -17,7 +10,6 @@ Checkbox::Checkbox(ui::Point position, ui::Point size, std::string text, std::st checked(false), actionCallback(NULL) { - // TODO Auto-generated constructor stub } diff --git a/src/interface/Checkbox.h b/src/interface/Checkbox.h index 132383148..f82cef7a6 100644 --- a/src/interface/Checkbox.h +++ b/src/interface/Checkbox.h @@ -1,10 +1,3 @@ -/* - * Checkbox.h - * - * Created on: Jan 26, 2012 - * Author: Simon - */ - #ifndef CHECKBOX_H_ #define CHECKBOX_H_ diff --git a/src/interface/DropDown.cpp b/src/interface/DropDown.cpp index 0b05aace5..4c1d76111 100644 --- a/src/interface/DropDown.cpp +++ b/src/interface/DropDown.cpp @@ -1,10 +1,3 @@ -/* - * DropDown.cpp - * - * Created on: Apr 16, 2012 - * Author: Simon - */ - #include #include "Style.h" #include "Button.h" diff --git a/src/interface/DropDown.h b/src/interface/DropDown.h index 3aba97156..c13fdf624 100644 --- a/src/interface/DropDown.h +++ b/src/interface/DropDown.h @@ -1,10 +1,3 @@ -/* - * DropDown.h - * - * Created on: Apr 16, 2012 - * Author: Simon - */ - #ifndef DROPDOWN_H_ #define DROPDOWN_H_ diff --git a/src/interface/Slider.cpp b/src/interface/Slider.cpp index d5639cb4c..3ada74f4e 100644 --- a/src/interface/Slider.cpp +++ b/src/interface/Slider.cpp @@ -1,10 +1,3 @@ -/* - * Slider.cpp - * - * Created on: Mar 3, 2012 - * Author: Simon - */ - #include #include "Slider.h" #include "Colour.h" @@ -20,7 +13,6 @@ Slider::Slider(Point position, Point size, int steps): col1(0, 0, 0, 0), col2(0, 0, 0, 0) { - // TODO Auto-generated constructor stub } diff --git a/src/interface/Slider.h b/src/interface/Slider.h index 65ca0baea..b02366ef6 100644 --- a/src/interface/Slider.h +++ b/src/interface/Slider.h @@ -1,10 +1,3 @@ -/* - * Slider.h - * - * Created on: Mar 3, 2012 - * Author: Simon - */ - #ifndef SLIDER_H_ #define SLIDER_H_ diff --git a/src/interface/Spinner.cpp b/src/interface/Spinner.cpp index ea3d1fa71..fd3a61dae 100644 --- a/src/interface/Spinner.cpp +++ b/src/interface/Spinner.cpp @@ -1,11 +1,3 @@ -/* - * Spinner.cpp - * - * Created on: Feb 11, 2012 - * Author: Simon - */ - - #include #include #include "Spinner.h" diff --git a/src/interface/Spinner.h b/src/interface/Spinner.h index 23d41416f..deabb3c18 100644 --- a/src/interface/Spinner.h +++ b/src/interface/Spinner.h @@ -1,10 +1,3 @@ -/* - * Spinner.h - * - * Created on: Feb 11, 2012 - * Author: Simon - */ - #ifndef SPINNER_H_ #define SPINNER_H_ diff --git a/src/localbrowser/LocalBrowserController.cpp b/src/localbrowser/LocalBrowserController.cpp index 03c83f8bd..fba25e337 100644 --- a/src/localbrowser/LocalBrowserController.cpp +++ b/src/localbrowser/LocalBrowserController.cpp @@ -1,9 +1,3 @@ -/* - * StampsController.cpp - * - * Created on: Mar 29, 2012 - * Author: Simon - */ #include #include "client/Client.h" diff --git a/src/localbrowser/LocalBrowserController.h b/src/localbrowser/LocalBrowserController.h index 236ac075d..6dcf2a561 100644 --- a/src/localbrowser/LocalBrowserController.h +++ b/src/localbrowser/LocalBrowserController.h @@ -1,10 +1,3 @@ -/* - * StampsController.h - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - #ifndef STAMPSCONTROLLER_H_ #define STAMPSCONTROLLER_H_ diff --git a/src/localbrowser/LocalBrowserModel.cpp b/src/localbrowser/LocalBrowserModel.cpp index 42f1a6503..333e8453a 100644 --- a/src/localbrowser/LocalBrowserModel.cpp +++ b/src/localbrowser/LocalBrowserModel.cpp @@ -1,10 +1,3 @@ -/* - * StampsModel.cpp - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - #include "LocalBrowserModel.h" #include "LocalBrowserView.h" #include "LocalBrowserModelException.h" @@ -16,7 +9,6 @@ LocalBrowserModel::LocalBrowserModel(): currentPage(1), stampToFront(1) { - // TODO Auto-generated constructor stub //stampIDs = Client::Ref().GetStamps(); stampIDs = Client::Ref().GetStamps(0, 16); } diff --git a/src/localbrowser/LocalBrowserModel.h b/src/localbrowser/LocalBrowserModel.h index af8850907..75167d9ff 100644 --- a/src/localbrowser/LocalBrowserModel.h +++ b/src/localbrowser/LocalBrowserModel.h @@ -1,10 +1,3 @@ -/* - * StampsModel.h - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - #ifndef STAMPSMODEL_H_ #define STAMPSMODEL_H_ diff --git a/src/localbrowser/LocalBrowserModelException.h b/src/localbrowser/LocalBrowserModelException.h index 087f7df78..5146c533d 100644 --- a/src/localbrowser/LocalBrowserModelException.h +++ b/src/localbrowser/LocalBrowserModelException.h @@ -1,10 +1,3 @@ -/* - * StampsModelException.h - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - #ifndef STAMPSMODELEXCEPTION_H_ #define STAMPSMODELEXCEPTION_H_ diff --git a/src/localbrowser/LocalBrowserView.cpp b/src/localbrowser/LocalBrowserView.cpp index aa759259b..700d24eb7 100644 --- a/src/localbrowser/LocalBrowserView.cpp +++ b/src/localbrowser/LocalBrowserView.cpp @@ -1,10 +1,3 @@ -/* - * StampsView.cpp - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - #include #include "client/Client.h" #include "LocalBrowserView.h" @@ -219,6 +212,5 @@ void LocalBrowserView::OnKeyPress(int key, Uint16 character, bool shift, bool ct } LocalBrowserView::~LocalBrowserView() { - // TODO Auto-generated destructor stub } diff --git a/src/localbrowser/LocalBrowserView.h b/src/localbrowser/LocalBrowserView.h index 7a8c8137a..17930d92e 100644 --- a/src/localbrowser/LocalBrowserView.h +++ b/src/localbrowser/LocalBrowserView.h @@ -1,10 +1,3 @@ -/* - * StampsView.h - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - #ifndef STAMPSVIEW_H_ #define STAMPSVIEW_H_ diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp index f27ad5995..fd8e5769e 100644 --- a/src/login/LoginController.cpp +++ b/src/login/LoginController.cpp @@ -1,10 +1,3 @@ -/* - * LoginController.cpp - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #include "LoginController.h" #include "client/User.h" #include "client/Client.h" @@ -12,7 +5,6 @@ LoginController::LoginController(ControllerCallback * callback): HasExited(false) { - // TODO Auto-generated constructor stub loginView = new LoginView(); loginModel = new LoginModel(); diff --git a/src/login/LoginController.h b/src/login/LoginController.h index b20e1872c..b723cb9f7 100644 --- a/src/login/LoginController.h +++ b/src/login/LoginController.h @@ -1,10 +1,3 @@ -/* - * LoginController.h - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #ifndef LOGINCONTROLLER_H_ #define LOGINCONTROLLER_H_ diff --git a/src/login/LoginModel.cpp b/src/login/LoginModel.cpp index 30156131c..5b70c2c17 100644 --- a/src/login/LoginModel.cpp +++ b/src/login/LoginModel.cpp @@ -1,16 +1,8 @@ -/* - * LoginModel.cpp - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #include "LoginModel.h" LoginModel::LoginModel(): currentUser(0, "") { - // TODO Auto-generated constructor stub } @@ -62,6 +54,5 @@ void LoginModel::notifyStatusChanged() } LoginModel::~LoginModel() { - // TODO Auto-generated destructor stub } diff --git a/src/login/LoginModel.h b/src/login/LoginModel.h index 121d78e29..8149797e5 100644 --- a/src/login/LoginModel.h +++ b/src/login/LoginModel.h @@ -1,10 +1,3 @@ -/* - * LoginModel.h - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #ifndef LOGINMODEL_H_ #define LOGINMODEL_H_ diff --git a/src/login/LoginView.cpp b/src/login/LoginView.cpp index 3cb07c347..a66088711 100644 --- a/src/login/LoginView.cpp +++ b/src/login/LoginView.cpp @@ -1,10 +1,3 @@ -/* - * LoginView.cpp - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #include "LoginView.h" #include "interface/Button.h" diff --git a/src/login/LoginView.h b/src/login/LoginView.h index ae7af4e3a..a492b75d2 100644 --- a/src/login/LoginView.h +++ b/src/login/LoginView.h @@ -1,10 +1,3 @@ -/* - * LoginView.h - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #ifndef LOGINVIEW_H_ #define LOGINVIEW_H_ diff --git a/src/options/OptionsController.cpp b/src/options/OptionsController.cpp index 3973fed7c..b789c1fee 100644 --- a/src/options/OptionsController.cpp +++ b/src/options/OptionsController.cpp @@ -1,10 +1,3 @@ -/* - * OptionsController.cpp - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #include "OptionsController.h" #include "dialogues/ErrorMessage.h" diff --git a/src/options/OptionsController.h b/src/options/OptionsController.h index 1df92ba75..f76459c42 100644 --- a/src/options/OptionsController.h +++ b/src/options/OptionsController.h @@ -1,10 +1,3 @@ -/* - * OptionsController.h - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #ifndef OPTIONSCONTROLLER_H_ #define OPTIONSCONTROLLER_H_ diff --git a/src/options/OptionsModel.cpp b/src/options/OptionsModel.cpp index c3517fafe..fbfe2a0dd 100644 --- a/src/options/OptionsModel.cpp +++ b/src/options/OptionsModel.cpp @@ -1,10 +1,3 @@ -/* - * OptionsModel.cpp - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #include "simulation/Air.h" #include "game/GameModel.h" #include "OptionsModel.h" @@ -140,6 +133,5 @@ void OptionsModel::notifySettingsChanged() } OptionsModel::~OptionsModel() { - // TODO Auto-generated destructor stub } diff --git a/src/options/OptionsModel.h b/src/options/OptionsModel.h index c15fb883a..b0867c187 100644 --- a/src/options/OptionsModel.h +++ b/src/options/OptionsModel.h @@ -1,10 +1,3 @@ -/* - * OptionsModel.h - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #ifndef OPTIONSMODEL_H_ #define OPTIONSMODEL_H_ #include diff --git a/src/options/OptionsView.cpp b/src/options/OptionsView.cpp index 3adf7d720..5bbd60856 100644 --- a/src/options/OptionsView.cpp +++ b/src/options/OptionsView.cpp @@ -1,10 +1,3 @@ -/* - * OptionsView.cpp - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #include "OptionsView.h" #include "Style.h" #include "interface/Button.h" @@ -235,6 +228,5 @@ void OptionsView::OnTryExit(ExitMethod method) OptionsView::~OptionsView() { - // TODO Auto-generated destructor stub } diff --git a/src/options/OptionsView.h b/src/options/OptionsView.h index a4c98541e..8d41ba5db 100644 --- a/src/options/OptionsView.h +++ b/src/options/OptionsView.h @@ -1,10 +1,3 @@ -/* - * OptionsView.h - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #ifndef OPTIONSVIEW_H_ #define OPTIONSVIEW_H_ diff --git a/src/preview/Comment.h b/src/preview/Comment.h index bf4b8d441..4bf7acb1f 100644 --- a/src/preview/Comment.h +++ b/src/preview/Comment.h @@ -1,10 +1,3 @@ -/* - * Comment.h - * - * Created on: Feb 11, 2012 - * Author: Simon - */ - #ifndef COMMENT_H_ #define COMMENT_H_ diff --git a/src/preview/PreviewController.h b/src/preview/PreviewController.h index 2d8e35a1b..ab63ae49a 100644 --- a/src/preview/PreviewController.h +++ b/src/preview/PreviewController.h @@ -1,10 +1,3 @@ -/* - * PreviewController.h - * - * Created on: Jan 21, 2012 - * Author: Simon - */ - #ifndef PREVIEWCONTROLLER_H_ #define PREVIEWCONTROLLER_H_ diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index 77cab3725..2ee2c45d5 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -1,17 +1,10 @@ -/* - * PreviewModel.h - * - * Created on: Jan 21, 2012 - * Author: Simon - */ - #ifndef PREVIEWMODEL_H_ #define PREVIEWMODEL_H_ #include #include #include - #undef GetUserName //God dammit microsoft! +#undef GetUserName //God dammit microsoft! #include "PreviewView.h" #include "client/SaveInfo.h" #include "preview/Comment.h" diff --git a/src/preview/PreviewModelException.h b/src/preview/PreviewModelException.h index 261d203e0..85dce1d18 100644 --- a/src/preview/PreviewModelException.h +++ b/src/preview/PreviewModelException.h @@ -1,10 +1,3 @@ -/* - * PreviewModelException.h - * - * Created on: Apr 14, 2012 - * Author: Simon - */ - #ifndef PREVIEWMODELEXCEPTION_H_ #define PREVIEWMODELEXCEPTION_H_ diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index c5931af49..10dba4d99 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -1,10 +1,3 @@ -/* - * PreviewView.h - * - * Created on: Jan 21, 2012 - * Author: Simon - */ - #ifndef PREVIEWVIEW_H_ #define PREVIEWVIEW_H_ diff --git a/src/render/RenderController.cpp b/src/render/RenderController.cpp index e98200a31..7b60e972a 100644 --- a/src/render/RenderController.cpp +++ b/src/render/RenderController.cpp @@ -1,10 +1,3 @@ -/* - * RenderController.cpp - * - * Created on: Jan 23, 2012 - * Author: Simon - */ - #include "RenderController.h" RenderController::RenderController(Renderer * ren, ControllerCallback * callback): diff --git a/src/render/RenderController.h b/src/render/RenderController.h index 8ea44a496..42adb6502 100644 --- a/src/render/RenderController.h +++ b/src/render/RenderController.h @@ -1,10 +1,3 @@ -/* - * RenderController.h - * - * Created on: Jan 23, 2012 - * Author: Simon - */ - #ifndef RENDERCONTROLLER_H_ #define RENDERCONTROLLER_H_ diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp index 556493c8b..b17f6fc7e 100644 --- a/src/render/RenderModel.cpp +++ b/src/render/RenderModel.cpp @@ -1,10 +1,3 @@ -/* - * RenderModel.cpp - * - * Created on: Jan 23, 2012 - * Author: Simon - */ - #include "RenderModel.h" RenderModel::RenderModel(): @@ -139,5 +132,4 @@ void RenderModel::notifyColourChanged() } RenderModel::~RenderModel() { - // TODO Auto-generated destructor stub } diff --git a/src/render/RenderModel.h b/src/render/RenderModel.h index 8a8b1cdf0..2cd24a54a 100644 --- a/src/render/RenderModel.h +++ b/src/render/RenderModel.h @@ -1,10 +1,3 @@ -/* - * RenderModel.h - * - * Created on: Jan 23, 2012 - * Author: Simon - */ - #ifndef RENDERMODEL_H_ #define RENDERMODEL_H_ diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index ad299b0b2..508ff47a2 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -1,10 +1,3 @@ -/* - * RenderView.cpp - * - * Created on: Jan 23, 2012 - * Author: Simon - */ - #include "simulation/ElementGraphics.h" #include "graphics/Graphics.h" #include "graphics/Renderer.h" @@ -405,5 +398,4 @@ void RenderView::ToolTip(ui::Component * sender, ui::Point mousePosition, std::s } RenderView::~RenderView() { - // TODO Auto-generated destructor stub } diff --git a/src/render/RenderView.h b/src/render/RenderView.h index 9e4819ba4..5da8c1d45 100644 --- a/src/render/RenderView.h +++ b/src/render/RenderView.h @@ -1,10 +1,3 @@ -/* - * RenderView.h - * - * Created on: Jan 23, 2012 - * Author: Simon - */ - #ifndef RENDERVIEW_H_ #define RENDERVIEW_H_ diff --git a/src/search/Thumbnail.cpp b/src/search/Thumbnail.cpp index 5ef1b260d..1f06c45a7 100644 --- a/src/search/Thumbnail.cpp +++ b/src/search/Thumbnail.cpp @@ -1,10 +1,3 @@ -/* - * Thumbnail.cpp - * - * Created on: Apr 3, 2012 - * Author: Simon - */ - #include "Thumbnail.h" Thumbnail::Thumbnail(const Thumbnail & thumb): diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index b019ac4bb..e0dfcee76 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -1,10 +1,3 @@ -/* - * Elements.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - #ifndef ELEMENTS_H_ #define ELEMENTS_H_ @@ -35,7 +28,7 @@ #define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero #define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero #define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle -#define PROP_NOAMBHEAT 0x40000 //2^18 Don't transfer or receive heat from ambient heat. +#define PROP_NOAMBHEAT 0x40000 //2^18 Don't transfer or receive heat from ambient heat. #define FLAG_STAGNANT 0x1 #define FLAG_SKIPMOVE 0x2 // skip movement for one frame, only implemented for PHOT diff --git a/src/simulation/GOLMenu.h b/src/simulation/GOLMenu.h index 36bb5ddbe..905431374 100644 --- a/src/simulation/GOLMenu.h +++ b/src/simulation/GOLMenu.h @@ -1,11 +1,3 @@ -// -// GOLMenu.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - #ifndef The_Powder_Toy_GOLMenu_h #define The_Powder_Toy_GOLMenu_h diff --git a/src/simulation/MenuSection.h b/src/simulation/MenuSection.h index b8e16fe8f..12b1ba61e 100644 --- a/src/simulation/MenuSection.h +++ b/src/simulation/MenuSection.h @@ -1,13 +1,5 @@ -// -// MenuSection.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#ifndef The_Powder_Toy_MenuSection_h -#define The_Powder_Toy_MenuSection_h +#ifndef MENUSECTION_H_ +#define MENUSECTION_H_ struct menu_section { diff --git a/src/simulation/Particle.cpp b/src/simulation/Particle.cpp index 115ed9518..19089a1e9 100644 --- a/src/simulation/Particle.cpp +++ b/src/simulation/Particle.cpp @@ -1,10 +1,3 @@ -/* - * Particle.cpp - * - * Created on: Jun 6, 2012 - * Author: Simon - */ - #include #include "Particle.h" diff --git a/src/simulation/Particle.h b/src/simulation/Particle.h index bb0297eb8..fbb598847 100644 --- a/src/simulation/Particle.h +++ b/src/simulation/Particle.h @@ -1,13 +1,5 @@ -// -// Particle.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#ifndef The_Powder_Toy_Particle_h -#define The_Powder_Toy_Particle_h +#ifndef PARTICLE_H_ +#define PARTICLE_H_ #include #include "StructProperty.h" @@ -24,7 +16,7 @@ struct Particle int tmp2; unsigned int dcolour; /** Returns a list of properties, their type and offset within the structure that can be changed - by higher-level processes refering to them by name such as Lua or the property tool **/ + by higher-level processes referring to them by name such as Lua or the property tool **/ static std::vector GetProperties(); }; diff --git a/src/simulation/SaveRenderer.cpp b/src/simulation/SaveRenderer.cpp index fc30a281d..283ab1013 100644 --- a/src/simulation/SaveRenderer.cpp +++ b/src/simulation/SaveRenderer.cpp @@ -1,10 +1,3 @@ -/* - * SaveRenderer.cpp - * - * Created on: Apr 3, 2012 - * Author: Simon - */ - #include "SaveRenderer.h" #include "client/GameSave.h" #include "graphics/Graphics.h" @@ -61,11 +54,11 @@ Thumbnail * SaveRenderer::Render(GameSave * save, bool decorations, bool fire) glTranslated(0, MENUSIZE, 0); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - ren->clearScreen(1.0f); - ren->ClearAccumulation(); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + ren->clearScreen(1.0f); + ren->ClearAccumulation(); #ifdef OGLR ren->RenderBegin(); @@ -120,7 +113,7 @@ Thumbnail * SaveRenderer::Render(GameSave * save, bool decorations, bool fire) pixel * dst; pixel * src = g->vid; - ren->ClearAccumulation(); + ren->ClearAccumulation(); if (fire) { @@ -178,6 +171,5 @@ Thumbnail * SaveRenderer::Render(unsigned char * saveData, int dataSize, bool de } SaveRenderer::~SaveRenderer() { - // TODO Auto-generated destructor stub } diff --git a/src/simulation/SaveRenderer.h b/src/simulation/SaveRenderer.h index be4a83bb1..7570bb7e5 100644 --- a/src/simulation/SaveRenderer.h +++ b/src/simulation/SaveRenderer.h @@ -1,10 +1,3 @@ -/* - * SaveRenderer.h - * - * Created on: Apr 3, 2012 - * Author: Simon - */ - #ifndef SAVERENDERER_H_ #define SAVERENDERER_H_ #ifdef OGLI diff --git a/src/simulation/Sign.cpp b/src/simulation/Sign.cpp index 82d9a185c..57d98bcd2 100644 --- a/src/simulation/Sign.cpp +++ b/src/simulation/Sign.cpp @@ -1,10 +1,3 @@ -/* - * Sign.cpp - * - * Created on: Jun 25, 2012 - * Author: Simon - */ - #include "Sign.h" #include "graphics/Graphics.h" #include "simulation/Simulation.h" diff --git a/src/simulation/Sign.h b/src/simulation/Sign.h index 1b45c25bc..4d15b02d3 100644 --- a/src/simulation/Sign.h +++ b/src/simulation/Sign.h @@ -1,13 +1,5 @@ -// -// Sign.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#ifndef The_Powder_Toy_Sign_h -#define The_Powder_Toy_Sign_h +#ifndef SIGN_H_ +#define SIGN_H_ #include diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 44932b5c6..b6f4f84d4 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2847,18 +2847,18 @@ int Simulation::create_part(int p, int x, int y, int tv) ) { parts[pmap[y][x]>>8].ctype = t; - if (t == PT_LIFE && v < NGOLALT && drawOn != PT_STOR) parts[pmap[y][x]>>8].tmp = v; + if (t == PT_LIFE && v < NGOL && drawOn != PT_STOR) parts[pmap[y][x]>>8].tmp = v; } else if ((drawOn == PT_DTEC || (drawOn == PT_PSTN && t != PT_FRME)) && drawOn != t) { parts[pmap[y][x]>>8].ctype = t; - if (drawOn == PT_DTEC && t==PT_LIFE && v>8].tmp = v; } else if (drawOn == PT_CRAY && drawOn != t && drawOn != PT_PSCN && drawOn != PT_INST && drawOn != PT_METL) { parts[pmap[y][x]>>8].ctype = t; - if (t==PT_LIFE && v>8].tmp2 = v; parts[pmap[y][x]>>8].temp = elements[t].Temperature; } @@ -2959,7 +2959,7 @@ int Simulation::create_part(int p, int x, int y, int tv) parts[i].tmp = 50; break; case PT_LIFE: - if (v>8].type==PT_LIFE) { golnum = parts[r>>8].ctype+1; - if (golnum<=0 || golnum>NGOLALT) { + if (golnum<=0 || golnum>NGOL) { kill_part(r>>8); continue; } diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index abcea157f..9e9424f94 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -1,10 +1,3 @@ -/* - * Simulation.h - * - * Created on: Jan 2, 2012 - * Author: Simon - */ - #ifndef SIMULATION_H_ #define SIMULATION_H_ #include @@ -16,7 +9,7 @@ #include "SimulationData.h" #include "Sign.h" #include "Particle.h" -#include "Player.h" +#include "Stickman.h" #include "WallType.h" #include "GOLMenu.h" #include "MenuSection.h" diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index e338e2f90..12f6ca850 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -1,9 +1,3 @@ -#/* - * SimulationData.cpp - * - * Created on: Jan 24, 2012 - * Author: Simon - */ #include "SimulationData.h" //#include "ElementFunctions.h" #include "ElementGraphics.h" diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 1d4781311..770d73236 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -1,10 +1,3 @@ -/* - * SimulationData.h - * - * Created on: Jan 24, 2012 - * Author: Simon - */ - #include #define SC_WALL 0 diff --git a/src/simulation/Player.h b/src/simulation/Stickman.h similarity index 62% rename from src/simulation/Player.h rename to src/simulation/Stickman.h index af2b68e46..0e9cd3c65 100644 --- a/src/simulation/Player.h +++ b/src/simulation/Stickman.h @@ -1,13 +1,5 @@ -// -// Player.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#ifndef The_Powder_Toy_Player_h -#define The_Powder_Toy_Player_h +#ifndef STICKMAN_H_ +#define STICKMAN_H_ struct playerst { diff --git a/src/simulation/StructProperty.h b/src/simulation/StructProperty.h index 5c46c7ea3..dda72c4eb 100644 --- a/src/simulation/StructProperty.h +++ b/src/simulation/StructProperty.h @@ -1,13 +1,5 @@ -// -// StructProperty.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#ifndef The_Powder_Toy_StructProperty_h -#define The_Powder_Toy_StructProperty_h +#ifndef STRUCTPROPERTY_H_ +#define STRUCTPROPERTY_H_ #include #include diff --git a/src/simulation/WallType.h b/src/simulation/WallType.h index c2d916a81..c9f30e392 100644 --- a/src/simulation/WallType.h +++ b/src/simulation/WallType.h @@ -1,13 +1,5 @@ -// -// WallType.h -// The Powder Toy -// -// Created by Simon Robertshaw on 04/06/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#ifndef The_Powder_Toy_WallType_h -#define The_Powder_Toy_WallType_h +#ifndef WALLTYPE_H_ +#define WALLTYPE_H_ #include "graphics/Graphics.h" class VideoBuffer; diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp index a617620b0..de1046437 100644 --- a/src/simulation/elements/BCLN.cpp +++ b/src/simulation/elements/BCLN.cpp @@ -57,7 +57,7 @@ int Element_BCLN::update(UPDATE_FUNC_ARGS) parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL))) { int r, rx, ry, rt; for (rx=-1; rx<2; rx++) diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp index f0a9c445e..482d2c9c4 100644 --- a/src/simulation/elements/CLNE.cpp +++ b/src/simulation/elements/CLNE.cpp @@ -49,7 +49,7 @@ Element_CLNE::Element_CLNE() //#TPT-Directive ElementHeader Element_CLNE static int update(UPDATE_FUNC_ARGS) int Element_CLNE::update(UPDATE_FUNC_ARGS) { - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL))) { int r, rx, ry, rt; for (rx=-1; rx<2; rx++) diff --git a/src/simulation/elements/CONV.cpp b/src/simulation/elements/CONV.cpp index 8f2f0c657..bb313acfb 100644 --- a/src/simulation/elements/CONV.cpp +++ b/src/simulation/elements/CONV.cpp @@ -50,7 +50,7 @@ Element_CONV::Element_CONV() int Element_CONV::update(UPDATE_FUNC_ARGS) { int r, rx, ry; - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || parts[i].ctype==PT_CONV || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || parts[i].ctype==PT_CONV || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL))) { for (rx=-1; rx<2; rx++) for (ry=-1; ry<2; ry++) diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index 55c9bf845..f0d276a2f 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -88,7 +88,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) break; } r = pmap[y+nyi+nyy][x+nxi+nxx]; - if (!sim->IsWallBlocking(x+nxi+nxx, y+nyi+nyy, parts[i].ctype) && (!sim->pmap[y+nyi+nyy][x+nxi+nxx] || (parts[i].ctype == PT_SPRK && !destroy))) { // create, also set color if it has passed through FILT + if (!sim->IsWallBlocking(x+nxi+nxx, y+nyi+nyy, parts[i].ctype) && (!sim->pmap[y+nyi+nyy][x+nxi+nxx] || (parts[i].ctype == PT_SPRK && parts[r>>8].type != PT_BREC && !destroy))) { // create, also set color if it has passed through FILT int nr; if (parts[i].ctype == PT_LIFE) nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, parts[i].ctype|(parts[i].tmp2<<8)); @@ -98,7 +98,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) parts[nr].dcolour = colored; parts[nr].temp = parts[i].temp; } - if((!destroy || parts[i].ctype != PT_SPRK) && !--partsRemaining) + if((!destroy || (parts[i].ctype != PT_SPRK &&parts[r>>8].type != PT_BREC)) && !--partsRemaining) docontinue = 0; } else if ((r&0xFF)==PT_FILT) { // get color if passed through FILT colored = wavelengthToDecoColour(parts[r>>8].ctype); diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp index f0e4964a1..bec42db47 100644 --- a/src/simulation/elements/PBCN.cpp +++ b/src/simulation/elements/PBCN.cpp @@ -63,7 +63,7 @@ int Element_PBCN::update(UPDATE_FUNC_ARGS) return 1; } } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL))) for (rx=-1; rx<2; rx++) for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>=0 && x+rx=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL))) for (rx=-1; rx<2; rx++) for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>=0 && x+rx #include "interface/Label.h" #include "TaskWindow.h" diff --git a/src/tasks/TaskWindow.h b/src/tasks/TaskWindow.h index 820265c63..4b5313fbf 100644 --- a/src/tasks/TaskWindow.h +++ b/src/tasks/TaskWindow.h @@ -1,10 +1,3 @@ -/* - * TaskWindow.h - * - * Created on: Apr 6, 2012 - * Author: Simon - */ - #ifndef TASKWINDOW_H_ #define TASKWINDOW_H_ diff --git a/src/update/UpdateActivity.cpp b/src/update/UpdateActivity.cpp index 0f22df776..8e4ee0565 100644 --- a/src/update/UpdateActivity.cpp +++ b/src/update/UpdateActivity.cpp @@ -1,10 +1,3 @@ -/* - * UpdateActivity.cpp - * - * Created on: Jun 20, 2012 - * Author: Simon - */ - #include #include #include "dialogues/ConfirmPrompt.h" @@ -167,6 +160,5 @@ void UpdateActivity::NotifyError(Task * sender) UpdateActivity::~UpdateActivity() { - // TODO Auto-generated destructor stub } diff --git a/src/update/UpdateActivity.h b/src/update/UpdateActivity.h index 533aaf700..6ba5fb37b 100644 --- a/src/update/UpdateActivity.h +++ b/src/update/UpdateActivity.h @@ -1,10 +1,3 @@ -/* - * UpdateActivity.h - * - * Created on: Jun 20, 2012 - * Author: Simon - */ - #ifndef UPDATEACTIVITY_H_ #define UPDATEACTIVITY_H_