mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Move gfx_* functions from sdl_core.h to gfx.h
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@
|
||||
#include "ags.h"
|
||||
#include "pms.h"
|
||||
#include "qnt.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "ngraph.h"
|
||||
#include "dri.h"
|
||||
#include "ald_manager.h"
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include "graph.h"
|
||||
#include "ngraph.h"
|
||||
#include "ags.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
|
||||
/**
|
||||
* surface から surface にコピーなどをする際に、転送元と転送先のsurface
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "input.h"
|
||||
#include "sdl_core.h"
|
||||
#include "scheduler.h"
|
||||
#include "xsystem35.h"
|
||||
#include "nact.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "ags.h"
|
||||
#include "input.h"
|
||||
#include "sprite.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "nact.h"
|
||||
#include "alk.h"
|
||||
#include "music.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "input.h"
|
||||
#include "cg.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "sact.h"
|
||||
#include "sactcg.h"
|
||||
#include "cg.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
|
||||
#define SPCG_ASSERT_NO(no) \
|
||||
if ((no) > (CGMAX -1)) { \
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "input.h"
|
||||
#include "sact.h"
|
||||
#include "sprite.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "alk.h"
|
||||
#include "input.h"
|
||||
#include "bgm.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "cg.h"
|
||||
#include "jpeg.h"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "xsystem35.h"
|
||||
#include "scenario.h"
|
||||
#include "ags.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "alpha_plane.h"
|
||||
#include "utfsjis.h"
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "utfsjis.h"
|
||||
#include "hankaku.h"
|
||||
#include "ags.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "ald_manager.h"
|
||||
#include "LittleEndian.h"
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
#include "selection.h"
|
||||
#include "message.h"
|
||||
#include "input.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
|
||||
static void undeferr();
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "xsystem35.h"
|
||||
#include "scenario.h"
|
||||
#include "ags.h"
|
||||
#include "sdl_core.h"
|
||||
#include "input.h"
|
||||
#include "msgskip.h"
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "xsystem35.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "scheduler.h"
|
||||
#include "ags.h"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "debugger_private.h"
|
||||
#include "debug_symbol.h"
|
||||
#include "msgqueue.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "system.h"
|
||||
#include "nact.h"
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "portab.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "input.h"
|
||||
#include "ags.h"
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (C) 2000- Fumihiko Murata <fmurata@p1.tcnet.ne.jp>
|
||||
* 2025 kichikuou <KichikuouChrome@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
#ifndef __GFX_H__
|
||||
#define __GFX_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <SDL_surface.h>
|
||||
#include "portab.h"
|
||||
#include "ags.h"
|
||||
|
||||
/* 初期化関係 */
|
||||
int gfx_Initialize(const char *render_driver);
|
||||
void gfx_Remove(void);
|
||||
|
||||
/* ウィンド関係 */
|
||||
void gfx_setWorldSize(int width, int height, int depth);
|
||||
void gfx_setWindowSize(int w, int h);
|
||||
void gfx_setWindowTitle(char *name);
|
||||
void gfx_getWindowInfo(DispInfo *info);
|
||||
void gfx_setFullscreen(bool on);
|
||||
bool gfx_isFullscreen(void);
|
||||
void gfx_raiseWindow(void);
|
||||
surface_t *gfx_getDIB(void);
|
||||
void gfx_setIntegerScaling(bool enable);
|
||||
SDL_Surface *gfx_createSurfaceView(SDL_Surface *sf, int x, int y, int w, int h);
|
||||
|
||||
/* 画面更新 */
|
||||
void gfx_updateArea(MyRectangle *src, MyPoint *dst);
|
||||
void gfx_updateAll(MyRectangle *view_rect);
|
||||
void gfx_updateScreen(void);
|
||||
|
||||
/* パレット関係 */
|
||||
void gfx_setPalette(SDL_Color *pal, int first, int count);
|
||||
|
||||
/* 描画関係 */
|
||||
void gfx_drawRectangle(int x, int y, int w, int h, uint8_t c);
|
||||
void gfx_fillRectangle(int x, int y, int w, int h, uint8_t c);
|
||||
void gfx_fillRectangleRGB(int x, int y, int w, int h, uint8_t r, uint8_t g, uint8_t b);
|
||||
void gfx_fillCircle(int left, int top, int diameter, uint8_t c);
|
||||
void gfx_drawLine(int x1, int y1, int x2, int y2, uint8_t c);
|
||||
SDL_Rect gfx_floodFill(int x, int y, int col);
|
||||
SDL_Rect gfx_drawString(int x, int y, const char *str_utf8, uint8_t col);
|
||||
void gfx_copyArea(int sx,int sy, int w, int h, int dx, int dy);
|
||||
void gfx_copyAreaSP(int sx, int sy, int w, int h, int dx, int dy, uint8_t sp);
|
||||
void gfx_wrapColor(int sx, int sy, int w, int h, uint8_t cl, int rate);
|
||||
void gfx_scaledCopyArea(int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int mirror);
|
||||
void gfx_drawImage8(cgdata *cg, int x, int y, int sprite_color);
|
||||
void gfx_drawImage16(cgdata *cg, surface_t *sf, int x, int y, int brightness, bool alpha_blend);
|
||||
void gfx_drawImage24(cgdata *cg, surface_t *sf, int x, int y, int brightness);
|
||||
void gfx_drawImageAlphaMap(cgdata *cg, surface_t *sf, int x, int y);
|
||||
void gfx_copyAreaSP16_shadow(int sx, int sy, int w, int h, int dx, int dy, int lv);
|
||||
void gfx_copyAreaSP16_alphaBlend(int sx, int sy, int w, int h, int dx, int dy, int lv);
|
||||
void gfx_copyAreaSP16_alphaLevel(int sx, int sy, int w, int h, int dx, int dy, int lv);
|
||||
void gfx_copy_from_alpha(int sx, int sy, int w, int h, int dx, int dy, ALPHA_DIB_COPY_TYPE flag);
|
||||
void gfx_copy_to_alpha(int sx, int sy, int w, int h, int dx, int dy, ALPHA_DIB_COPY_TYPE flag);
|
||||
void gfx_getPixel(int x, int y, Palette *cell);
|
||||
void gfx_putRegion(void *src, int x, int y);
|
||||
void gfx_restoreRegion(void *src, int x, int y);
|
||||
void* gfx_saveRegion(int x, int y, int w, int h);
|
||||
void gfx_delRegion(void *src);
|
||||
void gfx_FlipSurfaceHorizontal(SDL_Surface *s);
|
||||
void gfx_FlipSurfaceVertical(SDL_Surface *s);
|
||||
|
||||
#endif /* __GFX_H__ */
|
||||
+2
-1
@@ -34,8 +34,9 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "gfx_private.h"
|
||||
#include "sdl_core.h"
|
||||
#include "scheduler.h"
|
||||
#include "font.h"
|
||||
#include "ags.h"
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "gfx_private.h"
|
||||
#include "cg.h"
|
||||
#include "nact.h"
|
||||
|
||||
+2
-1
@@ -31,8 +31,9 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "gfx_private.h"
|
||||
#include "sdl_core.h"
|
||||
#include "xsystem35.h"
|
||||
#include "image.h"
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "cg.h"
|
||||
#include "config.h"
|
||||
#include "nact.h"
|
||||
#include "sdl_core.h"
|
||||
#include "alpha_plane.h"
|
||||
#include "ags.h"
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
#include "portab.h"
|
||||
#include "scenario.h"
|
||||
#include "xsystem35.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "scheduler.h"
|
||||
#include "ags.h"
|
||||
#include "nact.h"
|
||||
|
||||
@@ -34,59 +34,6 @@
|
||||
|
||||
struct inputstring_param;
|
||||
|
||||
/* 初期化関係 */
|
||||
extern int gfx_Initialize(const char *render_driver);
|
||||
extern void gfx_Remove(void);
|
||||
|
||||
/* ウィンド関係 */
|
||||
extern void gfx_setWorldSize(int width, int height, int depth);
|
||||
extern void gfx_setWindowSize(int w, int h);
|
||||
extern void gfx_setWindowTitle(char *name);
|
||||
extern void gfx_getWindowInfo(DispInfo *info);
|
||||
extern void gfx_setFullscreen(bool on);
|
||||
extern bool gfx_isFullscreen(void);
|
||||
extern void gfx_raiseWindow(void);
|
||||
extern surface_t *gfx_getDIB(void);
|
||||
extern void gfx_setIntegerScaling(bool enable);
|
||||
extern SDL_Surface *gfx_createSurfaceView(SDL_Surface *sf, int x, int y, int w, int h);
|
||||
|
||||
/* 画面更新 */
|
||||
extern void gfx_updateArea(MyRectangle *src, MyPoint *dst);
|
||||
extern void gfx_updateAll(MyRectangle *view_rect);
|
||||
extern void gfx_updateScreen(void);
|
||||
|
||||
/* パレット関係 */
|
||||
extern void gfx_setPalette(SDL_Color *pal, int first, int count);
|
||||
|
||||
/* 描画関係 */
|
||||
extern void gfx_drawRectangle(int x, int y, int w, int h, uint8_t c);
|
||||
extern void gfx_fillRectangle(int x, int y, int w, int h, uint8_t c);
|
||||
extern void gfx_fillRectangleRGB(int x, int y, int w, int h, uint8_t r, uint8_t g, uint8_t b);
|
||||
extern void gfx_fillCircle(int left, int top, int diameter, uint8_t c);
|
||||
extern void gfx_drawLine(int x1, int y1, int x2, int y2, uint8_t c);
|
||||
extern SDL_Rect gfx_floodFill(int x, int y, int col);
|
||||
extern SDL_Rect gfx_drawString(int x, int y, const char *str_utf8, uint8_t col);
|
||||
extern void gfx_copyArea(int sx,int sy, int w, int h, int dx, int dy);
|
||||
extern void gfx_copyAreaSP(int sx, int sy, int w, int h, int dx, int dy, uint8_t sp);
|
||||
extern void gfx_wrapColor(int sx, int sy, int w, int h, uint8_t cl, int rate);
|
||||
extern void gfx_scaledCopyArea(int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int mirror);
|
||||
extern void gfx_drawImage8(cgdata *cg, int x, int y, int sprite_color);
|
||||
extern void gfx_drawImage16(cgdata *cg, surface_t *sf, int x, int y, int brightness, bool alpha_blend);
|
||||
extern void gfx_drawImage24(cgdata *cg, surface_t *sf, int x, int y, int brightness);
|
||||
extern void gfx_drawImageAlphaMap(cgdata *cg, surface_t *sf, int x, int y);
|
||||
extern void gfx_copyAreaSP16_shadow(int sx, int sy, int w, int h, int dx, int dy, int lv);
|
||||
extern void gfx_copyAreaSP16_alphaBlend(int sx, int sy, int w, int h, int dx, int dy, int lv);
|
||||
extern void gfx_copyAreaSP16_alphaLevel(int sx, int sy, int w, int h, int dx, int dy, int lv);
|
||||
extern void gfx_copy_from_alpha(int sx, int sy, int w, int h, int dx, int dy, ALPHA_DIB_COPY_TYPE flag);
|
||||
extern void gfx_copy_to_alpha(int sx, int sy, int w, int h, int dx, int dy, ALPHA_DIB_COPY_TYPE flag);
|
||||
extern void gfx_getPixel(int x, int y, Palette *cell);
|
||||
extern void gfx_putRegion(void *src, int x, int y);
|
||||
extern void gfx_restoreRegion(void *src, int x, int y);
|
||||
extern void* gfx_saveRegion(int x, int y, int w, int h);
|
||||
extern void gfx_delRegion(void *src);
|
||||
void gfx_FlipSurfaceHorizontal(SDL_Surface *s);
|
||||
void gfx_FlipSurfaceVertical(SDL_Surface *s);
|
||||
|
||||
/* Effects */
|
||||
struct sdl_effect;
|
||||
struct sdl_effect *sdl_effect_init(SDL_Rect *rect, surface_t *old, int ox, int oy, surface_t *new, int nx, int ny, enum sdl_effect_type effect);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <SDL.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx_private.h"
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "system.h"
|
||||
#include "debugger.h"
|
||||
#include "nact.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx_private.h"
|
||||
#include "scheduler.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <SDL.h>
|
||||
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "gfx_private.h"
|
||||
#include "menu.h"
|
||||
#include "nact.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "menu.h"
|
||||
#include "nact.h"
|
||||
#include "sdl_core.h"
|
||||
#include "gfx.h"
|
||||
#include "gfx_private.h"
|
||||
#include "resources.h"
|
||||
#include "msgskip.h"
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "randMT.h"
|
||||
#include "ags.h"
|
||||
#include "font.h"
|
||||
#include "gfx.h"
|
||||
#include "sdl_core.h"
|
||||
#include "menu.h"
|
||||
#include "music.h"
|
||||
|
||||
Reference in New Issue
Block a user