From 2f8dd2d6a51b8ee86ff53400afa5aecce2bd4c87 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 17 Jan 2021 21:57:49 +0900 Subject: [PATCH] Remove unused antialiase.c --- src/CMakeLists.txt | 2 +- src/antialiase.c | 80 ---------------------------------------------- src/antialiase.h | 31 ------------------ 3 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 src/antialiase.c delete mode 100644 src/antialiase.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ac497e..a254ad8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -62,7 +62,7 @@ target_sources(xsystem35 PRIVATE # Graphics target_sources(xsystem35 PRIVATE - ags.c flood.c cg.c ecopy.c antialiase.c alpha_plane.c cursor.c) + ags.c flood.c cg.c ecopy.c alpha_plane.c cursor.c) # Network target_sources(xsystem35 PRIVATE diff --git a/src/antialiase.c b/src/antialiase.c deleted file mode 100644 index aa7e6e4..0000000 --- a/src/antialiase.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * antialiase.c make antialiased pattern - * - * Copyright (C) 1997-1998 Masaki Chikama (Wren) - * 1998- - * - * 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 - * -*/ -/* $Id: antialiase.c,v 1.3 2001/03/19 12:18:39 chikama Exp $ */ - -#include -#include -#include - -#include "portab.h" - -static void memadd(BYTE *s, BYTE *d, int w, int h) { - int x, y; - - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) { - *d += *s; - *(d+1) += *s; - *(d+2) += *s; - *(d+w+2) += *s; - *(d+w+1+2) += (*s * 16); - *(d+w+1+2) += *s; - *(d+w+w+4) += *s; - *(d+w+w+1+4) += *s; - *(d+w+w+2+4) += *s; - d++; s++; - } - d+=2; - } -} - -static void memmul(BYTE *s, int mul, int pixel) { - while(pixel--) { - *s = min(255, (*s) * mul); s++; - } -} - -void aa_make(BYTE *data, int w, int h, int bytes_per_line) { - int y; - BYTE *b, *_b, *__b; - BYTE *d = data; - - b = calloc(w*h, sizeof(BYTE)); - _b = calloc((w+2)*(h+2), sizeof(BYTE)); - - __b = b; - for (y = 0; y < h; y++) { - memcpy(__b, d, w); - __b+=w; d+=bytes_per_line; - } - memadd(b, _b, w, h); - memmul(_b, 16, (w+2)*(h+2)); - - d = data; - __b = _b; - for (y = 0; y < h+2; y++) { - memcpy(d, __b, w+2); - __b += (w+2); d+=bytes_per_line; - } - free(b); - free(_b); -} diff --git a/src/antialiase.h b/src/antialiase.h deleted file mode 100644 index ea97cbd..0000000 --- a/src/antialiase.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * antialiase.h make antialiased pattern - * - * Copyright (C) 1997-1998 Masaki Chikama (Wren) - * 1998- - * - * 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 - * -*/ -/* $Id: antialiase.h,v 1.2 2000/09/10 10:39:46 chikama Exp $ */ - -#ifndef __ANTIALIASE__ -#define __ANTIALIASE__ - -#include "portab.h" - -extern void aa_make(BYTE *b, int w, int h, int bytes_per_line); - -#endif /* !__ANTIALIASE__ */