mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Remove unused antialiase.c
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* antialiase.c make antialiased pattern
|
||||
*
|
||||
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
|
||||
* 1998- <masaki-c@is.aist-nara.ac.jp>
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* antialiase.h make antialiased pattern
|
||||
*
|
||||
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
|
||||
* 1998- <masaki-c@is.aist-nara.ac.jp>
|
||||
*
|
||||
* 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__ */
|
||||
Reference in New Issue
Block a user