From: Holger Schemel Date: Tue, 9 Feb 2016 22:59:42 +0000 (+0100) Subject: added initialization of textures for classic toon animations X-Git-Tag: 4.0.0.0-rc1~79 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d984fe12ae74b99cdb7afa870f42966d9af4a33f;p=rocksndiamonds.git added initialization of textures for classic toon animations --- diff --git a/src/cartoons.c b/src/cartoons.c index 043bd562..3ca6d20c 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -14,9 +14,6 @@ #include "tools.h" -/* values for toon definition */ -#define MAX_NUM_TOONS 20 - static struct ToonInfo toons[MAX_NUM_TOONS]; static void PrepareBackbuffer() diff --git a/src/init.c b/src/init.c index 375bf6a3..209d64be 100644 --- a/src/init.c +++ b/src/init.c @@ -232,6 +232,9 @@ void InitImageTextures() FreeAllImageTextures(); + for (i = 0; i < MAX_NUM_TOONS; i++) + CreateImageTextures(IMG_TOON_1 + i); + for (i = 0; i < NUM_GLOBAL_ANIMS; i++) { for (j = 0; j < NUM_GLOBAL_ANIM_PARTS_ALL; j++) diff --git a/src/main.h b/src/main.h index 092a47e7..0d7218ad 100644 --- a/src/main.h +++ b/src/main.h @@ -1957,6 +1957,9 @@ #define NUM_FONTS 38 #define NUM_INITIAL_FONTS 4 +/* values for toon animation configuration */ +#define MAX_NUM_TOONS 20 + /* values for global animation configuration (must match those from main.c) */ #define NUM_GLOBAL_ANIMS 8 #define NUM_GLOBAL_ANIM_PARTS 8