summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/IntroText.h48
-rw-r--r--data/Shaders.h29
-rw-r--r--src/Config.h52
-rw-r--r--src/Controller.h7
-rw-r--r--src/Style.cpp8
-rw-r--r--src/Style.h11
-rw-r--r--src/Update.h7
-rw-r--r--src/cat/CommandInterface.cpp7
-rw-r--r--src/cat/CommandInterface.h13
-rw-r--r--src/cat/LuaScriptHelper.h7
-rw-r--r--src/cat/LuaScriptInterface.cpp13
-rw-r--r--src/cat/LuaScriptInterface.h7
-rw-r--r--src/cat/TPTSTypes.cpp7
-rw-r--r--src/cat/TPTSTypes.h7
-rw-r--r--src/cat/TPTScriptInterface.cpp7
-rw-r--r--src/cat/TPTScriptInterface.h7
-rw-r--r--src/client/ClientListener.h7
-rw-r--r--src/client/GameSave.cpp6
-rw-r--r--src/client/GameSave.h7
-rw-r--r--src/client/SaveFile.cpp7
-rw-r--r--src/client/SaveFile.h7
-rw-r--r--src/client/SaveInfo.cpp7
-rw-r--r--src/client/User.h7
-rw-r--r--src/colourpicker/ColourPickerActivity.cpp7
-rw-r--r--src/console/ConsoleCommand.h7
-rw-r--r--src/console/ConsoleController.cpp7
-rw-r--r--src/console/ConsoleController.h7
-rw-r--r--src/console/ConsoleModel.cpp7
-rw-r--r--src/console/ConsoleModel.h7
-rw-r--r--src/console/ConsoleView.cpp7
-rw-r--r--src/console/ConsoleView.h7
-rw-r--r--src/dialogues/ConfirmPrompt.cpp7
-rw-r--r--src/dialogues/ConfirmPrompt.h7
-rw-r--r--src/dialogues/ErrorMessage.cpp7
-rw-r--r--src/dialogues/ErrorMessage.h7
-rw-r--r--src/dialogues/InformationMessage.cpp7
-rw-r--r--src/dialogues/InformationMessage.h7
-rw-r--r--src/dialogues/TextPrompt.cpp7
-rw-r--r--src/dialogues/TextPrompt.h7
-rw-r--r--src/elementsearch/ElementSearchActivity.cpp8
-rw-r--r--src/elementsearch/ElementSearchActivity.h7
-rw-r--r--src/game/Brush.h6
-rw-r--r--src/game/EllipseBrush.h7
-rw-r--r--src/game/GameModelException.h13
-rw-r--r--src/game/Menu.h7
-rw-r--r--src/game/Notification.h7
-rw-r--r--src/game/Tool.cpp7
-rw-r--r--src/game/Tool.h7
-rw-r--r--src/game/ToolButton.cpp10
-rw-r--r--src/game/ToolButton.h7
-rw-r--r--src/graphics/Renderer.cpp6
-rw-r--r--src/interface/Appearance.cpp7
-rw-r--r--src/interface/Appearance.h11
-rw-r--r--src/interface/Button.cpp43
-rw-r--r--src/interface/Button.h7
-rw-r--r--src/interface/Checkbox.cpp8
-rw-r--r--src/interface/Checkbox.h7
-rw-r--r--src/interface/DropDown.cpp7
-rw-r--r--src/interface/DropDown.h7
-rw-r--r--src/interface/Slider.cpp8
-rw-r--r--src/interface/Slider.h7
-rw-r--r--src/interface/Spinner.cpp8
-rw-r--r--src/interface/Spinner.h7
-rw-r--r--src/localbrowser/LocalBrowserController.cpp6
-rw-r--r--src/localbrowser/LocalBrowserController.h7
-rw-r--r--src/localbrowser/LocalBrowserModel.cpp8
-rw-r--r--src/localbrowser/LocalBrowserModel.h7
-rw-r--r--src/localbrowser/LocalBrowserModelException.h7
-rw-r--r--src/localbrowser/LocalBrowserView.cpp8
-rw-r--r--src/localbrowser/LocalBrowserView.h7
-rw-r--r--src/login/LoginController.cpp8
-rw-r--r--src/login/LoginController.h7
-rw-r--r--src/login/LoginModel.cpp9
-rw-r--r--src/login/LoginModel.h7
-rw-r--r--src/login/LoginView.cpp7
-rw-r--r--src/login/LoginView.h7
-rw-r--r--src/options/OptionsController.cpp7
-rw-r--r--src/options/OptionsController.h7
-rw-r--r--src/options/OptionsModel.cpp8
-rw-r--r--src/options/OptionsModel.h7
-rw-r--r--src/options/OptionsView.cpp8
-rw-r--r--src/options/OptionsView.h7
-rw-r--r--src/preview/Comment.h7
-rw-r--r--src/preview/PreviewController.h7
-rw-r--r--src/preview/PreviewModel.h9
-rw-r--r--src/preview/PreviewModelException.h7
-rw-r--r--src/preview/PreviewView.h7
-rw-r--r--src/render/RenderController.cpp7
-rw-r--r--src/render/RenderController.h7
-rw-r--r--src/render/RenderModel.cpp8
-rw-r--r--src/render/RenderModel.h7
-rw-r--r--src/render/RenderView.cpp8
-rw-r--r--src/render/RenderView.h7
-rw-r--r--src/search/Thumbnail.cpp7
-rw-r--r--src/simulation/Elements.h9
-rw-r--r--src/simulation/GOLMenu.h8
-rw-r--r--src/simulation/MenuSection.h12
-rw-r--r--src/simulation/Particle.cpp7
-rw-r--r--src/simulation/Particle.h14
-rw-r--r--src/simulation/SaveRenderer.cpp20
-rw-r--r--src/simulation/SaveRenderer.h7
-rw-r--r--src/simulation/Sign.cpp7
-rw-r--r--src/simulation/Sign.h12
-rw-r--r--src/simulation/Simulation.cpp10
-rw-r--r--src/simulation/Simulation.h9
-rw-r--r--src/simulation/SimulationData.cpp6
-rw-r--r--src/simulation/SimulationData.h7
-rw-r--r--src/simulation/Stickman.h (renamed from src/simulation/Player.h)12
-rw-r--r--src/simulation/StructProperty.h12
-rw-r--r--src/simulation/WallType.h12
-rw-r--r--src/simulation/elements/BCLN.cpp2
-rw-r--r--src/simulation/elements/CLNE.cpp2
-rw-r--r--src/simulation/elements/CONV.cpp2
-rw-r--r--src/simulation/elements/CRAY.cpp4
-rw-r--r--src/simulation/elements/PBCN.cpp2
-rw-r--r--src/simulation/elements/PCLN.cpp2
-rw-r--r--src/tags/TagsController.cpp7
-rw-r--r--src/tags/TagsController.h7
-rw-r--r--src/tags/TagsModel.cpp9
-rw-r--r--src/tags/TagsModel.h7
-rw-r--r--src/tags/TagsModelException.h7
-rw-r--r--src/tags/TagsView.cpp14
-rw-r--r--src/tags/TagsView.h7
-rw-r--r--src/tasks/Task.cpp7
-rw-r--r--src/tasks/Task.h7
-rw-r--r--src/tasks/TaskListener.h7
-rw-r--r--src/tasks/TaskWindow.cpp7
-rw-r--r--src/tasks/TaskWindow.h7
-rw-r--r--src/update/UpdateActivity.cpp8
-rw-r--r--src/update/UpdateActivity.h7
130 files changed, 114 insertions, 1015 deletions
diff --git a/data/IntroText.h b/data/IntroText.h
index 3a930a1..e16db49 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 9eb125b..ec52733 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 0e66737..0cb3b0e 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 12748be..87680bd 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 9bb5c65..1972ce8 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 <iostream>
#include "Style.h"
diff --git a/src/Style.h b/src/Style.h
index 0463a22..7ac0a01 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 118396b..036f86f 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 3ebc795..992ce74 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 <iostream>
#include <string>
#include <string.h>
diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h
index 5b9c31f..192e1f9 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 <string>
#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 39be806..860d919 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 ef0c1f6..33e10d2 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 <string>
#include <iomanip>
#include <vector>
@@ -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 20dada1..0b9f6f3 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 a8fa962..87d1097 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 <iostream>
#include <sstream>
#include <stdint.h>
diff --git a/src/cat/TPTSTypes.h b/src/cat/TPTSTypes.h
index dfea425..6a2cec4 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 684467f..84f55ef 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 <stack>
#include <iostream>
#include <string>
diff --git a/src/cat/TPTScriptInterface.h b/src/cat/TPTScriptInterface.h
index 12240fa..3cb0b5f 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 68721b1..e04572e 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 d9e9127..06441c8 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<NGOLALT; gnum++){
+ for (gnum = 0; gnum<NGOL; gnum++){
if (ty==goltype[gnum])
particles[i-1].ctype = gnum;
}
@@ -1508,7 +1508,7 @@ void GameSave::readPSv(char * data, int dataLength)
}
if(ver<52 && (ty==PT_CLNE || ty==PT_PCLN || ty==PT_BCLN)){
//Replace old GOL ctypes in clone
- for (gnum = 0; gnum<NGOLALT; gnum++){
+ for (gnum = 0; gnum<NGOL; gnum++){
if (particles[i-1].ctype==goltype[gnum])
{
particles[i-1].ctype = PT_LIFE;
diff --git a/src/client/GameSave.h b/src/client/GameSave.h
index 8ac1fce..cbabb3e 100644
--- a/src/client/GameSave.h
+++ b/src/client/GameSave.h
@@ -1,10 +1,3 @@
-//
-// GameSave.h
-// The Powder Toy
-//
-// Created by Simon Robertshaw on 04/06/2012.
-//
-
#ifndef The_Powder_Toy_GameSave_h
#define The_Powder_Toy_GameSave_h
diff --git a/src/client/SaveFile.cpp b/src/client/SaveFile.cpp
index fe7ad4f..5ca16aa 100644
--- a/src/client/SaveFile.cpp
+++ b/src/client/SaveFile.cpp
@@ -1,10 +1,3 @@
-/*
- * SaveFile.cpp
- *
- * Created on: Jun 6, 2012
- * Author: Simon
- */
-
#include "SaveFile.h"
#include "GameSave.h"
#include "Client.h"
diff --git a/src/client/SaveFile.h b/src/client/SaveFile.h
index b63d181..33211dd 100644
--- a/src/client/SaveFile.h
+++ b/src/client/SaveFile.h
@@ -1,10 +1,3 @@
-/*
- * SaveFile.h
- *
- * Created on: Jun 6, 2012
- * Author: Simon
- */
-
#ifndef SAVEFILE_H_
#define SAVEFILE_H_
diff --git a/src/client/SaveInfo.cpp b/src/client/SaveInfo.cpp
index 2d8fd52..a89261a 100644
--- a/src/client/SaveInfo.cpp
+++ b/src/client/SaveInfo.cpp
@@ -1,10 +1,3 @@
-/*
- * Save.cpp
- *
- * Created on: Jan 26, 2012
- * Author: Simon
- */
-
#include "SaveInfo.h"
#include "GameSave.h"
#include "Client.h"
diff --git a/src/client/User.h b/src/client/User.h
index 5a47a3e..5dfb531 100644
--- a/src/client/User.h
+++ b/src/client/User.h
@@ -1,10 +1,3 @@
-/*
- * User.h
- *
- * Created on: Jan 25, 2012
- * Author: Simon
- */
-
#ifndef USER_H_
#define USER_H_
diff --git a/src/colourpicker/ColourPickerActivity.cpp b/src/colourpicker/ColourPickerActivity.cpp
index 966cd41..04aa644 100644
--- a/src/colourpicker/ColourPickerActivity.cpp
+++ b/src/colourpicker/ColourPickerActivity.cpp
@@ -1,10 +1,3 @@
-/*
- * ElementSearchActivity.cpp
- *
- * Created on: Jun 24, 2012
- * Author: Simon
- */
-
#include <algorithm>
#include <iomanip>
#include "ColourPickerActivity.h"
diff --git a/src/console/ConsoleCommand.h b/src/console/ConsoleCommand.h
index a40a688..31e41b0 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 39e6e51..602636f 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 <stack>
#include "ConsoleController.h"
diff --git a/src/console/ConsoleController.h b/src/console/ConsoleController.h
index d5fc07a..cf8b36e 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 df900a3..ceb6b32 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 b340ea8..312739a 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 5390cbd..9a51366 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 f118293..de1c48e 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 1aa75e2..0a89efa 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 b866338..9e38a48 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 ef86152..876bc10 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 769127e..34cdb0c 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 b015b06..7f861c3 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 6f03154..8032311 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 dbaefd2..cd06a8c 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 <iostream>
#include "TextPrompt.h"
#include "interface/Label.h"
diff --git a/src/dialogues/TextPrompt.h b/src/dialogues/TextPrompt.h
index 1c4a672..5478cb5 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 8bf9e6e..7156cb1 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 <algorithm>
#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 de9700d..987d8fb 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 b59d017..7671caf 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 80215b5..ad28766 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 05138f2..c95f7e6 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 <string>
#include <exception>
@@ -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 261193e..3f955e1 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 4c64dea..b2bf6f8 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 5be44b6..b0ad67a 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 <string>
#include "Tool.h"
#include "game/Brush.h"
diff --git a/src/game/Tool.h b/src/game/Tool.h
index 22898c7..0c8ab65 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 70b93a2..575167f 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 b311d0b..6fdd733 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 3a1a2cd..1f4aed8 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 <cmath>
#include <iostream>
#include <vector>
diff --git a/src/interface/Appearance.cpp b/src/interface/Appearance.cpp
index f2f562c..a4c21d0 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 <iostream>
#include "Appearance.h"
diff --git a/src/interface/Appearance.h b/src/interface/Appearance.h
index b876269..1c1bb5a 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 95de0e8..a2ecf8f 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 <iostream>
#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 dff15b4..05f466d 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 22c6a42..7caf18b 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 1323831..f82cef7 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 0b05aac..4c1d761 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 <iostream>
#include "Style.h"
#include "Button.h"
diff --git a/src/interface/DropDown.h b/src/interface/DropDown.h
index 3aba971..c13fdf6 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 d5639cb..3ada74f 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 <iostream>
#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 65ca0ba..b02366e 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 ea3d1fa..fd3a61d 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 <cmath>
#include <iostream>
#include "Spinner.h"
diff --git a/src/interface/Spinner.h b/src/interface/Spinner.h
index 23d4141..deabb3c 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 03c83f8..fba25e3 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 <sstream>
#include "client/Client.h"
diff --git a/src/localbrowser/LocalBrowserController.h b/src/localbrowser/LocalBrowserController.h
index 236ac07..6dcf2a5 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 42f1a65..333e845 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 af88509..75167d9 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 087f7df..5146c53 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 aa75925..700d24e 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 <sstream>
#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 7a8c813..17930d9 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 f27ad59..fd8e576 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 b20e187..b723cb9 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 3015613..5b70c2c 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 121d78e..8149797 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 3cb07c3..a660887 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 ae7af4e..a492b75 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 3973fed..b789c1f 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 1df92ba..f76459c 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 c3517fa..fbfe2a0 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 c15fb88..b0867c1 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 <vector>
diff --git a/src/options/OptionsView.cpp b/src/options/OptionsView.cpp
index 3adf7d7..5bbd608 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 a4c9854..8d41ba5 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 bf4b8d4..4bf7acb 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 2d8e35a..ab63ae4 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 77cab37..2ee2c45 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 <vector>
#include <iostream>
#include <pthread.h>
- #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 261d203..85dce1d 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 c5931af..10dba4d 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 e98200a..7b60e97 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 8ea44a4..42adb65 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 556493c..b17f6fc 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 8a8b1cd..2cd24a5 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 ad299b0..508ff47 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 9e4819b..5da8c1d 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 5ef1b26..1f06c45 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 b019ac4..e0dfcee 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 36bb5dd..9054313 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 b8e16fe..12b1ba6 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 115ed95..19089a1 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 <cstddef>
#include "Particle.h"
diff --git a/src/simulation/Particle.h b/src/simulation/Particle.h
index bb0297e..fbb5988 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 <vector>
#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<StructProperty> GetProperties();
};
diff --git a/src/simulation/SaveRenderer.cpp b/src/simulation/SaveRenderer.cpp
index fc30a28..283ab10 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 be4a83b..7570bb7 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 82d9a18..57d98bc 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 1b45c25..4d15b02 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 <string>
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 44932b5..b6f4f84 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<NGOLALT)
+ if (drawOn == PT_DTEC && t==PT_LIFE && v<NGOL)
parts[pmap[y][x]>>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<NGOLALT)
+ if (t==PT_LIFE && v<NGOL)
parts[pmap[y][x]>>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<NGOLALT)
+ if (v<NGOL)
{
parts[i].tmp = grule[v+1][9] - 1;
parts[i].ctype = v;
@@ -3553,7 +3553,7 @@ void Simulation::update_particles_i(int start, int inc)
if (parts[r>>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 abcea15..9e9424f 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 <cstring>
@@ -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 e338e2f..12f6ca8 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 1d47813..770d732 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 <vector>
#define SC_WALL 0
diff --git a/src/simulation/Player.h b/src/simulation/Stickman.h
index af2b68e..0e9cd3c 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 5c46c7e..dda72c4 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 <string>
#include <stdint.h>
diff --git a/src/simulation/WallType.h b/src/simulation/WallType.h
index c2d916a..c9f30e3 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 a617620..de10464 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 f0a9c44..482d2c9 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 8f2f0c6..bb313ac 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 55c9bf8..f0d276a 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 f0e4964..bec42db 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<XRES && y+ry<YRES)
diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp
index fc9db0e..1cd2ede 100644
--- a/src/simulation/elements/PCLN.cpp
+++ b/src/simulation/elements/PCLN.cpp
@@ -77,7 +77,7 @@ int Element_PCLN::update(UPDATE_FUNC_ARGS)
parts[i].life = 10;
}
}
- 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<XRES && y+ry<YRES)
diff --git a/src/tags/TagsController.cpp b/src/tags/TagsController.cpp
index cf373e6..c3ecb2e 100644
--- a/src/tags/TagsController.cpp
+++ b/src/tags/TagsController.cpp
@@ -1,10 +1,3 @@
-/*
- * TagsController.cpp
- *
- * Created on: Mar 5, 2012
- * Author: Simon
- */
-
#include "TagsController.h"
#include "interface/Engine.h"
diff --git a/src/tags/TagsController.h b/src/tags/TagsController.h
index ee68a03..8a51098 100644
--- a/src/tags/TagsController.h
+++ b/src/tags/TagsController.h
@@ -1,10 +1,3 @@
-/*
- * TagsController.h
- *
- * Created on: Mar 5, 2012
- * Author: Simon
- */
-
#ifndef TAGSCONTROLLER_H_
#define TAGSCONTROLLER_H_
diff --git a/src/tags/TagsModel.cpp b/src/tags/TagsModel.cpp
index b4b3ff9..f3329ad 100644
--- a/src/tags/TagsModel.cpp
+++ b/src/tags/TagsModel.cpp
@@ -1,10 +1,3 @@
-/*
- * TagsModel.cpp
- *
- * Created on: Mar 5, 2012
- * Author: Simon
- */
-
#include "TagsModel.h"
#include "TagsView.h"
#include "client/Client.h"
@@ -14,7 +7,6 @@
TagsModel::TagsModel():
save(NULL)
{
- // TODO Auto-generated constructor stub
}
@@ -80,6 +72,5 @@ void TagsModel::notifyTagsChanged()
}
TagsModel::~TagsModel() {
- // TODO Auto-generated destructor stub
}
diff --git a/src/tags/TagsModel.h b/src/tags/TagsModel.h
index e1c3b32..8afe841 100644
--- a/src/tags/TagsModel.h
+++ b/src/tags/TagsModel.h
@@ -1,10 +1,3 @@
-/*
- * TagsModel.h
- *
- * Created on: Mar 5, 2012
- * Author: Simon
- */
-
#ifndef TAGSMODEL_H_
#define TAGSMODEL_H_
diff --git a/src/tags/TagsModelException.h b/src/tags/TagsModelException.h
index 10aaa31..671bf3b 100644
--- a/src/tags/TagsModelException.h
+++ b/src/tags/TagsModelException.h
@@ -1,10 +1,3 @@
-/*
- * TagsModelException.h
- *
- * Created on: Mar 29, 2012
- * Author: Simon
- */
-
#ifndef TAGSMODELEXCEPTION_H_
#define TAGSMODELEXCEPTION_H_
diff --git a/src/tags/TagsView.cpp b/src/tags/TagsView.cpp
index 2a12775..4e3c948 100644
--- a/src/tags/TagsView.cpp
+++ b/src/tags/TagsView.cpp
@@ -1,10 +1,3 @@
-/*
- * TagsView.cpp
- *
- * Created on: Mar 5, 2012
- * Author: Simon
- */
-
#include "client/Client.h"
#include "TagsView.h"
@@ -133,12 +126,6 @@ void TagsView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
{
switch(key)
{
- /*case KEY_TAB:
- if(IsFocused(usernameField))
- FocusComponent(passwordField);
- else
- FocusComponent(usernameField);
- break;*/
case KEY_ENTER:
case KEY_RETURN:
if(IsFocused(tagInput))
@@ -168,6 +155,5 @@ void TagsView::addTag()
}
TagsView::~TagsView() {
- // TODO Auto-generated destructor stub
}
diff --git a/src/tags/TagsView.h b/src/tags/TagsView.h
index b2dabc0..222fb1b 100644
--- a/src/tags/TagsView.h
+++ b/src/tags/TagsView.h
@@ -1,10 +1,3 @@
-/*
- * TagsView.h
- *
- * Created on: Mar 5, 2012
- * Author: Simon
- */
-
#ifndef TAGSVIEW_H_
#define TAGSVIEW_H_
diff --git a/src/tasks/Task.cpp b/src/tasks/Task.cpp
index d29fe04..133d764 100644
--- a/src/tasks/Task.cpp
+++ b/src/tasks/Task.cpp
@@ -1,10 +1,3 @@
-/*
- * Task.cpp
- *
- * Created on: Apr 6, 2012
- * Author: Simon
- */
-
#include "Task.h"
#include "TaskListener.h"
diff --git a/src/tasks/Task.h b/src/tasks/Task.h
index f66129f..a7bf1c7 100644
--- a/src/tasks/Task.h
+++ b/src/tasks/Task.h
@@ -1,10 +1,3 @@
-/*
- * Task.h
- *
- * Created on: Apr 6, 2012
- * Author: Simon
- */
-
#ifndef TASK_H_
#define TASK_H_
diff --git a/src/tasks/TaskListener.h b/src/tasks/TaskListener.h
index 7405c03..13df07c 100644
--- a/src/tasks/TaskListener.h
+++ b/src/tasks/TaskListener.h
@@ -1,10 +1,3 @@
-/*
- * TaskListener.h
- *
- * Created on: Apr 6, 2012
- * Author: Simon
- */
-
#ifndef TASKLISTENER_H_
#define TASKLISTENER_H_
diff --git a/src/tasks/TaskWindow.cpp b/src/tasks/TaskWindow.cpp
index b3055d1..69a7751 100644
--- a/src/tasks/TaskWindow.cpp
+++ b/src/tasks/TaskWindow.cpp
@@ -1,10 +1,3 @@
-/*
- * TaskWindow.cpp
- *
- * Created on: Apr 6, 2012
- * Author: Simon
- */
-
#include <sstream>
#include "interface/Label.h"
#include "TaskWindow.h"
diff --git a/src/tasks/TaskWindow.h b/src/tasks/TaskWindow.h
index 820265c..4b5313f 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 0f22df7..8e4ee05 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 <bzlib.h>
#include <sstream>
#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 533aaf7..6ba5fb3 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_