Move surface and graphic functions from modules/lib to modules/Gpx

Except for gr_blend_alpha_map(), which is used by oujimisc.
This commit is contained in:
kichikuou
2025-02-19 14:57:40 +09:00
parent a8f46453d8
commit 2ed44dab6d
17 changed files with 21 additions and 17 deletions
+7 -7
View File
@@ -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
+1 -1
View File
@@ -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"
@@ -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);
-2
View File
@@ -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; // フォントの大きさ
+4 -3
View File
@@ -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");
+8
View File
@@ -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__ */
+1 -1
View File
@@ -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