git repos / blockattack-game

commit acc78225

sago007 · 2015-12-29 18:10
acc78225da0a0e47c5dbbd7b8a678516b3269603 patch · browse files
parent b2ff93be12aaeee839c04975e2f3646ce21e09fc

Readded icon

Changed files

M source/code/Makefile before
A source/code/icon.cpp
A source/code/icon.h
A source/code/icon.hpp
M source/code/joypad.cpp before
M source/code/main.cpp before
diff --git a/source/code/Makefile b/source/code/Makefile index 8abfe69..8e3b0fb 100644 --- a/source/code/Makefile +++ b/source/code/Makefile
@@ -51,7 +51,7 @@ endif
BASE_LIBS += -lphysfs
OFILES=main.o highscore.o ReadKeyboard.o joypad.o listFiles.o common.o stats.o Libs/NFont.o Libs/SDL_FontCache.o MenuSystem.o menudef.o \
- puzzlehandler.o stageclearhandler.o ${SAGO_O_FILES}
+ puzzlehandler.o stageclearhandler.o icon.o ${SAGO_O_FILES}
ifeq ($(CROSS),i686-w64-mingw32.static-)
OFILES += winicon.res
diff --git a/source/code/icon.cpp b/source/code/icon.cpp new file mode 100644 index 0000000..38555c8 --- /dev/null +++ b/source/code/icon.cpp
@@ -0,0 +1,44 @@
+/*
+===========================================================================
+blockattack - Block Attack - Rise of the Blocks
+Copyright (C) 2005-2015 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, see http://www.gnu.org/licenses/
+
+Source information and contacts persons can be found at
+http://blockattack.net
+===========================================================================
+*/
+
+#include "icon.hpp"
+#include "icon.h"
+
+void SetSDLIcon(SDL_Window* window)
+{
+ SDL_Surface* surface = SDL_CreateRGBSurfaceFrom(
+ (void *)gimp_image.pixel_data,
+ gimp_image.width,
+ gimp_image.height,
+ gimp_image.bytes_per_pixel * 8,
+ gimp_image.bytes_per_pixel * gimp_image.width,
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF
+#else
+ 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000
+#endif
+ );
+ SDL_SetWindowIcon(window, surface);
+ SDL_FreeSurface(surface);
+
+}
\ No newline at end of file
diff --git a/source/code/icon.h b/source/code/icon.h new file mode 100644 index 0000000..2521773 --- /dev/null +++ b/source/code/icon.h
@@ -0,0 +1,218 @@
+/*
+===========================================================================
+blockattack - Block Attack - Rise of the Blocks
+Copyright (C) 2005-2015 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, see http://www.gnu.org/licenses/
+
+Source information and contacts persons can be found at
+http://blockattack.net
+===========================================================================
+*/
+
+
+
+//This struct is constructed from icon.png using gimps export as C-file.
+const struct {
+ unsigned int width;
+ unsigned int height;
+ unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */
+ unsigned char pixel_data[32 * 32 * 4 + 1];
+} gimp_image = {
+ 32, 32, 4,
+ "\377\377\377\377\264\0""5\377\3773\212\377\377,\177\377\377,\177\377\377"
+ ",\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377"
+ "\377,\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177"
+ "\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377\377"
+ ",\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377\377,\177\377"
+ "\377,\177\377\3773\212\377\264\0""5\377\377\377\377\377\377\377\377\377\264"
+ "\0'\377\377\353\377\377\377\325\377\377\377\325\377\377\377\325\377\377\377"
+ "\325\377\377\377\325\377\377\377\325\377\377\377\325\377\377\377\325\377"
+ "\377\377\325\377\377\377\325\377\377\377\325\377\377\377\325\377\377\377"
+ "\325\377\377\377\325\377\377\377\325\377\377\377\325\377\377\377\325\377"
+ "\377\377\325\377\377\377\325\377\377\377\325\377\377\377\325\377\377\377"
+ "\325\377\377\377\325\377\377\377\325\377\377\377\325\377\377\377\325\377"
+ "\377\377\353\377\377\264\0'\377\377\377\377\377\377\377\377\377\270\0:\377"
+ "\364\0Q\377\255\0v\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0"
+ "q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264"
+ "\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377"
+ "\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\264\0q\377\255\0"
+ "v\377\364\0Q\377\270\0:\377\377\377\377\377\377\377\377\377\277\0""5\377"
+ "\270\0\217\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377"
+ "\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377"
+ "\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377"
+ "\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377"
+ "\0\0\377\377\0\0\377\377\0\0\377\377\270\0\217\377\277\0""5\377\377\377\377"
+ "\377\377\377\377\377\277\0""5\377\277\0\212\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\277"
+ "\0\212\377\277\0""5\377\377\377\377\377\377\377\377\377\277\0""5\377\277"
+ "\0\212\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\277\0\212\377\277\0""5\377\377\377\377"
+ "\377\377\377\377\377\277\0""5\377\277\0\212\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\277"
+ "\0\212\377\277\0""5\377\377\377\377\377\377\377\377\377\277\0""5\377\277"
+ "\0\212\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\277\0\212\377\277\0""5\377\377\377\377"
+ "\377\377\377\377\377\277\0""5\377\277\0\212\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\277"
+ "\0\212\377\277\0""5\377\377\377\377\377\377\377\377\377\277\0""5\377\277"
+ "\0\212\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\277\0\212\377\277\0""5\377\377\377\377"
+ "\377\377\377\377\377\277\0""5\377\277\0\212\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\277"
+ "\0\212\377\277\0""5\377\377\377\377\377\377\377\377\377\277\0""5\377\264"
+ "\0\212\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\377\264\0\212\377\277\0""5\377\377\377\377"
+ "\377\377\377\377\377\264\0""5\377\377;\212\377\3773q\377\3773q\377\3773q"
+ "\377\3773q\377\3773q\377\3773q\377\3773q\377\3773q\377\3773q\377\3773q\377"
+ "\3773q\377\3773q\377\3771{\377\377@\34\377\377=&\377\377=&\377\377=#\377"
+ "\377<<\377\3772x\377\3773q\377\3773q\377\3773q\377\3773q\377\3773q\377\377"
+ "3q\377\3773q\377\377;\212\377\264\0""5\377\377\377\377\377\377\377\377\377"
+ "\264\0'\377\377\325\377\377\377\277\377\377\377\277\377\377\377\277\377\377"
+ "\377\277\377\377\377\277\377\377\377\277\377\377\377\277\377\377\377\277"
+ "\377\377\377\277\377\377\377\277\377\377\377\277\377\377\377\277\377\377"
+ "\377\271\377\377\334\373\0\377\363\377\0\377\361\377\0\377\363\377\0\377"
+ "\341\336J\377\377\274\377\377\377\277\377\377\377\277\377\377\377\277\377"
+ "\377\377\277\377\377\377\277\377\377\377\277\377\377\377\277\377\377\377"
+ "\325\377\377\264\0'\377\377\377\377\377\377\377\377\377\264\0'\377\377\307"
+ "\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377"
+ "\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261"
+ "\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\252\377\377"
+ "\342\354\0\377\377\377\0\377\377\377\0\377\377\377\0\377\342\313J\377\377"
+ "\255\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377"
+ "\377\377\261\377\377\377\261\377\377\377\261\377\377\377\307\377\377\264"
+ "\0'\377\377\377\377\377\377\377\377\377\264\0'\377\377\307\377\377\377\261"
+ "\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377"
+ "\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261"
+ "\377\377\377\261\377\377\377\261\377\377\377\252\377\377\342\354\0\377\377"
+ "\377\0\377\377\377\0\377\377\377\0\377\342\313J\377\377\255\377\377\377\261"
+ "\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377"
+ "\377\261\377\377\377\261\377\377\377\307\377\377\264\0'\377\377\377\377\377"
+ "\377\377\377\377\264\0'\377\377\314\377\377\377\266\377\377\377\266\377\377"
+ "\377\266\377\377\377\271\377\377\377\277\377\377\377\277\377\377\377\277"
+ "\377\377\377\277\377\377\377\277\377\377\377\277\377\377\377\277\377\377"
+ "\377\277\377\377\377\271\377\377\361\353\0\377\377\371\0\377\377\367\0\377"
+ "\377\374\0\377\357\316@\377\377\255\377\377\377\261\377\377\377\261\377\377"
+ "\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261"
+ "\377\377\377\307\377\377\264\0'\377\377\377\377\377\377\377\377\377\311\0"
+ """6\377?\221\213\377Jw\210\377Jw\210\377J{\204\377Jm\225\377J-\315\377J3"
+ "\304\377J3\304\377B3\321\377\2253q\377\2533E\377\2473J\377\2473J\377\276"
+ "\"E\3771\320\204\377=\267z\377=\267z\3775\270t\377x\275\246\377\377\257\377"
+ "\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377"
+ "\261\377\377\377\261\377\377\377\261\377\377\377\307\377\377\264\0'\377\377"
+ "\377\377\377\377\377\377\377\324\0A\377\0\241+\377\0\357\0\377\0\346\0\377"
+ "\0\370\0\377\0@g\377\0\0\367\377\0\0\377\377\0\0\377\377\0\0\375\377V\0("
+ "\377\377\0\0\377\377\0\0\377\377\0\0\377\307\0\0\377\0\345\356\377\0\377"
+ "\377\377\0\377\377\377\0\377\377\377D\254\311\377\377\260\377\377\377\261"
+ "\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377"
+ "\377\261\377\377\377\261\377\377\377\307\377\377\264\0'\377\377\377\377\377"
+ "\377\377\377\377\324\0A\377\0\2406\377\0\344\0\377\0\334\0\377\0\355\0\377"
+ "\0Dm\377\0\0\364\377\0\0\377\377\0\0\377\377\0\0\372\377]\0""0\377\377\0"
+ "\0\377\377\0\0\377\377\0\0\377\307\0\0\377\0\344\344\377\0\377\377\377\0"
+ "\377\377\377\0\377\377\377J\255\304\377\377\260\377\377\377\261\377\377\377"
+ "\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377"
+ "\377\377\261\377\377\377\307\377\377\264\0'\377\377\377\377\377\377\377\377"
+ "\377\324\0A\377\0\2424\377\0\355\0\377\0\344\0\377\0\366\0\377\0Fl\377\0"
+ "\0\370\377\0\0\377\377\0\0\377\377\0\0\376\377]\0""0\377\377\0\0\377\377"
+ "\0\0\377\377\0\0\377\312\0\0\377\0\346\346\377\0\377\377\377\0\377\377\377"
+ "\0\377\377\377J\255\304\377\377\260\377\377\377\261\377\377\377\261\377\377"
+ "\377\261\377\377\377\261\377\377\377\261\377\377\377\261\377\377\377\261"
+ "\377\377\377\307\377\377\264\0'\377\377\377\377\377\377\377\377\377\324\0"
+ "?\377\0\2307\377\0\242!\377\0\237#\377\0\252\32\377\0?y\377\0\0\336\377\0"
+ "\0\337\377\0\0\337\377\0\0\346\377r\0)\377\321\0\0\377\307\0\0\377\312\0"
+ "\0\377\304\0\0\377\0\324\324\377\0\314\314\377\0\312\312\377\0\315\312\377"
+ "K\261\324\377\377\252\377\377\377\252\377\377\377\252\377\377\377\252\377"
+ "\377\377\256\377\377\377\255\377\377\377\255\377\377\377\255\377\377\377"
+ "\305\377\377\264\0'\377\377\377\377\377\377\377\377\377\324\0/\377\0\0\335"
+ "\377\0\0\340\377\0\0\336\377\0\0\345\377\0\22\243\377\0\227)\377\0\242!\377"
+ "\0\241\"\377\0\221!\377\0\263\242\377\0\352\354\377\0\344\344\377\0\346\346"
+ "\377\0\324\324\377\0\274\274\377\0\314\314\377\0\312\312\377\0\313\325\377"
+ "=\301u\377\361\353\0\377\342\354\0\377\342\354\0\377\361\353\0\377(\302o"
+ "\377\0\317\317\377\0\316\304\377\0\320\306\377\0\326\305\377\324\0/\377\377"
+ "\377\377\377\377\377\377\377\324\0-\377\0\0\336\377\0\0\377\377\0\0\377\377"
+ "\0\0\377\377\0\31\225\377\0\315\7\377\0\351\0\377\0\351\0\377\0\275\10\377"
+ "\0\223\226\377\0\377\377\377\0\377\377\377\0\377\377\377\0\314\314\377\0"
+ "\314\314\377\0\377\377\377\0\377\377\377\0\377\377\377<\270y\377\377\371"
+ "\0\377\377\377\0\377\377\377\0\377\377\371\0\377<\270y\377\0\377\377\377"
+ "\0\377\377\377\0\377\377\377\0\346\336\377\324\0-\377\377\377\377\377\377"
+ "\377\377\377\324\0-\377\0\0\335\377\0\0\377\377\0\0\377\377\0\0\377\377\0"
+ "\30\226\377\0\307\14\377\0\340\0\377\0\340\0\377\0\267\14\377\0\223\226\377"
+ "\0\377\377\377\0\377\377\377\0\377\377\377\0\312\312\377\0\312\312\377\0"
+ "\377\377\377\0\377\377\377\0\377\377\377<\270y\377\377\367\0\377\377\377"
+ "\0\377\377\377\0\377\377\367\0\377<\270y\377\0\377\377\377\0\377\377\377"
+ "\0\377\377\377\0\344\335\377\324\0-\377\377\377\377\377\377\377\377\377\324"
+ "\0-\377\0\0\337\377\0\0\377\377\0\0\377\377\0\0\377\377\0\30\226\377\0\317"
+ "\6\377\0\355\0\377\0\355\0\377\0\300\6\377\0\222\233\377\0\377\377\377\0"
+ "\377\377\377\0\377\377\377\0\313\324\377\0\324\324\377\0\377\377\377\0\377"
+ "\377\377\0\377\377\3779\300\177\377\377\377\0\377\377\377\0\377\377\377\0"
+ "\377\377\377\0\3777\300x\377\0\377\377\377\0\377\377\377\0\377\377\377\0"
+ "\356\336\377\324\0-\377\377\377\377\377\377\377\377\377\324\0""0\377\0\0"
+ "\304\377\0\0\252\377\0\0\252\377\0\0\257\377\0!\230\377\0nJ\377\0]Y\377\0"
+ "]Y\377\0]P\377-\254r\377@\272|\377=\267z\377=\267z\377B\310\200\377%v\200"
+ "\377#zz\377#zz\377\34y\177\377Y\212\\\377\313\232\0\377\272\227\0\377\272"
+ "\227\0\377\311\232\0\377h\212\212\3778s\277\377=t\267\377=t\267\3773\215"
+ "\320\377\313\0.\377\377\377\377\377\377\377\377\377\324\0.\377\0\0\327\377"
+ "\0\0\356\377\0\0\352\377\0\0\365\377\0\33\226\377\0\261\34\377\0\300\23\377"
+ "\0\300\23\377\0\236+\377\245\266\17\377\377\377\0\377\377\367\0\377\377\371"
+ "\0\377\373\377\0\377\256\0\0\377\362\0\0\377\354\0\0\377\365\0\0\377\215"
+ "\0\0\377\304\0\0\377\335\0\0\377\335\0\0\377\276\0\0\377\311\0\233\377\377"
+ ")\377\377\377#\367\377\377'\371\377\374\0\372\377\267\0*\377\377\377\377"
+ "\377\377\377\377\377\324\0-\377\0\0\335\377\0\0\377\377\0\0\377\377\0\0\377"
+ "\377\0\30\226\377\0\311\12\377\0\344\0\377\0\344\0\377\0\267\32\377\227\260"
+ "\34\377\377\377\0\377\377\377\0\377\377\377\0\377\353\377\0\377\253\0\0\377"
+ "\377\0\0\377\377\0\0\377\377\0\0\377\200\0\0\377\343\0\0\377\377\0\0\377"
+ "\377\0\0\377\335\0\0\377\272\0\227\377\377S\377\377\377J\377\377\377P\377"
+ "\377\355\25\373\377\267\0*\377\377\377\377\377\377\377\377\377\324\0-\377"
+ "\0\0\335\377\0\0\377\377\0\0\377\377\0\0\377\377\0\30\226\377\0\311\12\377"
+ "\0\344\0\377\0\344\0\377\0\267\32\377\227\260\34\377\377\377\0\377\377\377"
+ "\0\377\377\377\0\377\353\377\0\377\253\0\0\377\377\0\0\377\377\0\0\377\377"
+ "\0\0\377\200\0\0\377\343\0\0\377\377\0\0\377\377\0\0\377\335\0\0\377\272"
+ "\0\227\377\377T\377\377\377K\377\377\377Q\377\377\355\26\373\377\267\0*\377"
+ "\377\377\377\377\377\377\377\377\324\0.\377\0\0\337\377\0\0\366\377\0\0\362"
+ "\377\0\0\375\377\0\36\234\377\0\272\33\377\0\311\22\377\0\311\22\377\0\250"
+ "*\377\220\304\25\377\375\377\0\377\361\377\0\377\363\377\0\377\346\377\0"
+ "\377\231\0\0\377\335\0\0\377\327\0\0\377\340\0\0\377~\0\0\377\301\0\0\377"
+ "\332\0\0\377\332\0\0\377\273\0\0\377\272\0\236\377\3678\377\377\3612\377"
+ "\377\3636\377\377\346\16\377\377\270\0*\377\377\377\377\377\377\377\377\377"
+ "\277\0""8\377\277\0s\377\277\0h\377\277\0h\377\277\0i\377\277\7f\377\277"
+ "\32S\377\277\23X\377\277\23X\377\271\23X\377\347/E\377\3665>\377\3634?\377"
+ "\3634?\377\370??\377\336\0?\377\334\0?\377\334\0?\377\334\0?\377\344\0?\377"
+ "\336\0?\377\334\0?\377\334\0?\377\334\0""9\377\361\0g\377\364\0v\377\363"
+ "\0s\377\363\0s\377\376\0~\377\266\0""7\377\377\377\377\377",
+};
+
diff --git a/source/code/icon.hpp b/source/code/icon.hpp new file mode 100644 index 0000000..38a9af7 --- /dev/null +++ b/source/code/icon.hpp
@@ -0,0 +1,32 @@
+/*
+===========================================================================
+blockattack - Block Attack - Rise of the Blocks
+Copyright (C) 2005-2015 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, see http://www.gnu.org/licenses/
+
+Source information and contacts persons can be found at
+http://blockattack.net
+===========================================================================
+*/
+
+#ifndef ICON_HPP
+#define ICON_HPP
+
+#include "SDL.h"
+
+void SetSDLIcon(SDL_Window* window);
+
+#endif /* ICON_HPP */
+
diff --git a/source/code/joypad.cpp b/source/code/joypad.cpp index 0219f6d..19c8e11 100644 --- a/source/code/joypad.cpp +++ b/source/code/joypad.cpp
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/
Source information and contacts persons can be found at
-http://blockattack.sf.net
+http://blockattack.net
===========================================================================
*/
diff --git a/source/code/main.cpp b/source/code/main.cpp index 89abff9..14e3741 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp
@@ -24,6 +24,7 @@ http://blockattack.sf.net
#include "common.h"
#include "global.hpp"
#include "scopeHelpers.hpp"
+#include "icon.hpp"
#include <string.h>
@@ -2118,6 +2119,8 @@ int main(int argc, char* argv[]) {
//Now sets the icon:
//SDL_Surface* icon = IMG_Load2("gfx/icon.png");
//SDL_WM_SetIcon(icon,nullptr);
+ SetSDLIcon(sdlWindow);
+
if (verboseLevel) {
cout << "Images loaded" << endl;