Fix multiple definitions when compiling an example when the library was built with make #1

Merged
Captain4LK merged 1 commits from ashimokawa/SoftLK-lib:fix-duplicated-symbols into master 1 year ago
  1. 3
      src/SLK_draw_pal.c
  2. 4
      src/SLK_draw_pal_i.h
  3. 3
      src/SLK_draw_rgb.c
  4. 4
      src/SLK_draw_rgb_i.h
  5. 5
      src/SLK_layer.c
  6. 8
      src/SLK_layer_i.h

3
src/SLK_draw_pal.c

@ -41,6 +41,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
static SLK_Paxel target_pal_clear;
static SLK_Pal_sprite *text_sprite_pal;
static SLK_Pal_sprite *text_sprite_pal_default;
SLK_Pal_sprite *target_pal;
SLK_Pal_sprite *target_pal_default;
//-------------------------------------
//Function prototypes

4
src/SLK_draw_pal_i.h

@ -19,7 +19,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include "../include/SLK/SLK_types.h"
SLK_Pal_sprite *target_pal;
SLK_Pal_sprite *target_pal_default;
extern SLK_Pal_sprite *target_pal;
extern SLK_Pal_sprite *target_pal_default;
#endif

3
src/SLK_draw_rgb.c

@ -41,6 +41,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
static SLK_Color target_rgb_clear;
static SLK_RGB_sprite *text_sprite_rgb;
static SLK_RGB_sprite *text_sprite_rgb_default;
SLK_RGB_sprite *target_rgb;
SLK_RGB_sprite *target_rgb_default;
//-------------------------------------
//Function prototypes

4
src/SLK_draw_rgb_i.h

@ -19,7 +19,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include "../include/SLK/SLK_types.h"
SLK_RGB_sprite *target_rgb;
SLK_RGB_sprite *target_rgb_default;
extern SLK_RGB_sprite *target_rgb;
extern SLK_RGB_sprite *target_rgb_default;
#endif

5
src/SLK_layer.c

@ -53,6 +53,11 @@ static uint32_t rgb332_int[256] =
0xFFC0C000, 0xFFC0C020, 0xFFC0C040, 0xFFC0C060, 0xFFC0C080, 0xFFC0C0A0, 0xFFC0C0C0, 0xFFC0C0E0, 0xFFC0E000, 0xFFC0E020, 0xFFC0E040, 0xFFC0E060, 0xFFC0E080, 0xFFC0E0A0, 0xFFC0E0C0, 0xFFC0E0E0,
};
static SLK_Palette *rgb332 = (SLK_Palette*)rgb332_int;
int dynamic;
int layer_count;
SLK_Layer *layers;
SLK_Layer *current_layer;
//-------------------------------------
//Function prototypes

8
src/SLK_layer_i.h

@ -19,9 +19,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include "../include/SLK/SLK_types.h"
int dynamic;
int layer_count;
SLK_Layer *layers;
SLK_Layer *current_layer;
extern int dynamic;
extern int layer_count;
extern SLK_Layer *layers;
extern SLK_Layer *current_layer;
#endif

Loading…
Cancel
Save