diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index c20b556..fdc93a3 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -5,7 +5,14 @@ add_library(modules STATIC AliceLogo/AliceLogo.c Confirm/Confirm.c Gpx/Gpx.c + Gpx/cg.c Gpx/effectcopy.c + Gpx/graph_cg.c + Gpx/graph_copy_amap.c + Gpx/graph_draw_amap.c + Gpx/graph_fillrect_amap.c + Gpx/graph.c + Gpx/surface.c Math/Math.c MsgSkip/MsgSkip.c NIGHTDLL/NIGHTDLL.c @@ -61,15 +68,8 @@ add_library(modules STATIC eeDemo/eeDemo.c lib/alk.c lib/drawtext.c - lib/graph.c lib/list.c - lib/surface.c - lib/cg.c - lib/graph_fillrect_amap.c - lib/graph_copy_amap.c lib/graph_blend_amap.c - lib/graph_draw_amap.c - lib/graph_cg.c nDEMO/nDEMO.c nDEMOE/nDEMOE.c oDEMO/oDEMO.c diff --git a/modules/Gpx/Gpx.c b/modules/Gpx/Gpx.c index 46c3134..607bc1c 100644 --- a/modules/Gpx/Gpx.c +++ b/modules/Gpx/Gpx.c @@ -42,7 +42,7 @@ // #include "alpha_plane.h" #include "surface.h" #include "graph.h" -// #include "graph2.h" +#include "graph_blend_amap.h" #include "effectcopy.h" #include "ngraph.h" diff --git a/modules/lib/cg.c b/modules/Gpx/cg.c similarity index 100% rename from modules/lib/cg.c rename to modules/Gpx/cg.c diff --git a/modules/lib/graph.c b/modules/Gpx/graph.c similarity index 100% rename from modules/lib/graph.c rename to modules/Gpx/graph.c diff --git a/modules/lib/graph.h b/modules/Gpx/graph.h similarity index 100% rename from modules/lib/graph.h rename to modules/Gpx/graph.h diff --git a/modules/lib/graph2.c b/modules/Gpx/graph2.c similarity index 100% rename from modules/lib/graph2.c rename to modules/Gpx/graph2.c diff --git a/modules/lib/graph_cg.c b/modules/Gpx/graph_cg.c similarity index 100% rename from modules/lib/graph_cg.c rename to modules/Gpx/graph_cg.c diff --git a/modules/lib/graph_copy_amap.c b/modules/Gpx/graph_copy_amap.c similarity index 100% rename from modules/lib/graph_copy_amap.c rename to modules/Gpx/graph_copy_amap.c diff --git a/modules/lib/graph_draw_amap.c b/modules/Gpx/graph_draw_amap.c similarity index 100% rename from modules/lib/graph_draw_amap.c rename to modules/Gpx/graph_draw_amap.c diff --git a/modules/lib/graph_fillrect_amap.c b/modules/Gpx/graph_fillrect_amap.c similarity index 100% rename from modules/lib/graph_fillrect_amap.c rename to modules/Gpx/graph_fillrect_amap.c diff --git a/modules/lib/ngraph.h b/modules/Gpx/ngraph.h similarity index 90% rename from modules/lib/ngraph.h rename to modules/Gpx/ngraph.h index a93962e..b8f95f7 100644 --- a/modules/lib/ngraph.h +++ b/modules/Gpx/ngraph.h @@ -23,9 +23,6 @@ void gr_fill_alpha_map(surface_t *dst, int dx, int dy, int dw, int dh, int lv); /* in graph_copy_amap.c */ void gr_copy_alpha_map(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int sw, int sh); -/* in graph_blend_amap.c */ -void gr_blend_alpha_map(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int sw, int sh); - /* in graph_draw_amap.c */ void gr_draw_amap(surface_t *dst, int dx, int dy, uint8_t *src, int width, int height, int scanline); diff --git a/modules/lib/surface.c b/modules/Gpx/surface.c similarity index 100% rename from modules/lib/surface.c rename to modules/Gpx/surface.c diff --git a/modules/lib/surface.h b/modules/Gpx/surface.h similarity index 100% rename from modules/lib/surface.h rename to modules/Gpx/surface.h diff --git a/modules/lib/drawtext.c b/modules/lib/drawtext.c index 67d08d3..8bbdb5a 100644 --- a/modules/lib/drawtext.c +++ b/modules/lib/drawtext.c @@ -30,8 +30,6 @@ #include "nact.h" #include "ags.h" #include "font.h" -#include "surface.h" -#include "ngraph.h" static FontType ftype; static int fsize; // フォントの大きさ diff --git a/modules/lib/graph_blend_amap.c b/modules/lib/graph_blend_amap.c index 0b328f0..9f20be8 100644 --- a/modules/lib/graph_blend_amap.c +++ b/modules/lib/graph_blend_amap.c @@ -5,8 +5,7 @@ #include "portab.h" #include "system.h" -#include "surface.h" -#include "ngraph.h" +#include "graph_blend_amap.h" #include "ags.h" static void gre_BlendUseAMap(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int width, int height) { @@ -45,7 +44,9 @@ static void gre_BlendUseAMap(surface_t *dst, int dx, int dy, surface_t *src, int void gr_blend_alpha_map(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int sw, int sh) { if (src == NULL || dst == NULL) return; - if (!gr_clip(src, &sx, &sy, &sw, &sh, dst, &dx, &dy)) return; + MyRectangle src_window = { 0, 0, src->width, src->height }; + MyRectangle dst_window = { 0, 0, dst->width, dst->height }; + if (!ags_clipCopyRect(&src_window, &dst_window, &sx, &sy, &dx, &dy, &sw, &sh)) return; if (src->alpha == NULL) { WARNING("src alpha NULL"); diff --git a/modules/lib/graph_blend_amap.h b/modules/lib/graph_blend_amap.h new file mode 100644 index 0000000..2002270 --- /dev/null +++ b/modules/lib/graph_blend_amap.h @@ -0,0 +1,8 @@ +#ifndef __GRAPH_BLEND_AMAP_H__ +#define __GRAPH_BLEND_AMAP_H__ + +#include "ags.h" + +void gr_blend_alpha_map(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int sw, int sh); + +#endif /* __GRAPH_BLEND_AMAP_H__ */ diff --git a/modules/oujimisc/oujimisc.c b/modules/oujimisc/oujimisc.c index 4158f0c..a2cd2da 100644 --- a/modules/oujimisc/oujimisc.c +++ b/modules/oujimisc/oujimisc.c @@ -9,7 +9,7 @@ #include "filecheck.h" #include "modules.h" #include "nact.h" -#include "ngraph.h" +#include "graph_blend_amap.h" #define NUM_MAPS 16 #define NUM_LAYERS 3