add GFX2_GLOBAL where forgotten.

So we avoid to have some so called "common" C symbols.
This commit is contained in:
Thomas Bernard 2018-01-21 23:16:28 +01:00
parent 350ca22f1e
commit e9b4392691
3 changed files with 13 additions and 11 deletions

View File

@ -304,7 +304,7 @@ GFX2_GLOBAL short Main_offset_Y;
/// File format of the image currently edited. It's a value of enum ::FILE_FORMATS /// File format of the image currently edited. It's a value of enum ::FILE_FORMATS
GFX2_GLOBAL byte Main_fileformat; GFX2_GLOBAL byte Main_fileformat;
/// File selector settings /// File selector settings
T_Selector_settings Main_selector; GFX2_GLOBAL T_Selector_settings Main_selector;
/// X position (in screen coordinates) of the separator between normal and magnified views. /// X position (in screen coordinates) of the separator between normal and magnified views.
GFX2_GLOBAL short Main_separator_position; GFX2_GLOBAL short Main_separator_position;
/// X position (in screen coordinates) of the first pixel of the magnified view. /// X position (in screen coordinates) of the first pixel of the magnified view.
@ -361,7 +361,7 @@ GFX2_GLOBAL char Spare_filename[MAX_PATH_CHARACTERS];
/// File format of the image currently edited as spare page. It's a value of enum ::FILE_FORMATS /// File format of the image currently edited as spare page. It's a value of enum ::FILE_FORMATS
GFX2_GLOBAL byte Spare_fileformat; GFX2_GLOBAL byte Spare_fileformat;
/// File selector settings /// File selector settings
T_Selector_settings Spare_selector; GFX2_GLOBAL T_Selector_settings Spare_selector;
/// X position (in screen coordinates) of the separator between normal and magnified views. /// X position (in screen coordinates) of the separator between normal and magnified views.
GFX2_GLOBAL short Spare_separator_position; GFX2_GLOBAL short Spare_separator_position;
/// X position (in screen coordinates) of the first pixel of the magnified view. /// X position (in screen coordinates) of the first pixel of the magnified view.
@ -432,7 +432,7 @@ GFX2_GLOBAL char Brush_filename[MAX_PATH_CHARACTERS];
/// File format of the brush. It's a value of enum ::FILE_FORMATS /// File format of the brush. It's a value of enum ::FILE_FORMATS
GFX2_GLOBAL byte Brush_fileformat; GFX2_GLOBAL byte Brush_fileformat;
/// Fileselector settings /// Fileselector settings
T_Selector_settings Brush_selector; GFX2_GLOBAL T_Selector_settings Brush_selector;
/// Indicator used for the "Rotate brush" operation. /// Indicator used for the "Rotate brush" operation.
GFX2_GLOBAL byte Brush_rotation_center_is_defined; GFX2_GLOBAL byte Brush_rotation_center_is_defined;
/// Position of the brush's rotation center, in screen coordinates. /// Position of the brush's rotation center, in screen coordinates.

View File

@ -24,6 +24,7 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include "struct.h" #include "struct.h"
#include "global.h"
#define SWAP_BYTES(a,b) { byte c=a; a=b; b=c;} #define SWAP_BYTES(a,b) { byte c=a; a=b; b=c;}
#define SWAP_WORDS(a,b) { word c=a; a=b; b=c;} #define SWAP_WORDS(a,b) { word c=a; a=b; b=c;}
@ -138,12 +139,12 @@ void Zoom_a_line(byte * original_line,byte * zoomed_line,word factor,word width)
void Copy_part_of_image_to_another(byte * source,word source_x,word source_y,word width,word height,word source_width,byte * dest,word dest_x,word dest_y,word destination_width); void Copy_part_of_image_to_another(byte * source,word source_x,word source_y,word width,word height,word source_width,byte * dest,word dest_x,word dest_y,word destination_width);
// -- Gestion du chrono -- // -- Gestion du chrono --
byte Timer_state; // State du chrono: 0=Attente d'un Xème de seconde GFX2_GLOBAL byte Timer_state; // State du chrono: 0=Attente d'un Xème de seconde
// 1=Il faut afficher la preview // 1=Il faut afficher la preview
// 2=Plus de chrono à gerer pour l'instant // 2=Plus de chrono à gerer pour l'instant
dword Timer_delay; // Nombre de 18.2ème de secondes demandés GFX2_GLOBAL dword Timer_delay; // Nombre de 18.2ème de secondes demandés
dword Timer_start; // Heure de départ du chrono GFX2_GLOBAL dword Timer_start; // Heure de départ du chrono
byte New_preview_is_needed; // Booléen "Il faut relancer le chrono de preview" GFX2_GLOBAL byte New_preview_is_needed; // Booléen "Il faut relancer le chrono de preview"
#if defined (__MINT__) #if defined (__MINT__)

View File

@ -30,6 +30,7 @@
#include <SDL.h> #include <SDL.h>
#include "struct.h" #include "struct.h"
#include "global.h"
/// ///
/// This is the number of bytes in a video line for the current mode. /// This is the number of bytes in a video line for the current mode.
@ -39,8 +40,8 @@
void Set_mode_SDL(int *,int *,int); void Set_mode_SDL(int *,int *,int);
SDL_Rect ** List_SDL_video_modes; GFX2_GLOBAL SDL_Rect ** List_SDL_video_modes;
byte* Screen_pixels; GFX2_GLOBAL byte* Screen_pixels;
void Update_rect(short x, short y, unsigned short width, unsigned short height); void Update_rect(short x, short y, unsigned short width, unsigned short height);
void Flush_update(void); void Flush_update(void);