From 2e8576be1a72deb8fefe496808d855621f467359 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 17 Jan 2009 15:05:09 +0000 Subject: [PATCH] Use C++ style comments --- src/AnimatedImage.cpp | 32 ++++++------- src/AnimatedImage.hpp | 32 ++++++------- src/Asteroid.cpp | 44 ++++++++--------- src/Asteroid.hpp | 32 ++++++------- src/ConfigFile.cpp | 32 ++++++------- src/ConfigFile.hpp | 32 ++++++------- src/ElectricGate.cpp | 32 ++++++------- src/ElectricGate.hpp | 38 +++++++-------- src/Emitter.cpp | 108 +++++++++++++++++++++--------------------- src/Emitter.hpp | 54 ++++++++++----------- src/Fade.cpp | 32 ++++++------- src/Fade.hpp | 32 ++++++------- src/Font.cpp | 36 +++++++------- src/Font.hpp | 36 +++++++------- src/Game.cpp | 54 ++++++++++----------- src/Game.hpp | 36 +++++++------- src/Geometry.hpp | 32 ++++++------- src/HighScores.cpp | 80 +++++++++++++++---------------- src/HighScores.hpp | 36 +++++++------- src/Image.cpp | 32 ++++++------- src/Image.hpp | 32 ++++++------- src/Input.cpp | 80 +++++++++++++++---------------- src/Input.hpp | 42 ++++++++-------- src/Key.cpp | 32 ++++++------- src/Key.hpp | 32 ++++++------- src/LandingPad.cpp | 40 ++++++++-------- src/LandingPad.hpp | 32 ++++++------- src/LoadOnce.hpp | 54 ++++++++++----------- src/Main.cpp | 56 +++++++++++----------- src/Menu.cpp | 42 ++++++++-------- src/Menu.hpp | 36 +++++++------- src/Mine.cpp | 32 ++++++------- src/Mine.hpp | 32 ++++++------- src/Missile.cpp | 33 ++++++------- src/Missile.hpp | 33 ++++++------- src/ObjectGrid.cpp | 72 ++++++++++++++-------------- src/ObjectGrid.hpp | 32 ++++++------- src/OpenGL.cpp | 86 ++++++++++++++++----------------- src/OpenGL.hpp | 54 ++++++++++----------- src/Options.cpp | 32 ++++++------- src/Options.hpp | 32 ++++++------- src/Platform.hpp | 52 ++++++++++---------- src/ScreenManager.cpp | 36 +++++++------- src/ScreenManager.hpp | 48 +++++++++---------- src/Ship.cpp | 62 ++++++++++++------------ src/Ship.hpp | 32 ++++++------- src/SoundEffect.cpp | 32 ++++++------- src/SoundEffect.hpp | 32 ++++++------- src/Surface.cpp | 40 ++++++++-------- src/Surface.hpp | 32 ++++++------- src/Texture.cpp | 32 ++++++------- src/Texture.hpp | 32 ++++++------- src/Viewport.cpp | 52 ++++++++++---------- src/Viewport.hpp | 32 ++++++------- 54 files changed, 1137 insertions(+), 1135 deletions(-) diff --git a/src/AnimatedImage.cpp b/src/AnimatedImage.cpp index 013e415..b62cac3 100644 --- a/src/AnimatedImage.cpp +++ b/src/AnimatedImage.cpp @@ -1,19 +1,19 @@ -/* AnimatedImage.cpp -- Images with multiple frames. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// AnimatedImage.cpp -- Images with multiple frames. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "AnimatedImage.hpp" diff --git a/src/AnimatedImage.hpp b/src/AnimatedImage.hpp index f77afde..fe75905 100644 --- a/src/AnimatedImage.hpp +++ b/src/AnimatedImage.hpp @@ -1,19 +1,19 @@ -/* AnimatedImage.hpp -- Images with multiple frames. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// AnimatedImage.hpp -- Images with multiple frames. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_ANIMATED_IMAGE_HPP #define INC_ANIMATED_IMAGE_HPP diff --git a/src/Asteroid.cpp b/src/Asteroid.cpp index a2566c9..41e79e3 100644 --- a/src/Asteroid.cpp +++ b/src/Asteroid.cpp @@ -1,19 +1,19 @@ -/* Asteroid.cpp -- Randomly generated asteroid. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Asteroid.cpp -- Randomly generated asteroid. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Asteroid.hpp" #include "OpenGL.hpp" @@ -158,9 +158,9 @@ void Asteroid::GenerateDisplayList(int texidx) glEndList(); } -/* - * Returns the line segment which defines the top of the given Poly. - */ +// +// Returns the line segment which defines the top of the given Poly. +// LineSegment Asteroid::GetUpBoundary(int poly) { return LineSegment @@ -170,9 +170,9 @@ LineSegment Asteroid::GetUpBoundary(int poly) ypos*OBJ_GRID_SIZE + uppolys[poly].points[2].y + OBJ_GRID_TOP); } -/* - * Returns the line segment which defines the bottom of the given Poly. - */ +// +// Returns the line segment which defines the bottom of the given Poly. +// LineSegment Asteroid::GetDownBoundary(int poly) { return LineSegment diff --git a/src/Asteroid.hpp b/src/Asteroid.hpp index 688cf3b..8adcd8c 100644 --- a/src/Asteroid.hpp +++ b/src/Asteroid.hpp @@ -1,19 +1,19 @@ -/* Asteroid.hpp -- Randomly generated asteroid. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Asteroid.hpp -- Randomly generated asteroid. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_ASTEROID_HPP #define INC_ASTEROID_HPP diff --git a/src/ConfigFile.cpp b/src/ConfigFile.cpp index e4a02fa..4404851 100644 --- a/src/ConfigFile.cpp +++ b/src/ConfigFile.cpp @@ -1,19 +1,19 @@ -/* ConfigFile.cpp -- Settings persistence. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// ConfigFile.cpp -- Settings persistence. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "ConfigFile.hpp" diff --git a/src/ConfigFile.hpp b/src/ConfigFile.hpp index b7f0cb8..6485d42 100644 --- a/src/ConfigFile.hpp +++ b/src/ConfigFile.hpp @@ -1,19 +1,19 @@ -/* ConfigFile.hpp -- Settings persistence. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// ConfigFile.hpp -- Settings persistence. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_CONFIGFILE_HPP #define INC_CONFIGFILE_HPP diff --git a/src/ElectricGate.cpp b/src/ElectricGate.cpp index 3593b65..0ede187 100644 --- a/src/ElectricGate.cpp +++ b/src/ElectricGate.cpp @@ -1,19 +1,19 @@ -/* ElectricGate.cpp -- Electric gateway thingys. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// ElectricGate.cpp -- Electric gateway thingys. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "ElectricGate.hpp" #include "LoadOnce.hpp" diff --git a/src/ElectricGate.hpp b/src/ElectricGate.hpp index fedd13d..c75ed5d 100644 --- a/src/ElectricGate.hpp +++ b/src/ElectricGate.hpp @@ -1,19 +1,19 @@ -/* ElectricGate.hpp -- Electric gateway thingys. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// ElectricGate.hpp -- Electric gateway thingys. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_ELECTRICGATE_HPP #define INC_ELECTRICGATE_HPP @@ -23,9 +23,9 @@ #include "Viewport.hpp" #include "Image.hpp" -/* - * A line strip used for rendering lightning. - */ +// +// A line strip used for rendering lightning. +// class LightLineStrip { public: LightLineStrip() : swapXandY(false) {} diff --git a/src/Emitter.cpp b/src/Emitter.cpp index e5df76b..a78cc88 100644 --- a/src/Emitter.cpp +++ b/src/Emitter.cpp @@ -1,21 +1,21 @@ -/* - * Emitter.cpp - Implementation of particle emitter classes. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Emitter.cpp - Implementation of particle emitter classes. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "Emitter.hpp" #include "OpenGL.hpp" @@ -23,18 +23,18 @@ Texture *Emitter::texture = NULL; -/* - * Creates a new particle emitter. - * x, y -> Starting position. - * r, g, b -> Base colour components. - * createnew -> New particles will be created on initialisation. - * deviation -> Randomness in particle colours. - * xg, yg -> X and Y components of acceleration. - * life -> Average life of each particle. - * max_speed -> Maximum speed of all particles. - * size -> Size of particles. - * slowdown -> Rate of speed decrease. - */ +// +// Creates a new particle emitter. +// x, y -> Starting position. +// r, g, b -> Base colour components. +// createnew -> New particles will be created on initialisation. +// deviation -> Randomness in particle colours. +// xg, yg -> X and Y components of acceleration. +// life -> Average life of each particle. +// max_speed -> Maximum speed of all particles. +// size -> Size of particles. +// slowdown -> Rate of speed decrease. +// Emitter::Emitter(int x, int y, float r, float g, float b, bool createnew, float deviation, float xg, float yg, float life, float max_speed, float size, float slowdown) @@ -58,9 +58,9 @@ Emitter::Emitter(int x, int y, float r, float g, float b, bool createnew, } -/* - * Resets the emitter. - */ +// +// Resets the emitter. +// void Emitter::Reset() { for (int i = 0; i < MAX_PARTICLES; i++) { @@ -70,9 +70,9 @@ void Emitter::Reset() } -/* - * Creates a new cluster of particles at (x, y). - */ +// +// Creates a new cluster of particles at (x, y). +// void Emitter::NewCluster(int x, int y) { int i, created=0; @@ -96,9 +96,9 @@ void Emitter::NewCluster(int x, int y) } -/* - * Draws all the particles created by this emitter. - */ +// +// Draws all the particles created by this emitter. +// void Emitter::Draw(float adjust_x, float adjust_y) const { glEnable(GL_TEXTURE_2D); @@ -166,9 +166,9 @@ void Emitter::Process(bool createnew, bool evolve) } } -/* - * Creates one new particle at the specified index. - */ +// +// Creates one new particle at the specified index. +// void Emitter::NewParticle(int index) { float d[3]; @@ -201,9 +201,9 @@ void Emitter::NewParticle(int index) } -/* - * Smoke trail constructor. Sets special Emitter constants. - */ +// +// Smoke trail constructor. Sets special Emitter constants. +// SmokeTrail::SmokeTrail() : Emitter(0, 0, 0.6f, 0.6f, 0.9f, false, 0.2f, @@ -214,9 +214,9 @@ SmokeTrail::SmokeTrail() } -/* - * Processes the smoke trail effect for particle p. - */ +// +// Processes the smoke trail effect for particle p. +// void SmokeTrail::ProcessEffect(int p) { if (particle[p].g > 0.5f) @@ -233,9 +233,9 @@ void SmokeTrail::ProcessEffect(int p) } -/* - * Explosion constructor. Sets Emitter constants to create a pretty explosion. - */ +// +// Explosion constructor. Sets Emitter constants to create a pretty explosion. +// Explosion::Explosion() : Emitter(0, 0, 0.7f, 0.7f, 0.0f, false, 0.3f, 0.0f, 0.0f, 1.0f, 120.0f, 8.5f, 2.0f) { @@ -244,9 +244,9 @@ Explosion::Explosion() } -/* - * Processes the explosion effect for particle p. - */ +// +// Processes the explosion effect for particle p. +// void Explosion::ProcessEffect(int p) { if (particle[p].g > 0.5f) diff --git a/src/Emitter.hpp b/src/Emitter.hpp index ef70153..34c68cb 100644 --- a/src/Emitter.hpp +++ b/src/Emitter.hpp @@ -1,21 +1,21 @@ -/* - * Emitter.hpp - Definition of various particle emitters. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Emitter.hpp - Definition of various particle emitters. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_EMITTER_HPP #define INC_EMITTER_HPP @@ -26,9 +26,9 @@ #define MAX_PARTICLES 512 -/* - * A generic particle emitter. - */ +// +// A generic particle emitter. +// class Emitter { public: Emitter(int x, int y, float r, float g, float b, bool createnew=true, float deviation=0.0f, float xg=0.0f, float yg=0.0f, @@ -63,9 +63,9 @@ protected: }; -/* - * A smoke trail. - */ +// +// A smoke trail. +// class SmokeTrail : public Emitter { public: SmokeTrail(); @@ -76,9 +76,9 @@ private: }; -/* - * An explosion. - */ +// +// An explosion. +// class Explosion : public Emitter { public: Explosion(); diff --git a/src/Fade.cpp b/src/Fade.cpp index 003ed71..bec5da4 100644 --- a/src/Fade.cpp +++ b/src/Fade.cpp @@ -1,19 +1,19 @@ -/* Fade.cpp -- Generic fade in/out effect. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Fade.cpp -- Generic fade in/out effect. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Fade.hpp" #include "OpenGL.hpp" diff --git a/src/Fade.hpp b/src/Fade.hpp index a5a0649..76da4e5 100644 --- a/src/Fade.hpp +++ b/src/Fade.hpp @@ -1,19 +1,19 @@ -/* Fade.hpp -- Generic fade in/out effect. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Fade.hpp -- Generic fade in/out effect. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_FADE_HPP #define INC_FADE_HPP diff --git a/src/Font.cpp b/src/Font.cpp index a7e27f2..e02b535 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -1,21 +1,21 @@ -/* - * Font.cpp -- A wrapper around FreeType. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Font.cpp -- A wrapper around FreeType. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "Font.hpp" diff --git a/src/Font.hpp b/src/Font.hpp index 6cdd12a..2a58eff 100644 --- a/src/Font.hpp +++ b/src/Font.hpp @@ -1,21 +1,21 @@ -/* - * FreeType.hpp -- A wrapper around FreeType. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// FreeType.hpp -- A wrapper around FreeType. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_FREETYPE_HPP #define INC_FREETYPE_HPP diff --git a/src/Game.cpp b/src/Game.cpp index 6e1bda7..69ea433 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -1,21 +1,21 @@ -/* - * Game.cpp -- Implementation of core game logic. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Game.cpp -- Implementation of core game logic. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "Game.hpp" #include "Menu.hpp" @@ -23,18 +23,18 @@ #include "LoadOnce.hpp" #include "Input.hpp" -/* - * Constants affecting level generation. - */ +// +// Constants affecting level generation. +// #define MAX_SURFACE_HEIGHT 300 #define SHIP_SPEED 0.15f #define MAX_PAD_SIZE 2 #define FUELBAR_OFFSET 68 #define GRAVITY 0.035f -/* - * Constants affecting state transitions. - */ +// +// Constants affecting state transitions. +// const int Game::DEATH_TIMEOUT(50); // Frames to wait for ending level #define GAME_FADE_IN_SPEED 0.1f // Rate of alpha change at level start #define GAME_FADE_OUT_SPEED 0.1f // Rate of alpha change at level end @@ -522,9 +522,9 @@ void Game::StartLevel(int level) life_alpha = LIFE_ALPHA_BASE + 1.0f; } -/* - * Destroys the ship after a collision. - */ +// +// Destroys the ship after a collision. +// void Game::ExplodeShip() { // Set the game state diff --git a/src/Game.hpp b/src/Game.hpp index ae2bb2e..ac529ce 100644 --- a/src/Game.hpp +++ b/src/Game.hpp @@ -1,21 +1,21 @@ -/* - * Game.hpp -- Definition of core game classes. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Game.hpp -- Definition of core game classes. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_GAME_HPP #define INC_GAME_HPP diff --git a/src/Geometry.hpp b/src/Geometry.hpp index 41902ba..6a4c7ac 100644 --- a/src/Geometry.hpp +++ b/src/Geometry.hpp @@ -1,19 +1,19 @@ -/* Geometry.hpp -- Geometric types. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Geometry.hpp -- Geometric types. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_GEOMETRY_H #define INC_GEOMETRY_H diff --git a/src/HighScores.cpp b/src/HighScores.cpp index a79c55a..1a4cf9a 100644 --- a/src/HighScores.cpp +++ b/src/HighScores.cpp @@ -1,21 +1,21 @@ -/* - * HighScores.cpp - Implementation of high scores screen. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// HighScores.cpp - Implementation of high scores screen. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "HighScores.hpp" #include "Input.hpp" @@ -29,10 +29,10 @@ HighScores::HighScores() } -/* - * Called just before the screen is to be displayed. Resets variables - * and loads data. - */ +// +// Called just before the screen is to be displayed. Resets variables +// and loads data. +// void HighScores::Load() { // Set state @@ -40,9 +40,9 @@ void HighScores::Load() } -/* - * Processes user input. Called at the start of each frame. - */ +// +// Processes user input. Called at the start of each frame. +// void HighScores::Process() { Input &input = Input::GetInstance(); @@ -147,9 +147,9 @@ void HighScores::Process() } -/* - * Renders the next frame. - */ +// +// Renders the next frame. +// void HighScores::Display() { OpenGL &opengl = OpenGL::GetInstance(); @@ -205,25 +205,25 @@ void HighScores::Display() } } -/* - * Loads the highsores from disk. - */ +// +// Loads the highsores from disk. +// void HighScores::LoadHighScores() { scoreFile.Load(); } -/* - * Writes high scores to disk. - */ +// +// Writes high scores to disk. +// void HighScores::WriteHighScores() { scoreFile.Save(); } -/* - * Displays the highest scores screen to the user. - */ +// +// Displays the highest scores screen to the user. +// void HighScores::DisplayScores() { LoadHighScores(); @@ -240,9 +240,9 @@ void HighScores::DisplayScores() fade = HS_FADE_IN_SPEED; } -/* - * Check to see if the player has a high score. - */ +// +// Check to see if the player has a high score. +// void HighScores::CheckScore(int score) { LoadHighScores(); diff --git a/src/HighScores.hpp b/src/HighScores.hpp index 23ca1be..a55a464 100644 --- a/src/HighScores.hpp +++ b/src/HighScores.hpp @@ -1,21 +1,21 @@ -/* - * HighScores.hpp -- Definition of high score screen. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// HighScores.hpp -- Definition of high score screen. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_HIGHSCORES_HPP #define INC_HIGHSCORES_HPP diff --git a/src/Image.cpp b/src/Image.cpp index d7897f4..424a1ea 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -1,19 +1,19 @@ -/* Image.cpp -- Wrapper for loading and displaying images - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Image.cpp -- Wrapper for loading and displaying images +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Image.hpp" #include "OpenGL.hpp" diff --git a/src/Image.hpp b/src/Image.hpp index 78091d6..1be9885 100644 --- a/src/Image.hpp +++ b/src/Image.hpp @@ -1,19 +1,19 @@ -/* Image.hpp -- Wrapper for loading and displaying images - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Image.hpp -- Wrapper for loading and displaying images +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_IMAGE_HPP #define INC_IMAGE_HPP diff --git a/src/Input.cpp b/src/Input.cpp index b388f59..2356548 100644 --- a/src/Input.cpp +++ b/src/Input.cpp @@ -1,28 +1,28 @@ -/* - * Input.cpp - Implementation of SDL input wrapper. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Input.cpp - Implementation of SDL input wrapper. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "Input.hpp" #include "OpenGL.hpp" -/* - * Create a new input manager. Never call this directly: use GetInstance. - */ +// +// Create a new input manager. Never call this directly: use GetInstance. +// Input::Input() : joystick(NULL), textinput(false), joyLeft(false), joyRight(false), joyUp(false), joyDown(false), joyButton0(false), joyButton1(false) @@ -48,9 +48,9 @@ Input::Input() } -/* - * Destroys an input manager. - */ +// +// Destroys an input manager. +// Input::~Input() { if (joystick != NULL) @@ -58,9 +58,9 @@ Input::~Input() } -/* - * Returns the only instance of Input. - */ +// +// Returns the only instance of Input. +// Input &Input::GetInstance() { static Input g_input; @@ -69,9 +69,9 @@ Input &Input::GetInstance() } -/* - * Updates the current input state. Note that this also processes SDL_QUIT messages. - */ +// +// Updates the current input state. Note that this also processes SDL_QUIT messages. +// void Input::Update() { SDL_Event e; @@ -215,10 +215,10 @@ void Input::ResetAction(Action a) } -/* - * Starts reading keyboard data into a buffer. - * max -> Maximum number of characters to read. - */ +// +// Starts reading keyboard data into a buffer. +// max -> Maximum number of characters to read. +// void Input::OpenCharBuffer(int max) { assert(!textinput); @@ -229,9 +229,9 @@ void Input::OpenCharBuffer(int max) textinput = true; } -/* - * Closes the character buffer and returns to normal key mode. - */ +// +// Closes the character buffer and returns to normal key mode. +// void Input::CloseCharBuffer() { assert(textinput); @@ -240,9 +240,9 @@ void Input::CloseCharBuffer() } -/* - * Returns a pointer to the data read in text input mode. - */ +// +// Returns a pointer to the data read in text input mode. +// const char *Input::GetInput() const { return text.c_str(); diff --git a/src/Input.hpp b/src/Input.hpp index e0c549a..dafb1ec 100644 --- a/src/Input.hpp +++ b/src/Input.hpp @@ -1,30 +1,30 @@ -/* - * Input.hpp -- Definition of input manager class. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Input.hpp -- Definition of input manager class. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_INPUT_HPP #define INC_INPUT_HPP #include "Platform.hpp" -/* - * A singleton class to manage SDL input. - */ +// +// A singleton class to manage SDL input. +// class Input { public: // Possible inputs diff --git a/src/Key.cpp b/src/Key.cpp index 161a78d..452c39e 100644 --- a/src/Key.cpp +++ b/src/Key.cpp @@ -1,19 +1,19 @@ -/* Key.cpp -- A key the player has to collect. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Key.cpp -- A key the player has to collect. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Key.hpp" #include "OpenGL.hpp" diff --git a/src/Key.hpp b/src/Key.hpp index e1cf767..12d37e0 100644 --- a/src/Key.hpp +++ b/src/Key.hpp @@ -1,19 +1,19 @@ -/* Key.hpp -- A key the player has to collect. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Key.hpp -- A key the player has to collect. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_KEY_HPP #define INC_KEY_HPP diff --git a/src/LandingPad.cpp b/src/LandingPad.cpp index a557c50..36dcf37 100644 --- a/src/LandingPad.cpp +++ b/src/LandingPad.cpp @@ -1,19 +1,19 @@ -/* LandingPad.cpp -- Where the player can land. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// LandingPad.cpp -- Where the player can land. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "LandingPad.hpp" #include "Surface.hpp" @@ -36,10 +36,10 @@ LandingPad::LandingPad(Viewport *v, int index, int length) quad.uTexture = landTexture->GetGLTexture(); } -/* - * Draws the landing pad in the current frame. - * locked -> If true, pads a drawn with the red texture. - */ +// +// Draws the landing pad in the current frame. +// locked -> If true, pads a drawn with the red texture. +// void LandingPad::Draw(bool locked) { quad.uTexture = (locked ? noLandTexture : landTexture)->GetGLTexture(); diff --git a/src/LandingPad.hpp b/src/LandingPad.hpp index 0a5cddc..c8b99a4 100644 --- a/src/LandingPad.hpp +++ b/src/LandingPad.hpp @@ -1,19 +1,19 @@ -/* LandingPad.hpp -- Where the player can land. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// LandingPad.hpp -- Where the player can land. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_LANDINGPAD_HPP #define INC_LANDINGPAD_HPP diff --git a/src/LoadOnce.hpp b/src/LoadOnce.hpp index eef9c96..2b41df0 100644 --- a/src/LoadOnce.hpp +++ b/src/LoadOnce.hpp @@ -1,34 +1,34 @@ -/* LoadOnce.hpp -- Macros for static initialisation. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// LoadOnce.hpp -- Macros for static initialisation. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_LOADONCE_HPP #define INC_LOADONCE_HPP -/* - * The global variable _forceReload can be used to force all images - * to reload. This works around an SDL bug (?) on Windows where all - * texture information is lost after the resolution is changed. - * - * This is really a bit of a hack, but quite cool, eh? The variable - * _forceReload gets incremented each time we have to reload the - * images, and the static variable _hasLoaded in each constructor - * stores the value of _forceReload the last time the images were - * loaded -- we reload if the values differ. - */ +// +// The global variable _forceReload can be used to force all images +// to reload. This works around an SDL bug (?) on Windows where all +// texture information is lost after the resolution is changed. +// +// This is really a bit of a hack, but quite cool, eh? The variable +// _forceReload gets incremented each time we have to reload the +// images, and the static variable _hasLoaded in each constructor +// stores the value of _forceReload the last time the images were +// loaded -- we reload if the values differ. +// extern int _forceReload; diff --git a/src/Main.cpp b/src/Main.cpp index bf5c2b6..80ffbe3 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -1,21 +1,21 @@ -/* - * Main.cpp - Program entry point. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Main.cpp - Program entry point. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "Game.hpp" #include "Menu.hpp" @@ -47,10 +47,10 @@ static void DestroyScreens() // See LoadOnce.hpp int _forceReload = 1; -/* - * Recreate all the screens. After a resolution switch for - * example. - */ +// +// Recreate all the screens. After a resolution switch for +// example. +// void RecreateScreens() { DestroyScreens(); @@ -68,9 +68,9 @@ void RecreateScreens() sm.AddScreen("OPTIONS", options); } -/* - * Entry point. - */ +// +// Entry point. +// int main(int argc, char **argv) { int width, height, depth; @@ -135,9 +135,9 @@ int main(int argc, char **argv) return 0; } -/* - * Find a filename in the installation tree. - */ +// +// Find a filename in the installation tree. +// const char *LocateResource(const char *file) { #ifdef MACOSX diff --git a/src/Menu.cpp b/src/Menu.cpp index b881157..5af4531 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -1,21 +1,21 @@ -/* - * Menu.cpp -- Implementation of main menu screen. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Menu.cpp -- Implementation of main menu screen. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "Menu.hpp" #include "Input.hpp" @@ -208,9 +208,9 @@ void MainMenu::MoveStars() stars.push_back(MenuStar()); } -/* - * This is also used by the options screen. - */ +// +// This is also used by the options screen. +// void MainMenu::DisplayStars() { for (StarListIt it = stars.begin(); it != stars.end(); ++it) diff --git a/src/Menu.hpp b/src/Menu.hpp index 5eecc20..a55a18e 100644 --- a/src/Menu.hpp +++ b/src/Menu.hpp @@ -1,21 +1,21 @@ -/* - * Menu.hpp -- Defintition of main menu screen. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Menu.hpp -- Defintition of main menu screen. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_MENU_HPP #define INC_MENU_HPP diff --git a/src/Mine.cpp b/src/Mine.cpp index eeaa27e..6cf20b0 100644 --- a/src/Mine.cpp +++ b/src/Mine.cpp @@ -1,19 +1,19 @@ -/* Mine.cpp -- Floating space mine things. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Mine.cpp -- Floating space mine things. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Mine.hpp" #include "OpenGL.hpp" diff --git a/src/Mine.hpp b/src/Mine.hpp index 4b2eb9b..b490141 100644 --- a/src/Mine.hpp +++ b/src/Mine.hpp @@ -1,19 +1,19 @@ -/* Mine.hpp -- Floating space mine things. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Mine.hpp -- Floating space mine things. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_MINE_HPP #define INC_MINE_HPP diff --git a/src/Missile.cpp b/src/Missile.cpp index 12a9fd3..27849bd 100644 --- a/src/Missile.cpp +++ b/src/Missile.cpp @@ -1,19 +1,20 @@ -/* Missile.cpp -- Missiles on asteroids, etc. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// +// Missile.cpp -- Missiles on asteroids, etc. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Missile.hpp" #include "LoadOnce.hpp" diff --git a/src/Missile.hpp b/src/Missile.hpp index 8ad8e4a..c277f78 100644 --- a/src/Missile.hpp +++ b/src/Missile.hpp @@ -1,19 +1,20 @@ -/* Missile.hpp -- Missiles on asteroids, etc. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// +// Missile.hpp -- Missiles on asteroids, etc. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_MISSILE_HPP #define INC_MISSILE_HPP diff --git a/src/ObjectGrid.cpp b/src/ObjectGrid.cpp index 79c9596..1efd0ab 100644 --- a/src/ObjectGrid.cpp +++ b/src/ObjectGrid.cpp @@ -1,19 +1,19 @@ -/* ObjectGrid.cpp -- Grid where static objects may be placed. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// ObjectGrid.cpp -- Grid where static objects may be placed. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "ObjectGrid.hpp" @@ -30,11 +30,11 @@ ObjectGrid::~ObjectGrid() delete[] grid; } -/* - * Allocates a free space in the object grid. - * x, y -> Output x, y, co-ordinates. - * Returns falce if area could not be allocated. - */ +// +// Allocates a free space in the object grid. +// x, y -> Output x, y, co-ordinates. +// Returns falce if area could not be allocated. +// bool ObjectGrid::AllocFreeSpace(int &x, int &y) { int timeout = 10000; @@ -53,12 +53,12 @@ bool ObjectGrid::AllocFreeSpace(int &x, int &y) return true; } -/* - * Allocates a free space in the object grid. - * x, y -> Output x, y co-ordinates. - * width, height -> Size of desired space. - * Returns false if area could not be allocated. - */ +// +// Allocates a free space in the object grid. +// x, y -> Output x, y co-ordinates. +// width, height -> Size of desired space. +// Returns false if area could not be allocated. +// bool ObjectGrid::AllocFreeSpace(int &x, int &y, int width, int height) { bool isOk; @@ -91,17 +91,17 @@ bool ObjectGrid::AllocFreeSpace(int &x, int &y, int width, int height) return true; } -/* - * Marks the square at (x, y) as no longer in use. - */ +// +// Marks the square at (x, y) as no longer in use. +// void ObjectGrid::UnlockSpace(int x, int y) { grid[x + (y * width)] = false; } -/* - * Creates a new blank object grid. - */ +// +// Creates a new blank object grid. +// void ObjectGrid::Reset(int width, int height) { assert(width > 0); @@ -118,9 +118,9 @@ void ObjectGrid::Reset(int width, int height) memset(grid, 0, width * height * sizeof(bool)); } -/* - * Returns true if there is an object at the specified co-ordinates. - */ +// +// Returns true if there is an object at the specified co-ordinates. +// bool ObjectGrid::IsFilled(int x, int y) const { return grid[x + (width * y)]; diff --git a/src/ObjectGrid.hpp b/src/ObjectGrid.hpp index 20d6b06..be1f29c 100644 --- a/src/ObjectGrid.hpp +++ b/src/ObjectGrid.hpp @@ -1,19 +1,19 @@ -/* ObjectGrid.hpp -- Grid where static objects may be placed. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// ObjectGrid.hpp -- Grid where static objects may be placed. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_OBJECTGRID_HPP #define INC_OBJECTGRID_HPP diff --git a/src/OpenGL.cpp b/src/OpenGL.cpp index 6e2f3d3..0146366 100644 --- a/src/OpenGL.cpp +++ b/src/OpenGL.cpp @@ -1,21 +1,21 @@ -/* - * OpenGL.cpp - Implementation of OpenGL wrapper class. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// OpenGL.cpp - Implementation of OpenGL wrapper class. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "OpenGL.hpp" #include "Input.hpp" @@ -31,9 +31,9 @@ OpenGL::OpenGL() srand((unsigned)time(NULL)); } -/* - * Returns the singleton instance of OpenGL. - */ +// +// Returns the singleton instance of OpenGL. +// OpenGL &OpenGL::GetInstance() { static OpenGL opengl; @@ -41,10 +41,10 @@ OpenGL &OpenGL::GetInstance() return opengl; } -/* - * Called before the game is started. Creates a new window and performs ay - * necessary initialisation. - */ +// +// Called before the game is started. Creates a new window and performs ay +// necessary initialisation. +// void OpenGL::Init(int width, int height, int depth, bool fullscreen) { // Start SDL @@ -89,9 +89,9 @@ bool OpenGL::SetVideoMode(bool fullscreen, int width, int height) return resized; } -/* - * Return the last SDL error as a C++ string. - */ +// +// Return the last SDL error as a C++ string. +// string OpenGL::SDLErrorString() { return string(SDL_GetError()); @@ -328,10 +328,10 @@ GLvoid OpenGL::ResizeGLScene(GLsizei width, GLsizei height) } -/* - * Displays a message to the user. On Windows this will appear as a message - * box. On other platforms the message will be printed to stdout. - */ +// +// Displays a message to the user. On Windows this will appear as a message +// box. On other platforms the message will be printed to stdout. +// void OpenGL::MsgBox(const char *text, const char *title) { #ifdef WIN32 @@ -342,11 +342,11 @@ void OpenGL::MsgBox(const char *text, const char *title) } -/* - * Displays an error message to the user. On Windows this will appear - * as a popup error message. On other platforms the message will be - * printed to stderr. - */ +// +// Displays an error message to the user. On Windows this will appear +// as a popup error message. On other platforms the message will be +// printed to stderr. +// void OpenGL::ErrorMsg(const char *text, const char *title) { #ifdef WIN32 @@ -361,17 +361,17 @@ int OpenGL::GetFPS() return fps_rate; } -/* - * Stops processing after the current frame. - */ +// +// Stops processing after the current frame. +// void OpenGL::Stop() { running = false; } -/* - * Generate, but do not display the next frame. - */ +// +// Generate, but do not display the next frame. +// void OpenGL::SkipDisplay() { dodisplay = false; diff --git a/src/OpenGL.hpp b/src/OpenGL.hpp index b6e8fda..b865918 100644 --- a/src/OpenGL.hpp +++ b/src/OpenGL.hpp @@ -1,21 +1,21 @@ -/* - * OpenGL.hpp - Definition of OpenGL wrapper class. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// OpenGL.hpp - Definition of OpenGL wrapper class. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_OPENGL_HPP #define INC_OPENGL_HPP @@ -50,9 +50,9 @@ public: }; -/* - * A polygon with four points and a texture. - */ +// +// A polygon with four points and a texture. +// class TextureQuad : public Renderable { public: TextureQuad(int qx=0, int qy=0, int width=0, int height=0, GLuint tex=0, @@ -63,9 +63,9 @@ public: }; -/* - * A generic polygon. - */ +// +// A generic polygon. +// struct Poly { Poly() : pointcount(0), xpos(0), ypos(0), uTexture(0), texX(0), texwidth(1.0f) @@ -78,9 +78,9 @@ struct Poly { float texX, texwidth; }; -/* - * A wrapper around common 2D OpenGL functions. - */ +// +// A wrapper around common 2D OpenGL functions. +// class OpenGL { public: static OpenGL &GetInstance(); diff --git a/src/Options.cpp b/src/Options.cpp index aa3cef6..d67eaf1 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -1,19 +1,19 @@ -/* Options.cpp -- The options screen. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Options.cpp -- The options screen. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Options.hpp" #include "Menu.hpp" diff --git a/src/Options.hpp b/src/Options.hpp index 5f8bc23..ca2bab8 100644 --- a/src/Options.hpp +++ b/src/Options.hpp @@ -1,19 +1,19 @@ -/* Options.hpp -- The options screen. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Options.hpp -- The options screen. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_OPTIONS_HPP #define INC_OPTIONS_HPP diff --git a/src/Platform.hpp b/src/Platform.hpp index d49537b..1de39e1 100644 --- a/src/Platform.hpp +++ b/src/Platform.hpp @@ -1,21 +1,21 @@ -/* - * Platform.hpp - Platform specific includes. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Platform.hpp - Platform specific includes. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_PLATFORM_HPP #define INC_PLATFORM_HPP @@ -51,7 +51,7 @@ using namespace std; #define DATADIR "." #endif -/* Windows specific constants and includes */ +// Windows specific constants and includes */ #ifdef WIN32 #define WIN32_LEAN_AND_MEAN @@ -68,7 +68,7 @@ using namespace std; #define PATH_MAX 256 -/* Don't have these on Windows for some reason */ +// Don't have these on Windows for some reason */ #ifndef GL_BGRA #define GL_BGRA 0 #endif @@ -76,7 +76,7 @@ using namespace std; #define GL_BGR 0 #endif -/* Define safe snprintf, etc. for MSCV8 */ +// Define safe snprintf, etc. for MSCV8 */ #if (_MSC_VER >= 1400) #define USE_FOPEN_S @@ -111,7 +111,7 @@ using namespace std; #endif /* #ifdef WIN32 */ -/* Mac OS X specifics */ +// Mac OS X specifics */ #ifdef MACOSX #include @@ -123,7 +123,7 @@ using namespace std; #endif /* #ifdef MACOSX */ -/* Linux specifics */ +// Linux specifics */ #ifdef LINUX #include @@ -141,9 +141,9 @@ using namespace std; #ifdef LANDER_BIG_ENDIAN -/* - * All data files are currently stored in little endian format. - */ +// +// All data files are currently stored in little endian format. +// #define Flip16(n) (((n >> 8) & 0x00ff) | \ ((n << 8) & 0xff00)) diff --git a/src/ScreenManager.cpp b/src/ScreenManager.cpp index 51121d2..82a742b 100644 --- a/src/ScreenManager.cpp +++ b/src/ScreenManager.cpp @@ -1,21 +1,21 @@ -/* - * Screen.cpp - Implementation of the ScreenManager class. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Screen.cpp - Implementation of the ScreenManager class. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #include "ScreenManager.hpp" #include "OpenGL.hpp" diff --git a/src/ScreenManager.hpp b/src/ScreenManager.hpp index de48733..0c08388 100644 --- a/src/ScreenManager.hpp +++ b/src/ScreenManager.hpp @@ -1,30 +1,30 @@ -/* - * Screens.hpp - Definition of abstract class to represent game screens. - * Copyright (C) 2006 Nick Gasson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +// +// Screens.hpp - Definition of abstract class to represent game screens. +// Copyright (C) 2006 Nick Gasson +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// #ifndef INC_SCREENS_HPP #define INC_SCREENS_HPP #include "Platform.hpp" -/* - * A screen within the game that can be displayed. - */ +// +// A screen within the game that can be displayed. +// class Screen { public: virtual ~Screen() { } @@ -34,9 +34,9 @@ public: }; -/* - * Manages the transition between the various screens in the game. - */ +// +// Manages the transition between the various screens in the game. +// class ScreenManager { public: static ScreenManager &GetInstance(); diff --git a/src/Ship.cpp b/src/Ship.cpp index b27601a..3a3d9eb 100644 --- a/src/Ship.cpp +++ b/src/Ship.cpp @@ -1,26 +1,26 @@ -/* Ship.cpp -- The player's ship. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Ship.cpp -- The player's ship. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Ship.hpp" #include "OpenGL.hpp" -/* - * Defines a simplified polygon representing the ship. - */ +// +// Defines a simplified polygon representing the ship. +// const Point Ship::hotspots[] = { {2, 31}, {2, 26}, {4, 14}, {16, 0}, {29, 14}, {31, 26}, {31, 31}, {17, 31} }; @@ -146,9 +146,9 @@ void Ship::CentreInViewport() viewport->SetYAdjust(centrey - (opengl.GetHeight()/2)); } -/* - * Reset at the start of a new level. - */ +// +// Reset at the start of a new level. +// void Ship::Reset() { exhaust.Reset(); @@ -176,9 +176,9 @@ void Ship::RotatePoints(const Point *pPoints, Point *pDest, int nCount, } } -/* - * Check for collision between the ship and a polygon. - */ +// +// Check for collision between the ship and a polygon. +// bool Ship::HotSpotCollision(LineSegment &l, double dx, double dy) const { for (int i = 0; i < NUM_HOTSPOTS; i++) { @@ -189,9 +189,9 @@ bool Ship::HotSpotCollision(LineSegment &l, double dx, double dy) const return false; } -/* - * Checks for collision between the ship and a box. - */ +// +// Checks for collision between the ship and a box. +// bool Ship::BoxCollision(int x, int y, int w, int h) const { if (!viewport->PointInScreen(x, y, w, h)) @@ -206,9 +206,9 @@ bool Ship::BoxCollision(int x, int y, int w, int h) const || HotSpotCollision(l3) || HotSpotCollision(l4); } -/* - * Checks for collision between the ship and a line segment. - */ +// +// Checks for collision between the ship and a line segment. +// bool Ship::CheckCollision(LineSegment &l, double dx, double dy) const { double xpos = this->xpos + dx; diff --git a/src/Ship.hpp b/src/Ship.hpp index 6eebed7..37e60b3 100644 --- a/src/Ship.hpp +++ b/src/Ship.hpp @@ -1,19 +1,19 @@ -/* Ship.hpp -- The player's ship. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Ship.hpp -- The player's ship. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_SHIP_HPP #define INC_SHIP_HPP diff --git a/src/SoundEffect.cpp b/src/SoundEffect.cpp index 5aff684..c621cf1 100644 --- a/src/SoundEffect.cpp +++ b/src/SoundEffect.cpp @@ -1,19 +1,19 @@ -/* SoundEffect.cpp -- SDL Mixer wrapper. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// SoundEffect.cpp -- SDL Mixer wrapper. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "SoundEffect.hpp" #include "ConfigFile.hpp" diff --git a/src/SoundEffect.hpp b/src/SoundEffect.hpp index bcf6b7c..01335e4 100644 --- a/src/SoundEffect.hpp +++ b/src/SoundEffect.hpp @@ -1,19 +1,19 @@ -/* SoundEffect.hpp -- SDL Mixer wrapper. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// SoundEffect.hpp -- SDL Mixer wrapper. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_SOUNDEFFECT_HPP #define INC_SOUNDEFFECT_HPP diff --git a/src/Surface.cpp b/src/Surface.cpp index 70fa152..8b8e0a9 100644 --- a/src/Surface.cpp +++ b/src/Surface.cpp @@ -1,19 +1,19 @@ -/* Surface.cpp -- Randomly generated planet surface. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Surface.cpp -- Randomly generated planet surface. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Surface.hpp" #include "LoadOnce.hpp" @@ -145,10 +145,10 @@ void Surface::Display() } } -/* - * Returns true if ship has collided with surface. Sets padIndex to the index - * of pad if the player hit it, -1 otherwise. - */ +// +// Returns true if ship has collided with surface. Sets padIndex to the index +// of pad if the player hit it, -1 otherwise. +// bool Surface::CheckCollisions(Ship &ship, LandingPadList &pads, int *padIndex) { LineSegment l; diff --git a/src/Surface.hpp b/src/Surface.hpp index 114fe67..bcbb90d 100644 --- a/src/Surface.hpp +++ b/src/Surface.hpp @@ -1,19 +1,19 @@ -/* Surface.hpp -- Randomly generated planet surface. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Surface.hpp -- Randomly generated planet surface. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_SURFACE_HPP #define INC_SURFACE_HPP diff --git a/src/Texture.cpp b/src/Texture.cpp index f9c71a6..0aad3f2 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -1,19 +1,19 @@ -/* Texture.cpp -- Wrapper for OpenGL textures. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Texture.cpp -- Wrapper for OpenGL textures. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Texture.hpp" #include "OpenGL.hpp" diff --git a/src/Texture.hpp b/src/Texture.hpp index eddbd8e..8bc09f0 100644 --- a/src/Texture.hpp +++ b/src/Texture.hpp @@ -1,19 +1,19 @@ -/* Texture.hpp -- Wrapper for OpenGL textures. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Texture.hpp -- Wrapper for OpenGL textures. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_TEXTURE_HPP #define INC_TEXTURE_HPP diff --git a/src/Viewport.cpp b/src/Viewport.cpp index 9a0dc35..f665daa 100644 --- a/src/Viewport.cpp +++ b/src/Viewport.cpp @@ -1,19 +1,19 @@ -/* Viewport.cpp -- The area of the screen the player can see. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Viewport.cpp -- The area of the screen the player can see. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #include "Viewport.hpp" #include "OpenGL.hpp" @@ -44,22 +44,22 @@ void Viewport::SetYAdjust(int y) adjustY = levelHeight - screenHeight; } -/* - * Works out whether or not a point is visible. - * xpos, ypos -> Absolute co-ordinates. - * width, height -> Size of object. - */ +// +// Works out whether or not a point is visible. +// xpos, ypos -> Absolute co-ordinates. +// width, height -> Size of object. +// bool Viewport::PointInScreen(int xpos, int ypos, int width, int height) { return ((xpos + width > adjustX && xpos - adjustX < screenWidth) && (ypos + height > adjustY && ypos - adjustY < screenHeight)); } -/* - * Works out whether or not an object is visible. - * xpos, ypos -> Grid co-ordinates. - * width, height -> Size of object in grid squares. - */ +// +// Works out whether or not an object is visible. +// xpos, ypos -> Grid co-ordinates. +// width, height -> Size of object in grid squares. +// bool Viewport::ObjectInScreen(int xpos, int ypos, int width, int height) { return PointInScreen(xpos * ObjectGrid::OBJ_GRID_SIZE, diff --git a/src/Viewport.hpp b/src/Viewport.hpp index 54818a2..bd5da00 100644 --- a/src/Viewport.hpp +++ b/src/Viewport.hpp @@ -1,19 +1,19 @@ -/* Viewport.hpp -- The area of the screen the player can see. - * Copyright (C) 2008 Nick Gasson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Viewport.hpp -- The area of the screen the player can see. +// Copyright (C) 2008 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// #ifndef INC_VIEWPORT_HPP #define INC_VIEWPORT_HPP -- 2.39.2