diff --git a/Makefile.dep b/Makefile.dep index b95a0802..f4ce9271 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -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 \ diff --git a/const.h b/const.h index 760a6761..25f4a50c 100644 --- a/const.h +++ b/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 diff --git a/init.c b/init.c index 5be3924b..35eec7bd 100644 --- a/init.c +++ b/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; iLayer_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; iEffect_sprite[k][j][i]); + // Layers buttons + for (l=0; l<3; l++) + for (k=0; k<16; k++) + for (j=0; jLayer_sprite[l][k][j][i]); + // Status bar for (j=0; j<9; j++) for (i=0; i