diff --git a/source/code/CppSdl/CppSdlException.hpp b/source/code/CppSdl/CppSdlException.hpp index 8460466..acc7715 100644 --- a/source/code/CppSdl/CppSdlException.hpp +++ b/source/code/CppSdl/CppSdlException.hpp @@ -22,6 +22,12 @@ namespace CppSdl { class CppSdlException : std::exception{ public: //CppSdlException(); + /** + * Constructor for making a fully CppSdl compliant expection + * @param subsystem Can be: OTHER,IMAGE,TILE,SPRITE,LAYER,SCREEN + * @param errorNumber 1=Data error, 2=Invalid, 3=Missingfile, 4=null pointer + * @param msg Human readable error message. + */ CppSdlException(Subsystem subsystem, long errorNumber, std::string msg); CppSdlException(const CppSdlException& orig); virtual ~CppSdlException() throw(); diff --git a/source/code/MenuSystem.cc b/source/code/MenuSystem.cc index b3a182a..9173577 100644 --- a/source/code/MenuSystem.cc +++ b/source/code/MenuSystem.cc @@ -16,12 +16,6 @@ Copyright (C) 2008 Poul Sander along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Poul Sander - R�vehjvej 36, V. 1111 - 2800 Kgs. Lyngby - DENMARK - blockattack@poulsander.com - http://blockattack.sf.net */ #include diff --git a/source/code/MenuSystem.h b/source/code/MenuSystem.h index 1af0fd0..7b922e8 100644 --- a/source/code/MenuSystem.h +++ b/source/code/MenuSystem.h @@ -16,20 +16,10 @@ Copyright (C) 2008 Poul Sander along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Poul Sander - R�vehjvej 36, V. 1111 - 2800 Kgs. Lyngby - DENMARK blockattack@poulsander.com http://blockattack.sf.net */ -// -// File: MenuSystem.h -// Author: poul -// -// Created on 28. september 2008, 17:06 -// #ifndef _MENUSYSTEM_H #define _MENUSYSTEM_H diff --git a/source/code/main.cpp b/source/code/main.cpp index 43659fd..8e6345a 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -16,12 +16,6 @@ Copyright (C) 2008 Poul Sander along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Poul Sander - R�vehjvej 36, V. 1111 - 2800 Kgs. Lyngby - DENMARK - blockattack@poulsander.com - http://blockattack.sf.net */ #include "common.h" @@ -275,7 +269,7 @@ long NFont_OpenFont(NFont *target, string path,int ptsize, SDL_Color color, int m_data = 0; PHYSFS_close(myfile); cout << "Error. Curropt data file!" << endl; - return NULL; + return -3; } PHYSFS_close(myfile); @@ -1638,7 +1632,7 @@ void writeScreenShot() } //Function to return the name of a key, to be displayed... -string getKeyName(SDLKey key) +static string getKeyName(SDLKey key) { string keyname(SDL_GetKeyName(key)); return keyname; diff --git a/source/code/mainVars.hpp b/source/code/mainVars.hpp index d5da3c8..38b22ce 100644 --- a/source/code/mainVars.hpp +++ b/source/code/mainVars.hpp @@ -16,11 +16,6 @@ Copyright (C) 2007 Poul Sander along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Poul Sander - R�veh�jvej 36, V. 1111 - 2800 Kgs. Lyngby - DENMARK - blockattack@poulsander.com */ //Make sure it is only included once @@ -303,7 +298,7 @@ struct control SDLKey push; }; -static control keySettings[3]; //array to hold the controls (default and two custom) +control keySettings[3]; //array to hold the controls (default and two custom) #define KEYMENU_MAXWITH 4 #define KEYMENU_MAXDEPTH 7 diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp index a0faf2b..899df85 100644 --- a/source/code/menudef.cpp +++ b/source/code/menudef.cpp @@ -1,3 +1,25 @@ +/* +menudef.cpp +Copyright (C) 2011 Poul Sander + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Poul Sander + blockattack@poulsander.com +*/ + #include "global.hpp" #include #include @@ -12,8 +34,47 @@ void PrintHi() cout << "Hi" <