X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftype.cpp;h=9b4438560576bbbb684f554a298935a65232bdd1;hb=3369ed08e4b7126af560dc5f9c3442fc76b43ab4;hp=3b0e1a453779af883d3d29ee1b5ea5f4bc09a95c;hpb=82a761da8025c09c9eee2cf6753cc70c039046c0;p=supertux.git diff --git a/src/type.cpp b/src/type.cpp index 3b0e1a453..9b4438560 100644 --- a/src/type.cpp +++ b/src/type.cpp @@ -1,21 +1,29 @@ +// $Id$ +// +// SuperTux +// Copyright (C) 2004 Tobias Glaesser // -// C Implementation: type -// -// Description: -// -// -// Author: Tobias Glaesser , (C) 2004 -// -// Copyright: See COPYING file that comes with this distribution -// +// 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. #include "SDL_image.h" #include "string.h" #include "stdlib.h" #include "setup.h" #include "globals.h" -#include "screen.h" +#include "screen/screen.h" #include "defines.h" #include "type.h" #include "scene.h" @@ -38,7 +46,7 @@ char* string_list_active(string_list_type* pstring_list) return ""; } -void string_list_add_item(string_list_type* pstring_list, char* str) +void string_list_add_item(string_list_type* pstring_list,const char* str) { char *pnew_string; pnew_string = (char*) malloc(sizeof(char)*(strlen(str)+1)); @@ -58,7 +66,7 @@ void string_list_copy(string_list_type* pstring_list, string_list_type pstring_l string_list_add_item(pstring_list,pstring_list_orig.item[i]); } -int string_list_find(string_list_type* pstring_list, char* str) +int string_list_find(string_list_type* pstring_list,const char* str) { int i; for(i = 0; i < pstring_list->num_items; ++i) @@ -74,7 +82,6 @@ int string_list_find(string_list_type* pstring_list, char* str) void string_list_sort(string_list_type* pstring_list) { int i,j,y; - short int sorter[pstring_list->num_items]; for(j = 0; j < pstring_list->num_items; ++j) for(i = 0; i < pstring_list->num_items-1; ++i)