Loading of Layer icons (unused atm.)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1189 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
528a6f1b53
commit
22b5dc56e5
@ -1,17 +1,21 @@
|
||||
$(OBJDIR)/SFont.o: SFont.c SFont.h
|
||||
$(OBJDIR)/brush.o: brush.c global.h struct.h const.h graph.h misc.h errors.h \
|
||||
windows.h sdlscreen.h brush.h
|
||||
$(OBJDIR)/brush_ops.o: brush_ops.c brush.h struct.h const.h buttons.h engine.h \
|
||||
global.h graph.h misc.h operatio.h pages.h windows.h
|
||||
$(OBJDIR)/buttons.o: buttons.c const.h struct.h global.h misc.h graph.h engine.h \
|
||||
readline.h filesel.h loadsave.h init.h buttons.h operatio.h pages.h \
|
||||
palette.h errors.h readini.h saveini.h shade.h io.h help.h text.h \
|
||||
sdlscreen.h windows.h brush.h input.h special.h
|
||||
$(OBJDIR)/buttons_effects.o: buttons_effects.c buttons.h struct.h const.h engine.h \
|
||||
global.h graph.h help.h input.h misc.h readline.h sdlscreen.h windows.h
|
||||
$(OBJDIR)/engine.o: engine.c const.h struct.h global.h graph.h misc.h special.h \
|
||||
buttons.h operatio.h shade.h errors.h sdlscreen.h windows.h brush.h \
|
||||
input.h engine.h pages.h
|
||||
$(OBJDIR)/factory.o: factory.c brush.h struct.h const.h buttons.h engine.h errors.h \
|
||||
filesel.h global.h graph.h io.h misc.h readline.h sdlscreen.h windows.h
|
||||
$(OBJDIR)/fileformats.o: fileformats.c errors.h global.h struct.h const.h \
|
||||
loadsave.h misc.h
|
||||
loadsave.h misc.h io.h windows.h pages.h
|
||||
$(OBJDIR)/filesel.o: filesel.c const.h struct.h global.h misc.h errors.h io.h \
|
||||
windows.h sdlscreen.h loadsave.h mountlist.h engine.h readline.h \
|
||||
input.h help.h filesel.h
|
||||
@ -25,11 +29,12 @@ $(OBJDIR)/hotkeys.o: hotkeys.c struct.h const.h global.h hotkeys.h
|
||||
$(OBJDIR)/init.o: init.c buttons.h struct.h const.h errors.h global.h graph.h \
|
||||
init.h io.h factory.h help.h hotkeys.h keyboard.h loadsave.h misc.h \
|
||||
mountlist.h operatio.h palette.h sdlscreen.h setup.h transform.h \
|
||||
windows.h
|
||||
windows.h layers.h
|
||||
$(OBJDIR)/input.o: input.c global.h struct.h const.h keyboard.h sdlscreen.h \
|
||||
windows.h errors.h misc.h input.h
|
||||
$(OBJDIR)/io.o: io.c struct.h const.h io.h realpath.h
|
||||
$(OBJDIR)/keyboard.o: keyboard.c global.h struct.h const.h keyboard.h
|
||||
$(OBJDIR)/layers.o: layers.c const.h struct.h global.h windows.h engine.h pages.h
|
||||
$(OBJDIR)/libraw2crtc.o: libraw2crtc.c global.h struct.h const.h
|
||||
$(OBJDIR)/loadsave.o: loadsave.c buttons.h struct.h const.h errors.h global.h io.h \
|
||||
loadsave.h misc.h graph.h op_c.h pages.h palette.h sdlscreen.h \
|
||||
|
||||
2
const.h
2
const.h
@ -46,6 +46,8 @@
|
||||
#define NB_MENU_SPRITES 20 ///< Number of menu sprites.
|
||||
#define MENU_SPRITE_WIDTH 14 ///< Width of a menu sprite in pixels
|
||||
#define MENU_SPRITE_HEIGHT 14 ///< Height of a menu sprite in pixels
|
||||
#define LAYER_SPRITE_WIDTH 14 ///< Width of a layer button in pixels
|
||||
#define LAYER_SPRITE_HEIGHT 10 ///< Height of a layer button in pixels
|
||||
#define PAINTBRUSH_WIDTH 16 ///< Width of a preset paintbrush sprite
|
||||
#define PAINTBRUSH_HEIGHT 16 ///< Height of a preset paintbrush sprite
|
||||
#define MAX_PAINTBRUSH_SIZE 127 ///< Max size for a resizable paintbrush
|
||||
|
||||
52
init.c
52
init.c
@ -247,7 +247,7 @@ void Center_GUI_cursor(T_Gui_skin *gfx, byte *cursor_buffer, int cursor_number)
|
||||
byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
{
|
||||
int index;
|
||||
int i;
|
||||
int i,j;
|
||||
int cursor_x=0,cursor_y=0;
|
||||
byte color;
|
||||
byte neutral_color; // color neutre utilisée pour délimiter les éléments GUI
|
||||
@ -352,7 +352,7 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
|
||||
// Preview
|
||||
cursor_x += Menu_bars[main_bar].width;
|
||||
if (GUI_seek_right(gui, &cursor_x, cursor_y, neutral_color, "logo"))
|
||||
if (GUI_seek_right(gui, &cursor_x, cursor_y, neutral_color, "preview"))
|
||||
return 1;
|
||||
if (Read_GUI_block(gfx, gui, cursor_x, cursor_y, gfx->Preview, 173, 16, "logo", 0))
|
||||
return 1;
|
||||
@ -365,6 +365,7 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
return 1;
|
||||
cursor_y+= Menu_bars[layers_bar].height;
|
||||
|
||||
// Status bar
|
||||
if (GUI_seek_down(gui, &cursor_x, &cursor_y, neutral_color, "status bar"))
|
||||
return 1;
|
||||
if (Read_GUI_block(gfx, gui, cursor_x, cursor_y, gfx->Statusbar_block, Menu_bars[status_bar].width, Menu_bars[status_bar].height,"status bar",0))
|
||||
@ -372,7 +373,7 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
cursor_y+= Menu_bars[status_bar].height;
|
||||
|
||||
|
||||
// Effets
|
||||
// Effects
|
||||
for (i=0; i<NB_EFFECTS_SPRITES; i++)
|
||||
{
|
||||
if (i==0)
|
||||
@ -391,7 +392,30 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=MENU_SPRITE_HEIGHT;
|
||||
|
||||
// Curseurs souris
|
||||
// Layer sprite
|
||||
for (j=0; j<3; j++)
|
||||
{
|
||||
for (i=0; i<16; i++)
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
if (GUI_seek_down(gui, &cursor_x, &cursor_y, neutral_color, "layer sprite"))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GUI_seek_right(gui, &cursor_x, cursor_y, neutral_color, "layer sprite"))
|
||||
return 1;
|
||||
}
|
||||
if (Read_GUI_block(gfx, gui, cursor_x, cursor_y, gfx->Layer_sprite[j][i], LAYER_SPRITE_WIDTH, LAYER_SPRITE_HEIGHT, "layer sprite",1))
|
||||
return 1;
|
||||
cursor_x+=LAYER_SPRITE_WIDTH;
|
||||
}
|
||||
cursor_y+=LAYER_SPRITE_HEIGHT;
|
||||
}
|
||||
|
||||
|
||||
// Mouse cursors
|
||||
for (i=0; i<NB_CURSOR_SPRITES; i++)
|
||||
{
|
||||
if (i==0)
|
||||
@ -411,7 +435,7 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=29;
|
||||
|
||||
// Sprites menu
|
||||
// Menu sprites
|
||||
for (i=0; i<NB_MENU_SPRITES; i++)
|
||||
{
|
||||
if (i==0)
|
||||
@ -430,10 +454,10 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=MENU_SPRITE_HEIGHT;
|
||||
|
||||
// Icones des Pinceaux
|
||||
// Paintbrushes
|
||||
for (i=0; i<NB_PAINTBRUSH_SPRITES; i++)
|
||||
{
|
||||
// Rangés par ligne de 12
|
||||
// Each line holds 12
|
||||
if ((i%12)==0)
|
||||
{
|
||||
if (i!=0)
|
||||
@ -452,7 +476,7 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=PAINTBRUSH_HEIGHT;
|
||||
|
||||
// Sprites drive
|
||||
// Drive sprites
|
||||
for (i=0; i<NB_ICON_SPRITES; i++)
|
||||
{
|
||||
if (i==0)
|
||||
@ -498,10 +522,10 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=16;
|
||||
|
||||
// Font help normale
|
||||
// Help font: Normal
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
// Rangés par ligne de 32
|
||||
// Each line holds 32 symbols
|
||||
if ((i%32)==0)
|
||||
{
|
||||
if (i!=0)
|
||||
@ -520,10 +544,10 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=8;
|
||||
|
||||
// Font help bold
|
||||
// Help font: Bold
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
// Rangés par ligne de 32
|
||||
// Each line holds 32 symbols
|
||||
if ((i%32)==0)
|
||||
{
|
||||
if (i!=0)
|
||||
@ -542,11 +566,11 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
|
||||
}
|
||||
cursor_y+=8;
|
||||
|
||||
// Font help titre
|
||||
// Help font: Title
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
byte * dest;
|
||||
// Rangés par ligne de 64
|
||||
// Each line holds 64 symbols
|
||||
if ((i%64)==0)
|
||||
{
|
||||
if (i!=0)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
2
struct.h
2
struct.h
@ -423,6 +423,8 @@ typedef struct
|
||||
byte Menu_sprite[NB_MENU_SPRITES][MENU_SPRITE_HEIGHT][MENU_SPRITE_WIDTH];
|
||||
/// Bitmap data for the different "effects" icons.
|
||||
byte Effect_sprite[NB_EFFECTS_SPRITES][MENU_SPRITE_HEIGHT][MENU_SPRITE_WIDTH];
|
||||
/// Bitmap data for the different Layer icons.
|
||||
byte Layer_sprite[3][16][LAYER_SPRITE_HEIGHT][LAYER_SPRITE_WIDTH];
|
||||
/// Bitmap data for the Grafx2 logo that appears on splash screen. All 256 colors allowed.
|
||||
byte Logo_grafx2[231*56];
|
||||
/// Bitmap data for the 6x8 font used in help screens.
|
||||
|
||||
@ -2656,7 +2656,7 @@ void Compute_optimal_menu_colors(T_Components * palette)
|
||||
/// Remap all menu data when the palette changes or a new skin is loaded
|
||||
void Remap_menu_sprites()
|
||||
{
|
||||
int i, j, k;
|
||||
int i, j, k, l;
|
||||
|
||||
if ( (MC_Light!=Old_light)
|
||||
|| (MC_Dark!=Old_dark)
|
||||
@ -2683,6 +2683,13 @@ void Remap_menu_sprites()
|
||||
for (j=0; j<MENU_SPRITE_HEIGHT; j++)
|
||||
for (i=0; i<MENU_SPRITE_WIDTH; i++)
|
||||
Remap_pixel(&Gfx->Effect_sprite[k][j][i]);
|
||||
// Layers buttons
|
||||
for (l=0; l<3; l++)
|
||||
for (k=0; k<16; k++)
|
||||
for (j=0; j<LAYER_SPRITE_HEIGHT; j++)
|
||||
for (i=0; i<LAYER_SPRITE_WIDTH; i++)
|
||||
Remap_pixel(&Gfx->Layer_sprite[l][k][j][i]);
|
||||
|
||||
// Status bar
|
||||
for (j=0; j<9; j++)
|
||||
for (i=0; i<MENU_WIDTH; i++)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user