diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-12-29 15:01:57 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-12-29 15:01:57 +0100 |
commit | a134cb75c5dd2570b9aeb1530701086d4f3f593d (patch) | |
tree | d5b1b158fb0d53b612b860013102126394ff6cc2 /src/common | |
parent | cf65681f8029c2c1e5f18cc3776bdb09c8bd1db0 (diff) | |
download | colobot-a134cb75c5dd2570b9aeb1530701086d4f3f593d.tar.gz colobot-a134cb75c5dd2570b9aeb1530701086d4f3f593d.tar.bz2 colobot-a134cb75c5dd2570b9aeb1530701086d4f3f593d.zip |
Merge of master and dev
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/config.h.cmake | 4 | ||||
-rw-r--r-- | src/common/image.cpp | 4 | ||||
-rw-r--r-- | src/common/restext.cpp | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake index dd280a3..022bb69 100644 --- a/src/common/config.h.cmake +++ b/src/common/config.h.cmake @@ -8,6 +8,10 @@ #cmakedefine USE_GLEW @USE_GLEW@ #cmakedefine GLEW_STATIC +#define COLOBOT_VERSION "@COLOBOT_VERSION_FULL@" +#define COLOBOT_CODENAME "@COLOBOT_VERSION_CODENAME@" +#define COLOBOT_FULLNAME "Colobot @COLOBOT_VERSION_CODENAME@" + #define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@" #define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@" diff --git a/src/common/image.cpp b/src/common/image.cpp index f3cfa34..ef8097e 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -124,14 +124,14 @@ bool PNGSaveSurface(const char *filename, SDL_Surface *surf) png_write_info(png_ptr, info_ptr); png_set_packing(png_ptr); - row_pointers = static_cast<png_bytep*>( malloc(sizeof(png_bytep)*surf->h) ); + row_pointers = new png_bytep[surf->h]; for (i = 0; i < surf->h; i++) row_pointers[i] = static_cast<png_bytep>( static_cast<Uint8 *>(surf->pixels) ) + i*surf->pitch; png_write_image(png_ptr, row_pointers); png_write_end(png_ptr, info_ptr); /* Cleaning out... */ - free(row_pointers); + delete[] row_pointers; png_destroy_write_struct(&png_ptr, &info_ptr); fclose(fp); diff --git a/src/common/restext.cpp b/src/common/restext.cpp index da06131..4c56ae5 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -17,6 +17,8 @@ #include "common/restext.h" +#include "common/config.h" + #include "common/global.h" #include "common/event.h" #include "common/logger.h" @@ -39,7 +41,7 @@ const char* stringsCbot[TX_MAX] = { nullptr }; void InitializeRestext() { - stringsText[RT_VERSION_ID] = "Colobot Gold"; + stringsText[RT_VERSION_ID] = COLOBOT_FULLNAME; stringsText[RT_DISINFO_TITLE] = "SatCom"; stringsText[RT_WINDOW_MAXIMIZED] = "Maximize"; |