Remove glib dependency

This commit is contained in:
kichikuou
2017-02-18 18:16:32 +09:00
parent b7d0f88a83
commit 245bc1212c
157 changed files with 1119 additions and 1546 deletions
-7
View File
@@ -91,7 +91,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -249,13 +248,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
Vendored
-1
View File
@@ -1433,7 +1433,6 @@ m4_include([macros/argz.m4])
m4_include([macros/esd.m4])
m4_include([macros/freetype2.m4])
m4_include([macros/gettext.m4])
m4_include([macros/glib-2.0.m4])
m4_include([macros/gtk-2.0.m4])
m4_include([macros/iconv.m4])
m4_include([macros/lib-ld.m4])
+3 -3
View File
@@ -39,9 +39,6 @@
/* Define this if you have freetype2 installed */
#undef ENABLE_FT2
/* Define this if you have glib >= 2.0.0 */
#undef ENABLE_GLIB
/* Define this if you have gtk+ >= 2.0.0 */
#undef ENABLE_GTK
@@ -225,6 +222,9 @@
/* Define this if you have libXxf86vm installed */
#undef HAVE_XF86VMODE
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* joystick device */
#undef JOY_DEVICE
Vendored
+245 -336
View File
@@ -668,6 +668,8 @@ SDL
SDL2_CONFIG
SDL_LIBS
SDL_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
SRC_MIDI
SRC_CDROM
SRC_AUDIO
@@ -681,14 +683,6 @@ HAVE_GTK_FALSE
HAVE_GTK_TRUE
GTK_LIBS
GTK_CFLAGS
GLIB_COMPILE_RESOURCES
GLIB_MKENUMS
GOBJECT_QUERY
GLIB_GENMARSHAL
GLIB_LIBS
GLIB_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
ZLIB_LIBS
X_EXTRA_LIBS
@@ -872,7 +866,6 @@ with_libiconv_prefix
enable_nls
with_libintl_prefix
with_x
enable_glibtest
enable_gtk
enable_gtktest
enable_audio
@@ -1570,7 +1563,6 @@ Optional Features:
--enable-ltdl-install install libltdl
--disable-rpath do not hardcode runtime library paths
--disable-nls do not use Native Language Support
--disable-glibtest do not try to compile and run a test GLIB program
--enable-gtk Enable gtk-based widget default=yes
--disable-gtktest do not try to compile and run a test GTK+ program
--enable-audio=mode_list Enable audio (Specify comma separated mode list):
@@ -15504,363 +15496,160 @@ fi
# Check whether --enable-glibtest was given.
if test "${enable_glibtest+set}" = set; then :
enableval=$enable_glibtest;
else
enable_glibtest=yes
fi
pkg_config_args=glib-2.0
for module in .
do
case "$module" in
gmodule)
pkg_config_args="$pkg_config_args gmodule-2.0"
;;
gmodule-no-export)
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
;;
gobject)
pkg_config_args="$pkg_config_args gobject-2.0"
;;
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
gio*)
pkg_config_args="$pkg_config_args $module-2.0"
;;
esac
am_save_CPPFLAGS="$CPPFLAGS"
for element in $INCICONV; do
haveit=
for x in $CPPFLAGS; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
eval x=\"$x\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
if test "X$x" = "X$element"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
fi
done
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
$as_echo_n "checking for iconv... " >&6; }
if ${am_cv_func_iconv+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.16
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
no_glib=""
if test "x$PKG_CONFIG" = x ; then
no_glib=yes
PKG_CONFIG=no
fi
min_glib_version=2.0.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
if test x$PKG_CONFIG != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
enable_glibtest=no
fi
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
:
else
no_glib=yes
fi
fi
if test x"$no_glib" = x ; then
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
rm -f conf.glibtest
if test "$cross_compiling" = yes; then :
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <iconv.h>
int
main ()
{
unsigned int major, minor, micro;
fclose (fopen ("conf.glibtest", "w"));
if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
else
no_glib=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
$as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; }
$as_echo "#define ENABLE_GLIB 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <glib.h>
#include <stdio.h>
int
main ()
{
return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
else
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
GLIB_COMPILE_RESOURCES=""
as_fn_error $? "*** check for glib-2.x failed ***" "$LINENO" 5
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
int
main ()
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
$as_echo "$am_cv_func_iconv" >&6; }
if test "$am_cv_func_iconv" = yes; then
$as_echo "#define HAVE_ICONV 1" >>confdefs.h
fi
if test "$am_cv_lib_iconv" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
$as_echo_n "checking how to link with libiconv... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
$as_echo "$LIBICONV" >&6; }
else
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
if test "$am_cv_func_iconv" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
$as_echo_n "checking for iconv declaration... " >&6; }
if ${am_cv_proto_iconv+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
rm -f conf.glibtest
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
am_cv_proto_iconv_arg1=""
else
am_cv_proto_iconv_arg1="const"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
}$am_cv_proto_iconv" >&5
$as_echo "${ac_t:-
}$am_cv_proto_iconv" >&6; }
cat >>confdefs.h <<_ACEOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
_ACEOF
fi
# Check whether --enable-gtk was given.
@@ -17098,6 +16887,126 @@ fi
if test "x$enable_sdl" = xyes ; then
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
# Check whether --with-sdl-prefix was given.
if test "${with_sdl_prefix+set}" = set; then :
withval=$with_sdl_prefix; sdl_prefix="$withval"
+2 -22
View File
@@ -142,29 +142,9 @@ dnl [enable_pkgc=yes])
dnl fi
dnl
dnl check glib
dnl check iconv
dnl
AM_PATH_GLIB_2_0(2.0.0,
AC_DEFINE(ENABLE_GLIB,1,[Define this if you have glib >= 2.0.0]),
AC_MSG_ERROR(*** check for glib-2.x failed ***)
)
dnl if test x"$enable_pkgc" = "xno"; then
dnl AM_PATH_GLIB(1.2.0,
dnl AC_DEFINE(ENABLE_GLIB,1,[Define this if you have glib >= 1.2.0]),must_gtk=yes)
dnl if test x"$must_gtk" = "xyes"; then
dnl AC_MSG_RESULT("May be 1.0.x ?. You can't be disable gtk")
dnl fi
dnl else
dnl AC_ARG_WITH(glib-target,
dnl [ --with-glib-target target glib [default=glib]],
dnl [glibtarget="glib$withval"],[glibtarget="glib"])
dnl PKG_CHECK_MODULES(BASE_DEPENDENCEIS, $glibtarget >= 1.2.0)
dnl GLIB_CFLAGS="`$PKGCONFIG --cflags $glibtarget`"
dnl GLIB_LIBS="`$PKGCONFIG --libs $glibtarget`"
dnl AC_DEFINE(ENABLE_GLIB,1,[Define this if you have glib >= 1.2.0])
dnl fi
AM_ICONV
dnl
dnl check for gtk
-1
View File
@@ -8,7 +8,6 @@ MACROS= \
esd.m4 \
freetype2.m4 \
gettext.m4 \
glib-2.0.m4 \
glibc21.m4 \
gtk-2.0.m4 \
iconv.m4 \
-8
View File
@@ -86,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -164,13 +163,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -334,7 +327,6 @@ MACROS = \
esd.m4 \
freetype2.m4 \
gettext.m4 \
glib-2.0.m4 \
glibc21.m4 \
gtk-2.0.m4 \
iconv.m4 \
-211
View File
@@ -1,211 +0,0 @@
# Configure paths for GLIB
# Owen Taylor 1997-2001
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
dnl gthread, or gio is specified in MODULES, pass to pkg-config
dnl
AC_DEFUN([AM_PATH_GLIB_2_0],
[dnl
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
pkg_config_args=glib-2.0
for module in . $4
do
case "$module" in
gmodule)
pkg_config_args="$pkg_config_args gmodule-2.0"
;;
gmodule-no-export)
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
;;
gobject)
pkg_config_args="$pkg_config_args gobject-2.0"
;;
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
gio*)
pkg_config_args="$pkg_config_args $module-2.0"
;;
esac
done
PKG_PROG_PKG_CONFIG([0.16])
no_glib=""
if test "x$PKG_CONFIG" = x ; then
no_glib=yes
PKG_CONFIG=no
fi
min_glib_version=ifelse([$1], ,2.0.0,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
if test x$PKG_CONFIG != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
enable_glibtest=no
fi
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
:
else
no_glib=yes
fi
fi
if test x"$no_glib" = x ; then
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
unsigned int major, minor, micro;
fclose (fopen ("conf.glibtest", "w"));
if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
GLIB_COMPILE_RESOURCES=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GOBJECT_QUERY)
AC_SUBST(GLIB_MKENUMS)
AC_SUBST(GLIB_COMPILE_RESOURCES)
rm -f conf.glibtest
])
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+6 -7
View File
@@ -28,7 +28,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -75,9 +74,9 @@ static int sf_free_one(int no) {
s = suf[no];
if (s == NULL) return NG;
if (s->pixel) g_free(s->pixel);
if (s->alpha) g_free(s->alpha);
g_free(s);
if (s->pixel) free(s->pixel);
if (s->alpha) free(s->alpha);
free(s);
suf[no] = NULL;
pre_freesurfno = no;
@@ -91,9 +90,9 @@ static int sf_free_all() {
for (i = 1; i < MAX_SURFACE; i++) {
if (suf[i] == NULL) continue;
s = suf[i];
if (s->pixel) g_free(s->pixel);
if (s->alpha) g_free(s->alpha);
g_free(s);
if (s->pixel) free(s->pixel);
if (s->alpha) free(s->alpha);
free(s);
suf[i] = NULL;
}
+2 -2
View File
@@ -1,11 +1,11 @@
pkglib_LTLIBRARIES = Gpx.la
Gpx_la_LDFLAGS = -module -export-dynamic -avoid-version
Gpx_la_LIBADD = ../lib/libgraph.la @GLIB_LIBS@
Gpx_la_LIBADD = ../lib/libgraph.la
Gpx_la_SOURCES = Gpx.c \
effectcopy.c
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -9
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -408,11 +401,11 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = Gpx.la
Gpx_la_LDFLAGS = -module -export-dynamic -avoid-version
Gpx_la_LIBADD = ../lib/libgraph.la @GLIB_LIBS@
Gpx_la_LIBADD = ../lib/libgraph.la
Gpx_la_SOURCES = Gpx.c \
effectcopy.c
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
-7
View File
@@ -86,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -224,13 +223,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -250,13 +249,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+2 -2
View File
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = NIGHTDLL.la
NIGHTDLL_la_LDFLAGS = -module -export-dynamic -avoid-version
NIGHTDLL_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la @GLIB_LIBS@
NIGHTDLL_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la
NIGHTDLL_la_SOURCES = \
NIGHTDLL.c \
nt_scenario.c \
@@ -17,7 +17,7 @@ NIGHTDLL_la_SOURCES = \
nt_graph.c \
nt_sound.c
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -9
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -247,13 +246,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -411,7 +404,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = NIGHTDLL.la
NIGHTDLL_la_LDFLAGS = -module -export-dynamic -avoid-version
NIGHTDLL_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la @GLIB_LIBS@
NIGHTDLL_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la
NIGHTDLL_la_SOURCES = \
NIGHTDLL.c \
nt_scenario.c \
@@ -427,7 +420,7 @@ NIGHTDLL_la_SOURCES = \
nt_graph.c \
nt_sound.c
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
-1
View File
@@ -1,7 +1,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+1 -2
View File
@@ -2,7 +2,6 @@
#define __NIGHT_H__
#include "config.h"
#include <glib.h>
#include "portab.h"
#include "graphics.h"
#include "surface.h"
@@ -61,7 +60,7 @@ struct _night {
void (* cbmove)(agsevent_t *);
void (* cbrelease)(agsevent_t *);
} msg;
//GSList *strreplace;
//SList *strreplace;
// sel
int selmode;
-1
View File
@@ -1,7 +1,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+2 -3
View File
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -356,7 +355,7 @@ static void set_align(char *msg, sprite_t *sp, int wSize) {
while (*msg) {
if (*msg == '\n') {
line++;
maxchar = MAX(maxchar, c);
maxchar = max(maxchar, c);
c = 0;
msg++;
continue;
@@ -364,7 +363,7 @@ static void set_align(char *msg, sprite_t *sp, int wSize) {
msg++; c++;
}
maxchar = MAX(maxchar, c);
maxchar = max(maxchar, c);
line++;
sp->u.msg.dspcur.x = (sp->cursize.width - (maxchar * wSize/2)) /2;
sp->u.msg.dspcur.y = (sp->cursize.height - (line * (wSize+2))) /2;
+12 -13
View File
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "nact.h"
@@ -78,14 +77,14 @@ cginfo_t *scg_loadcg_no(int no, boolean refinc) {
return cgs[no];
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_LINKED;
i->no = no;
i->refcnt = (refinc ? 1 : 0);
i->sf = sf_loadcg_no(no -1);
if (i->sf == NULL) {
WARNING("load fail (%d)\n", no -1);
g_free(i);
free(i);
return NULL;
}
@@ -100,7 +99,7 @@ int scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int
spcg_assert_no(wNumCG);
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumCG;
i->refcnt = 1;
@@ -129,7 +128,7 @@ int scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY)
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_REVERSE;
i->no = wNumCG;
i->refcnt = 0;
@@ -157,7 +156,7 @@ int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_STRETCH;
i->no = wNumCG;
i->refcnt = 0;
@@ -186,7 +185,7 @@ int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlen
blendcg = scg_loadcg_no(wNumBlendCG, FALSE);
if (basecg == NULL || blendcg == NULL) return NG;
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -222,7 +221,7 @@ int scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText)
font->sel_font(FONT_GOTHIC, wSize);
glyph = font->get_glyph(cText);
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumCG;
i->refcnt = 0;
@@ -261,7 +260,7 @@ int scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs,
font->sel_font(FONT_GOTHIC, wSize);
glyph = font->get_glyph(s);
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumCG;
i->refcnt = 0;
@@ -289,7 +288,7 @@ int scg_copy(int wNumDstCG, int wNumSrcCG) {
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -316,7 +315,7 @@ int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeigh
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -357,7 +356,7 @@ int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int w
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -442,7 +441,7 @@ int scg_free_cgobj(cginfo_t *cg) {
cgs[cg->no] = NULL;
}
g_free(cg);
free(cg);
return OK;
}
+7 -7
View File
@@ -1,6 +1,6 @@
// 拡大縮小
static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
surface_t *dst = g_new0(surface_t, 1);
surface_t *dst = calloc(1, sizeof(surface_t));
float a1, a2, xd, yd;
int sw, sh;
int *row, *col;
@@ -16,10 +16,10 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
dst->has_alpha = src->has_alpha;
if (src->has_pixel) {
dst->pixel = g_malloc(dh * dst->bytes_per_line);
dst->pixel = malloc(dh * dst->bytes_per_line);
}
if (src->has_alpha) {
dst->alpha = g_malloc(dw * dh);
dst->alpha = malloc(dw * dh);
}
@@ -30,10 +30,10 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
a1 = (float)sw / (float)dw;
a2 = (float)sh / (float)dh;
row = g_new(int, dw);
row = malloc(sizeof(int) * dw);
// 1おおきくして初期化しないと col[dw-1]とcol[dw]が同じになる
// 可能性がある。
col = g_new0(int, dh +1);
col = calloc(dh +1, sizeof(int));
if (mirror & 1) {
/* 上下反転 added by tajiri@wizard */
@@ -110,8 +110,8 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
}
}
g_free(row);
g_free(col);
free(row);
free(col);
return dst;
}
+11 -10
View File
@@ -23,10 +23,11 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "variable.h"
// 文字列置換用
@@ -43,7 +44,7 @@ static int idxmax; // stack pointerの最大
// 文字列置き換え用 (表示時にon-the-flyで変換して表示)
#define REPLACEBUFSIZE 3000
static char repbuf[2][REPLACEBUFSIZE];
static GSList *strreplace;
static SList *strreplace;
static char *replacesrc;
static char *replacedst;
@@ -51,7 +52,7 @@ static char *replacedst;
* 文字列変数スタックの初期化
*/
int sstr_init() {
stack = g_new(char *, DEFSTACKSIZE);
stack = malloc(sizeof(char *) * DEFSTACKSIZE);
idx = 0;
idxmax = DEFSTACKSIZE;
return OK;
@@ -63,11 +64,11 @@ int sstr_init() {
*/
int sstr_push(char *str) {
if (idx >= idxmax) {
stack = g_renew(char *, stack, idx*2);
stack = realloc(stack, sizeof(char *) * idx*2);
idxmax = idx*2;
}
stack[idx++] = g_strdup(str);
stack[idx++] = strdup(str);
return OK;
}
@@ -80,7 +81,7 @@ int sstr_pop(char *str, int maxlen) {
if (idx == 0) return NG;
strncpy(str, stack[--idx], maxlen);
g_free(stack[idx]);
free(stack[idx]);
return OK;
}
@@ -95,10 +96,10 @@ int sstr_regist_replace(char *sstr, char *dstr) {
if (sstr == dstr) return NG;
ex = g_new(strexchange_t, 1);
ex = malloc(sizeof(strexchange_t));
ex->src = strdup(sstr);
ex->dst = strdup(dstr);
strreplace = g_slist_append(strreplace, ex);
strreplace = slist_append(strreplace, ex);
return OK;
}
@@ -123,7 +124,7 @@ int sstr_num2str(int strno, int fig, int nzeropad, int num) {
}
// 文字列の置き換え処理
static void replacestr_cb(gpointer data, gpointer userdata) {
static void replacestr_cb(void* data, void* userdata) {
strexchange_t *ex = (strexchange_t *)data;
char *start, *next, *out;
@@ -155,7 +156,7 @@ char *sstr_replacestr(char *msg) {
strncpy(repbuf[0], msg, REPLACEBUFSIZE);
replacesrc = repbuf[0];
replacedst = repbuf[1];
g_slist_foreach(strreplace, replacestr_cb, NULL);
slist_foreach(strreplace, replacestr_cb, NULL);
return (repbuf[0][0] == '\0') ? repbuf[1] : repbuf[0];
}
+3 -4
View File
@@ -1,6 +1,5 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "sprite.h"
@@ -12,7 +11,7 @@
sprite_t *sp_new(int no, int cg1, int cg2, int cg3, int type) {
sprite_t *sp;
sp = g_new0(sprite_t, 1);
sp = calloc(1, sizeof(sprite_t));
sp->no = no;
sp->type = type;
@@ -50,7 +49,7 @@ sprite_t *sp_new(int no, int cg1, int cg2, int cg3, int type) {
sprite_t *sp_msg_new(int no, int x, int y, int width, int height) {
sprite_t *sp;
sp = g_new0(sprite_t, 1);
sp = calloc(1, sizeof(sprite_t));
sp->no = no;
sp->type = SPRITE_MSG;
@@ -80,7 +79,7 @@ void sp_free(sprite_t *sp) {
sf_free(sp->u.msg.canvas);
}
g_free(sp);
free(sp);
}
void sp_set_show(sprite_t *sp, boolean show) {
+1 -3
View File
@@ -2,8 +2,6 @@
#ifndef __SPRITE_H__
#define __SPRITE_H__
#include <glib.h>
#include "portab.h"
#include "surface.h"
#include "graphics.h"
@@ -128,7 +126,7 @@ extern int sp_draw_wall(sprite_t *sp, MyRectangle *r);
/* in nt_sprite_draw.c */
extern int sp_draw(sprite_t *sp, MyRectangle *r);
extern int sp_draw2(sprite_t *sp, cginfo_t *cg, MyRectangle *r);
extern void sp_draw_dmap(gpointer data, gpointer userdata);
extern void sp_draw_dmap(void* data, void* userdata);
extern int sp_draw_scg(sprite_t *sp, MyRectangle *r);
/* in nt_sprite_eupdate.c */
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+9 -10
View File
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -110,7 +109,7 @@ static void ec7_cb(surface_t *sfsrc, surface_t *sfdst) {
}
t = ecp.oldstep;
while(t < curstep) {
for (i = 0; i < MIN(t + 1, EC7DELTA); i++) {
for (i = 0; i < min(t + 1, EC7DELTA); i++) {
y = i + EC7DELTA * (t - i);
if (y < 0 || y >= sfsrc->height) continue;
gr_copy(sf0, 0, y,
@@ -138,7 +137,7 @@ static void ec8_cb(surface_t *sfsrc, surface_t *sfdst) {
}
t = ecp.oldstep;
while(t < curstep) {
for (i = 0; i < MIN(t + 1, EC8DELTA); i++) {
for (i = 0; i < min(t + 1, EC8DELTA); i++) {
x = i + EC8DELTA * (t - i);
if (x < 0 || x >= sfsrc->width) continue;
gr_copy(sf0, x, 0,
@@ -157,7 +156,7 @@ static void ec9_cb(surface_t *sfsrc, surface_t *sfdst) {
int curstep, maxstep;
int i, t, x, y;
maxstep = MAX(sfsrc->height / EC9DELTA + EC9DELTA,
maxstep = max(sfsrc->height / EC9DELTA + EC9DELTA,
sfsrc->width / EC9DELTA + EC9DELTA);
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
@@ -169,13 +168,13 @@ static void ec9_cb(surface_t *sfsrc, surface_t *sfdst) {
}
t = ecp.oldstep;
while(t < curstep) {
for (i = 0; i < MIN(t + 1, EC9DELTA); i++) {
for (i = 0; i < min(t + 1, EC9DELTA); i++) {
y = i + EC9DELTA * (t - i);
if (y < 0 || y >= sfsrc->height) continue;
gr_copy(sf0, 0, y,
sfdst, 0, y, sfsrc->width, 1);
}
for (i = 0; i < MIN(t + 1, EC9DELTA); i++) {
for (i = 0; i < min(t + 1, EC9DELTA); i++) {
x = i + EC9DELTA * (t - i);
if (x < 0 || x >= sfsrc->width) continue;
gr_copy(sf0, x, 0,
@@ -201,8 +200,8 @@ static void ec12_cb(surface_t *src, surface_t *dst) {
usleep(0); return;
}
st_i = MAX(0, curstep - EC12DELTA + 1);
ed_i = MIN(src->height -1, curstep);
st_i = max(0, curstep - EC12DELTA + 1);
ed_i = min(src->height -1, curstep);
l = ed_i - st_i + 1;
for (j = st_i; j < ed_i; j++) {
gre_Blend(sf0, 0, j, src, 0, j, dst, 0, j, src->width, 1, curstep - j);
@@ -232,8 +231,8 @@ static void ec13_cb(surface_t *src, surface_t *dst) {
usleep(0); return;
}
st_i = MAX(0, curstep - EC13DELTA + 1);
ed_i = MIN(src->height -1, curstep);
st_i = max(0, curstep - EC13DELTA + 1);
ed_i = min(src->height -1, curstep);
l = ed_i - st_i + 1;
for (j = st_i; j < ed_i; j++) {
gre_Blend(sf0, 0, dyy - j, src, 0, syy1-j, dst, 0, syy2-j, src->width, 1, curstep - j);
+18 -18
View File
@@ -24,10 +24,10 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "counter.h"
#include "ags.h"
#include "graphics.h"
@@ -37,15 +37,15 @@
#include "sprite.h"
// スプライト再描画間の間に変更のあったスプライトの領域の和
static GSList *updatearea;
static SList *updatearea;
// 再描画するスプライトのリスト
static GSList *updatelist;
static SList *updatelist;
static void intersection(MyRectangle *r1, MyRectangle *r2, MyRectangle *rst);
static void disjunction(gpointer region, gpointer data);
static void disjunction(void* region, void* data);
static MyRectangle get_updatearea();
static void do_update_each(gpointer data, gpointer userdata);
static void do_update_each(void* data, void* userdata);
// 領域1と領域2の積を計算
static void intersection(MyRectangle *r1, MyRectangle *r2, MyRectangle *rst) {
@@ -61,7 +61,7 @@ static void intersection(MyRectangle *r1, MyRectangle *r2, MyRectangle *rst) {
}
// 領域1と領域2をすべて含む矩形領域を計算
static void disjunction(gpointer region, gpointer data) {
static void disjunction(void* region, void* data) {
MyRectangle *r1 = (MyRectangle *)region;
MyRectangle *r2 = (MyRectangle *)data;
int x1, x2, y1, y2;
@@ -96,9 +96,9 @@ static MyRectangle get_updatearea() {
MyRectangle rsf0 = {0, 0, sf0->width, sf0->height};
MyRectangle result;
g_slist_foreach(updatearea, disjunction, &clip);
slist_foreach(updatearea, disjunction, &clip);
g_slist_free(updatearea);
slist_free(updatearea);
updatearea = NULL;
// surface0との領域の積をとる
@@ -112,7 +112,7 @@ static MyRectangle get_updatearea() {
}
// updatelist に登録してあるすべてのスプライトを更新
static void do_update_each(gpointer data, gpointer userdata) {
static void do_update_each(void* data, void* userdata) {
sprite_t *sp = (sprite_t *)data;
MyRectangle *r = (MyRectangle *)userdata;
@@ -135,7 +135,7 @@ int sp_update_all(boolean syncscreen) {
// updatelistに登録してあるスプライトを再描画
// updatelistはスプライトの番号順に並んでいる
g_slist_foreach(updatelist, do_update_each, &r);
slist_foreach(updatelist, do_update_each, &r);
// このルーチンが呼ばれるときはスプライトはドラッグ中ではない
@@ -163,7 +163,7 @@ int sp_update_clipped() {
}
// 更新領域に入っているスプライトの再描画
g_slist_foreach(updatelist, do_update_each, &r);
slist_foreach(updatelist, do_update_each, &r);
// 更新領域を Window に転送
ags_updateArea(r.x, r.y, r.width, r.height);
@@ -181,13 +181,13 @@ int sp_updateme(sprite_t *sp) {
if (sp == NULL) return NG;
if (sp->cursize.width == 0 || sp->cursize.height == 0) return NG;
r = g_new(MyRectangle, 1);
r = malloc(sizeof(MyRectangle));
r->x = sp->cur.x;
r->y = sp->cur.y;
r->width = sp->cursize.width;
r->height = sp->cursize.height;
updatearea = g_slist_append(updatearea, r);
updatearea = slist_append(updatearea, r);
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
r->x, r->y, sp->no, r->width, r->height);
@@ -209,13 +209,13 @@ int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
if (sp == NULL) return NG;
if (w == 0 || h == 0) return NG;
r = g_new(MyRectangle, 1);
r = malloc(sizeof(MyRectangle));
r->x = sp->cur.x + x;
r->y = sp->cur.y + y;
r->width = w;
r->height = h;
updatearea = g_slist_append(updatearea, r);
updatearea = slist_append(updatearea, r);
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
r->x, r->y, sp->no, r->width, r->height);
@@ -224,7 +224,7 @@ int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
}
// スプライトの番号順に更新するためにリストに順番に要れるためのcallbck
static gint compare_spriteno_smallfirst(gconstpointer a, gconstpointer b) {
static int compare_spriteno_smallfirst(const void *a, const void *b) {
sprite_t *sp1 = (sprite_t *)a;
sprite_t *sp2 = (sprite_t *)b;
@@ -238,11 +238,11 @@ static gint compare_spriteno_smallfirst(gconstpointer a, gconstpointer b) {
}
void sp_add_updatelist(sprite_t *sp) {
updatelist = g_slist_insert_sorted(updatelist, sp, compare_spriteno_smallfirst);
updatelist = slist_insert_sorted(updatelist, sp, compare_spriteno_smallfirst);
}
void sp_remove_updatelist(sprite_t *sp) {
updatelist = g_slist_remove(updatelist, sp);
updatelist = slist_remove(updatelist, sp);
}
// デフォルトの壁紙update
+2 -2
View File
@@ -2,9 +2,9 @@ pkglib_LTLIBRARIES = NightDemonDemo.la
NightDemonDemo_la_LDFLAGS = -module -export-dynamic -avoid-version
NightDemonDemo_la_SOURCES = NightDemonDemo.c ndd.c jpeg2surface.c
NightDemonDemo_la_LIBADD = ../lib/libgraph.la ../lib/libalk.la @GLIB_LIBS@ @JPEG_LIBS@
NightDemonDemo_la_LIBADD = ../lib/libgraph.la ../lib/libalk.la @JPEG_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@ @JPEG_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@ @JPEG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -9
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -246,13 +245,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -411,8 +404,8 @@ top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = NightDemonDemo.la
NightDemonDemo_la_LDFLAGS = -module -export-dynamic -avoid-version
NightDemonDemo_la_SOURCES = NightDemonDemo.c ndd.c jpeg2surface.c
NightDemonDemo_la_LIBADD = ../lib/libgraph.la ../lib/libalk.la @GLIB_LIBS@ @JPEG_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@ @JPEG_CFLAGS@
NightDemonDemo_la_LIBADD = ../lib/libgraph.la ../lib/libalk.la @JPEG_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @JPEG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/modules/lib -I$(top_srcdir)/modules/lib \
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <jpeglib.h>
#include "portab.h"
+1 -2
View File
@@ -22,7 +22,6 @@
/* $Id: ndd.c,v 1.2 2003/11/09 15:06:12 chikama Exp $ */
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "ags.h"
@@ -54,7 +53,7 @@ extern surface_t *jpeg2surface(FILE *fp, int offset);
// ALKファイルの登録
void ndd_init(char *files[], int n) {
int i;
ndd.fn = g_new(char *, n);
ndd.fn = malloc(sizeof(char *) * n);
for (i = 1; i <= n; i++) {
ndd.fn[i] = files[i];
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+2 -2
View File
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = SACT.la
SACT_la_LDFLAGS = -module -export-dynamic -avoid-version
SACT_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la @GLIB_LIBS@
SACT_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la
SACT_la_SOURCES = \
SACT.c \
sactcg.c \
@@ -32,7 +32,7 @@ SACT_la_SOURCES = \
sprite_xmenu.c
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -9
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -251,13 +250,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -415,7 +408,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = SACT.la
SACT_la_LDFLAGS = -module -export-dynamic -avoid-version
SACT_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la @GLIB_LIBS@
SACT_la_LIBADD = ../lib/libgraph.la ../lib/libdrawtext.la
SACT_la_SOURCES = \
SACT.c \
sactcg.c \
@@ -445,7 +438,7 @@ SACT_la_SOURCES = \
screen_quake.c \
sprite_xmenu.c
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
-1
View File
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+13 -13
View File
@@ -26,8 +26,8 @@
#include "config.h"
#include <glib.h>
#include "portab.h"
#include "list.h"
#include "graphics.h"
#include "surface.h"
#include "sacttimer.h"
@@ -154,7 +154,7 @@ struct _sprite {
boolean focused; // forcusを得ているか
boolean pressed; // このsprite上でマウスが押されているか
GSList *expsp; // 説明スプライトのリスト
SList *expsp; // 説明スプライトのリスト
// move command 用パラメータ
struct {
@@ -201,7 +201,7 @@ struct _sprite {
// メッセージスプライト
struct {
GSList *buf; // 表示する文字のリスト
SList *buf; // 表示する文字のリスト
surface_t *canvas; // 文字を描画するsurface
MyPoint dspcur; // 現在の表示位置
} msg;
@@ -217,10 +217,10 @@ struct _sact {
// スプライト全体
sprite_t *sp[SPRITEMAX];
GSList *sp_zhide; // Zキーで消すスプライトのリスト
GSList *sp_quake; // Quakeで揺らすスプライトのリスト
SList *sp_zhide; // Zキーで消すスプライトのリスト
SList *sp_quake; // Quakeで揺らすスプライトのリスト
GSList *updatelist; // 再描画するスプライトのリスト
SList *updatelist; // 再描画するスプライトのリスト
cginfo_t *cg[CGMAX]; // cgまたはCG_xxで作った CG
@@ -228,8 +228,8 @@ struct _sact {
MyPoint origin;
// 文字列 push/pop/replce 用
GSList *strstack;
GSList *strreplace;
SList *strstack;
SList *strreplace;
char *strreplacesrc;
char *strreplacedst;
@@ -253,12 +253,12 @@ struct _sact {
} sel;
// event listener
GSList *eventlisteners;
GSList *teventlisteners;
GSList *teventremovelist;
SList *eventlisteners;
SList *teventlisteners;
SList *teventremovelist;
// MOVEするスプライトのリスト
GSList *movelist;
SList *movelist;
int movestarttime; // 一斉に移動を開始するための開始時間
int movecurtime;
@@ -299,7 +299,7 @@ struct _sact {
// バックログ
boolean logging;
GList *log;
List *log;
};
typedef struct _sact sact_t;
+2 -3
View File
@@ -31,7 +31,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -88,8 +87,8 @@ int smask_init(char *path) {
am->fd = fd;
am->datanum = LittleEndian_getDW(adr, 0);
am->no = g_new(int, am->datanum);
am->offset = g_new(int, am->datanum);
am->no = malloc(sizeof(int) * am->datanum);
am->offset = malloc(sizeof(int) * am->datanum);
for (i = 0; i < am->datanum; i++) {
am->no[i] = LittleEndian_getDW(adr, 16 + i * 16);
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+12 -13
View File
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "nact.h"
@@ -76,14 +75,14 @@ cginfo_t *scg_loadcg_no(int no, boolean refinc) {
return sact.cg[no];
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_LINKED;
i->no = no;
i->refcnt = (refinc ? 1 : 0);
i->sf = sf_loadcg_no(no -1);
if (i->sf == NULL) {
WARNING("load fail (%d)\n", no -1);
g_free(i);
free(i);
return NULL;
}
@@ -99,7 +98,7 @@ int scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int
spcg_assert_no(wNumCG);
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumCG;
i->refcnt = 0;
@@ -128,7 +127,7 @@ int scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY)
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_REVERSE;
i->no = wNumCG;
i->refcnt = 0;
@@ -156,7 +155,7 @@ int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_STRETCH;
i->no = wNumCG;
i->refcnt = 0;
@@ -185,7 +184,7 @@ int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlen
blendcg = scg_loadcg_no(wNumBlendCG, FALSE);
if (basecg == NULL || blendcg == NULL) return NG;
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -221,7 +220,7 @@ int scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, int wText) {
font->sel_font(FONT_GOTHIC, wSize);
glyph = font->get_glyph(v_str(wText -1));
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumCG;
i->refcnt = 0;
@@ -260,7 +259,7 @@ int scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs,
font->sel_font(FONT_GOTHIC, wSize);
glyph = font->get_glyph(s);
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumCG;
i->refcnt = 0;
@@ -288,7 +287,7 @@ int scg_copy(int wNumDstCG, int wNumSrcCG) {
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -315,7 +314,7 @@ int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeigh
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -356,7 +355,7 @@ int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int w
return NG;
}
i = g_new(cginfo_t, 1);
i = malloc(sizeof(cginfo_t));
i->type = CG_SET;
i->no = wNumDstCG;
i->refcnt = 0;
@@ -441,7 +440,7 @@ int scg_free_cgobj(cginfo_t *cg) {
sact.cg[cg->no] = NULL;
}
g_free(cg);
free(cg);
return OK;
}
+7 -7
View File
@@ -1,6 +1,6 @@
// 拡大縮小
static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
surface_t *dst = g_new0(surface_t, 1);
surface_t *dst = calloc(1, sizeof(surface_t));
float a1, a2, xd, yd;
int sw, sh;
int *row, *col;
@@ -16,10 +16,10 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
dst->has_alpha = src->has_alpha;
if (src->has_pixel) {
dst->pixel = g_malloc(dh * dst->bytes_per_line);
dst->pixel = malloc(dh * dst->bytes_per_line);
}
if (src->has_alpha) {
dst->alpha = g_malloc(dw * dh);
dst->alpha = malloc(dw * dh);
}
@@ -30,10 +30,10 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
a1 = (float)sw / (float)dw;
a2 = (float)sh / (float)dh;
row = g_new(int, dw);
row = malloc(sizeof(int) * dw);
// 1おおきくして初期化しないと col[dw-1]とcol[dw]が同じになる
// 可能性がある。
col = g_new0(int, dh +1);
col = calloc(dh +1, sizeof(int));
if (mirror & 1) {
/* 上下反転 added by tajiri@wizard */
@@ -110,8 +110,8 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
}
}
g_free(row);
g_free(col);
free(row);
free(col);
return dst;
}
-1
View File
@@ -22,7 +22,6 @@
/* $Id: sactcrypto.c,v 1.1 2003/04/22 16:29:52 chikama Exp $ */
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "variable.h"
+18 -18
View File
@@ -26,10 +26,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "counter.h"
#include "menu.h"
#include "imput.h"
@@ -59,19 +59,19 @@ static void draw_log() {
int i, y = 0, len;
int cur = curline;
char pinfo[256];
GList *node;
List *node;
// canvas clear
memset(chr->pixel, 0, chr->bytes_per_line * chr->height);
// ページ位置情報
len = g_snprintf(pinfo, sizeof(pinfo) -1, "%d/%d", curline, g_list_length(sact.log));
len = snprintf(pinfo, sizeof(pinfo) -1, "%d/%d", curline, list_length(sact.log));
dt_setfont(FONT_GOTHIC, FONTSIZEINDEX);
dt_drawtext(chr, sf0->width - FONTSIZEINDEX *len /2, 0, pinfo);
// 表示始め位置
node = g_list_nth(sact.log, g_list_length(sact.log) - curline);
node = list_nth(sact.log, list_length(sact.log) - curline);
for (i = 0; i < LOGLINENUM; i++) {
char *str, *streuc;
if (cur <= 0) continue;
@@ -91,7 +91,7 @@ static void draw_log() {
}
y += FONTSIZE;
cur--;
node = g_list_next(node);
node = list_next(node);
}
gr_copy_bright(sf0, 0, 0, back, 0, 0, sf0->width, sf0->height, 128);
@@ -104,12 +104,12 @@ static void draw_log() {
int sblog_start(void) {
// 説明文章を追加
sact.log = g_list_append(sact.log, "\n");
sact.log = g_list_append(sact.log, LOGMSG1);
sact.log = g_list_append(sact.log, LOGMSG2);
sact.log = g_list_append(sact.log, LOGMSG3);
sact.log = g_list_append(sact.log, LOGMSG4);
sact.log = g_list_append(sact.log, "\n");
sact.log = list_append(sact.log, "\n");
sact.log = list_append(sact.log, LOGMSG1);
sact.log = list_append(sact.log, LOGMSG2);
sact.log = list_append(sact.log, LOGMSG3);
sact.log = list_append(sact.log, LOGMSG4);
sact.log = list_append(sact.log, "\n");
back = sf_dup(sf0);
chr = sf_create_surface(sf0->width, sf0->height, 8);
@@ -119,7 +119,7 @@ int sblog_start(void) {
}
int sblog_end(void) {
GList *node;
List *node;
int i;
sf_copyall(sf0, back);
@@ -130,33 +130,33 @@ int sblog_end(void) {
// 説明文章を削除
for (i = 0; i < 6; i++) {
node = g_list_last(sact.log);
sact.log = g_list_remove(sact.log, node->data);
node = list_last(sact.log);
sact.log = list_remove(sact.log, node->data);
}
return OK;
}
int sblog_pageup(void) {
curline = MIN(g_list_length(sact.log), curline + (LOGLINENUM -1));
curline = min(list_length(sact.log), curline + (LOGLINENUM -1));
draw_log();
return OK;
}
int sblog_pagedown(void) {
curline = MAX(1, curline - (LOGLINENUM -1));
curline = max(1, curline - (LOGLINENUM -1));
draw_log();
return OK;
}
int sblog_pagepre(void) {
curline = MAX(1, curline - 1);
curline = max(1, curline - 1);
draw_log();
return OK;
}
int sblog_pagenext(void) {
curline = MIN(g_list_length(sact.log), curline + 1);
curline = min(list_length(sact.log), curline + 1);
draw_log();
return OK;
}
-1
View File
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+8 -7
View File
@@ -23,10 +23,11 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "variable.h"
#include "sact.h"
@@ -39,7 +40,7 @@ static int idxmax; // stack pointerの最大
* 文字列変数スタックの初期化
*/
int sstr_init() {
stack = g_new(char *, DEFSTACKSIZE);
stack = malloc(sizeof(char *) * DEFSTACKSIZE);
idx = 0;
idxmax = DEFSTACKSIZE;
return OK;
@@ -51,11 +52,11 @@ int sstr_init() {
*/
int sstr_push(int strno) {
if (idx >= idxmax) {
stack = g_renew(char *, stack, idx*2);
stack = realloc(stack, sizeof(char *) * idx*2);
idxmax = idx*2;
}
stack[idx++] = g_strdup(v_str(strno -1));
stack[idx++] = strdup(v_str(strno -1));
return OK;
}
@@ -68,7 +69,7 @@ int sstr_pop(int strno) {
if (idx == 0) return NG;
v_strcpy(strno -1, stack[--idx]);
g_free(stack[idx]);
free(stack[idx]);
return OK;
}
@@ -83,10 +84,10 @@ int sstr_regist_replace(int sstrno, int dstrno) {
if (sstrno == dstrno) return NG;
ex = g_new(strexchange_t, 1);
ex = malloc(sizeof(strexchange_t));
ex->src = strdup(v_str(sstrno -1));
ex->dst = strdup(v_str(dstrno -1));
sact.strreplace = g_slist_append(sact.strreplace, ex);
sact.strreplace = slist_append(sact.strreplace, ex);
return OK;
}
-1
View File
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+23 -23
View File
@@ -25,10 +25,10 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "ngraph.h"
#include "ags.h"
#include "nact.h"
@@ -38,26 +38,26 @@
#include "sactcg.h"
#include "sactsound.h"
static gint compare_spriteno_smallfirst(gconstpointer a, gconstpointer b);
static int compare_spriteno_smallfirst(const void *a, const void *b);
#define sp_assert_no(no) G_STMT_START{ \
#define sp_assert_no(no) do { \
if ((no) >= SPRITEMAX) { \
WARNING("no is too large (should be %d < %d)\n", no, SPRITEMAX); \
return NG; \
} \
}G_STMT_END
} while (0)
#define sp_assert_null(no) G_STMT_START{ \
#define sp_assert_null(no) do { \
if (sact.sp[no] == NULL) { \
WARNING("sprite %d is NULL\n", no); \
return NG; \
} \
}G_STMT_END
} while (0)
// スプライトの番号順に更新するためにリストに順番に要れるためのcallbck
static gint compare_spriteno_smallfirst(gconstpointer a, gconstpointer b) {
static int compare_spriteno_smallfirst(const void *a, const void *b) {
sprite_t *sp1 = (sprite_t *)a;
sprite_t *sp2 = (sprite_t *)b;
@@ -105,7 +105,7 @@ int sp_init() {
// いろいろな理由から全てのスプライトをあらかじめ作成しておく
for (i = 0; i < SPRITEMAX; i++) {
sact.sp[i] = g_new0(sprite_t, 1);
sact.sp[i] = calloc(1, sizeof(sprite_t));
sact.sp[i]->no = i;
sact.sp[i]->type = SPRITE_NONE;
sact.sp[i]->show = FALSE;
@@ -115,7 +115,7 @@ int sp_init() {
sp_set_wall_paper(0);
// 壁紙を updateリストに追加
sact.updatelist = g_slist_append(sact.updatelist, sact.sp[0]);
sact.updatelist = slist_append(sact.updatelist, sact.sp[0]);
return OK;
}
@@ -140,7 +140,7 @@ int sp_new(int no, int cg1, int cg2, int cg3, int type) {
}
// 更新リストに登録
sact.updatelist = g_slist_insert_sorted(sact.updatelist, sp, compare_spriteno_smallfirst);
sact.updatelist = slist_insert_sorted(sact.updatelist, sp, compare_spriteno_smallfirst);
sp->type = type;
sp->no = no;
@@ -207,7 +207,7 @@ int sp_new_msg(int no, int x, int y, int width, int height) {
sp_free(no);
}
// 更新リストに登録
sact.updatelist = g_slist_insert_sorted(sact.updatelist, sp, compare_spriteno_smallfirst);
sact.updatelist = slist_insert_sorted(sact.updatelist, sp, compare_spriteno_smallfirst);
sp->type = SPRITE_MSG;
@@ -282,7 +282,7 @@ int sp_free(int no) {
// 移動開始していない場合はリストから削除
if (!sp->move.moving) {
sact.movelist = g_slist_remove(sact.movelist, sp);
sact.movelist = slist_remove(sact.movelist, sp);
}
// CGオブジェクトの削除
@@ -297,14 +297,14 @@ int sp_free(int no) {
// 説明スプライトの削除
// ここで消しちゃまずいかも
g_slist_free(sp->expsp);
slist_free(sp->expsp);
sp->expsp = NULL;
if (sp->type == SPRITE_MSG) {
g_slist_free(sp->u.msg.buf);
slist_free(sp->u.msg.buf);
sf_free(sp->u.msg.canvas);
}
sact.updatelist = g_slist_remove(sact.updatelist, sp);
sact.updatelist = slist_remove(sact.updatelist, sp);
// SACT.Numeral_XXX は残しておく
{
@@ -371,7 +371,7 @@ int sp_set_move(int wNum, int wX, int wY) {
// moveするスプライトリストに登録
// 実際に move を開始するのは ~SP_DRAW(sp_update_all)が呼ばれたとき
sact.movelist = g_slist_append(sact.movelist, sp);
sact.movelist = slist_append(sact.movelist, sp);
return OK;
}
@@ -407,13 +407,13 @@ int sp_add_zkey_hidesprite(int wNum) {
// シェルクレイルでまずいのがあったので中止
// if (sp->type == SPRITE_NONE) return NG;
sact.sp_zhide = g_slist_append(sact.sp_zhide, sp);
sact.sp_zhide = slist_append(sact.sp_zhide, sp);
return OK;
}
// 上で登録したスプライトの削除
int sp_clear_zkey_hidesprite_all() {
g_slist_free(sact.sp_zhide);
slist_free(sact.sp_zhide);
sact.sp_zhide = NULL;
return OK;
}
@@ -452,13 +452,13 @@ int sp_thaw_sprite(int wNum) {
int sp_add_quakesprite(int wNum) {
sp_assert_no(wNum);
sact.sp_quake = g_slist_append(sact.sp_quake, sact.sp[wNum]);
sact.sp_quake = slist_append(sact.sp_quake, sact.sp[wNum]);
return OK;
}
// 上で登録したスプライトの削除
int sp_clear_quakesprite_all() {
g_slist_free(sact.sp_quake);
slist_free(sact.sp_quake);
sact.sp_quake = NULL;
return OK;
}
@@ -649,7 +649,7 @@ int sp_num_getspan(int nNum, int *vSpan) {
// すべての説明スプライトの削除
int sp_exp_clear() {
GSList *node;
SList *node;
for (node = sact.updatelist; node; node = node->next) {
sprite_t *sp = (sprite_t *)node->data;
@@ -669,7 +669,7 @@ int sp_exp_add(int nNumSP1, int nNumSP2) {
swsp = sact.sp[nNumSP1];
expsp = sact.sp[nNumSP2];
swsp->expsp = g_slist_append(swsp->expsp, expsp);
swsp->expsp = slist_append(swsp->expsp, expsp);
return OK;
}
@@ -682,7 +682,7 @@ int sp_exp_del(int nNum) {
sp = sact.sp[nNum];
g_slist_free(sp->expsp);
slist_free(sp->expsp);
sp->expsp = NULL;
return OK;
+2 -3
View File
@@ -24,7 +24,6 @@
#ifndef __SPRITE_H__
#define __SPRITE_H__
#include <glib.h>
#include "sact.h"
#define DEFAULT_UPDATE sp_draw
@@ -80,7 +79,7 @@ extern int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h);
// in sprite_draw.c
extern int sp_draw(sprite_t *sf);
extern int sp_draw2(sprite_t *sf, cginfo_t *cg);
extern void sp_draw_dmap(gpointer data, gpointer userdata);
extern void sp_draw_dmap(void* data, void* userdata);
// in sprite_msg.c
@@ -109,7 +108,7 @@ extern void spev_remove_teventlistener(sprite_t *sp);
extern void spev_main();
// in sprite_move.c
extern void spev_move_setup(gpointer data, gpointer userdata);
extern void spev_move_setup(void* data, void* userdata);
extern void spev_move_waitend(sprite_t *sp, int dx, int dy, int time);
extern void spev_wait4moving_sp();
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
+1 -2
View File
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -146,7 +145,7 @@ int sp_draw2(sprite_t *sp, cginfo_t *cg) {
/*
スプライトキー待ち用のdepthmap を更新
*/
void sp_draw_dmap(gpointer data, gpointer userdata) {
void sp_draw_dmap(void* data, void* userdata) {
sprite_t *sp = (sprite_t *)data;
cginfo_t *cg;
surface_t update;
+9 -10
View File
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -152,7 +151,7 @@ static void ec7_cb(surface_t *sfsrc, surface_t *sfdst) {
}
t = ecp.oldstep;
while(t < curstep) {
for (i = 0; i < MIN(t + 1, EC7DELTA); i++) {
for (i = 0; i < min(t + 1, EC7DELTA); i++) {
y = i + EC7DELTA * (t - i);
if (y < 0 || y >= sfsrc->height) continue;
gr_copy(sf0, 0, y,
@@ -180,7 +179,7 @@ static void ec8_cb(surface_t *sfsrc, surface_t *sfdst) {
}
t = ecp.oldstep;
while(t < curstep) {
for (i = 0; i < MIN(t + 1, EC8DELTA); i++) {
for (i = 0; i < min(t + 1, EC8DELTA); i++) {
x = i + EC8DELTA * (t - i);
if (x < 0 || x >= sfsrc->width) continue;
gr_copy(sf0, x, 0,
@@ -199,7 +198,7 @@ static void ec9_cb(surface_t *sfsrc, surface_t *sfdst) {
int curstep, maxstep;
int i, t, x, y;
maxstep = MAX(sfsrc->height / EC9DELTA + EC9DELTA,
maxstep = max(sfsrc->height / EC9DELTA + EC9DELTA,
sfsrc->width / EC9DELTA + EC9DELTA);
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
@@ -211,13 +210,13 @@ static void ec9_cb(surface_t *sfsrc, surface_t *sfdst) {
}
t = ecp.oldstep;
while(t < curstep) {
for (i = 0; i < MIN(t + 1, EC9DELTA); i++) {
for (i = 0; i < min(t + 1, EC9DELTA); i++) {
y = i + EC9DELTA * (t - i);
if (y < 0 || y >= sfsrc->height) continue;
gr_copy(sf0, 0, y,
sfdst, 0, y, sfsrc->width, 1);
}
for (i = 0; i < MIN(t + 1, EC9DELTA); i++) {
for (i = 0; i < min(t + 1, EC9DELTA); i++) {
x = i + EC9DELTA * (t - i);
if (x < 0 || x >= sfsrc->width) continue;
gr_copy(sf0, x, 0,
@@ -243,8 +242,8 @@ static void ec12_cb(surface_t *src, surface_t *dst) {
usleep(0); return;
}
st_i = MAX(0, curstep - EC12DELTA + 1);
ed_i = MIN(src->height -1, curstep);
st_i = max(0, curstep - EC12DELTA + 1);
ed_i = min(src->height -1, curstep);
l = ed_i - st_i + 1;
for (j = st_i; j < ed_i; j++) {
gre_Blend(sf0, 0, j, src, 0, j, dst, 0, j, src->width, 1, curstep - j);
@@ -274,8 +273,8 @@ static void ec13_cb(surface_t *src, surface_t *dst) {
usleep(0); return;
}
st_i = MAX(0, curstep - EC13DELTA + 1);
ed_i = MIN(src->height -1, curstep);
st_i = max(0, curstep - EC13DELTA + 1);
ed_i = min(src->height -1, curstep);
l = ed_i - st_i + 1;
for (j = st_i; j < ed_i; j++) {
gre_Blend(sf0, 0, dyy - j, src, 0, syy1-j, dst, 0, syy2-j, src->width, 1, curstep - j);
+14 -15
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -76,8 +75,8 @@
*/
static void cb_focused_swsp(gpointer s, gpointer data);
static void cb_defocused_swsp(gpointer s, gpointer data);
static void cb_focused_swsp(void* s, void* data);
static void cb_defocused_swsp(void* s, void* data);
static int cb_focused(sprite_t *sp);
static int cb_defocused(sprite_t *sp);
static void cb_waitkey_simple(agsevent_t *e);
@@ -88,7 +87,7 @@ static void cb_waitkey_selection(agsevent_t *e);
フォーカスを得たスプライトに説明スプライトが登録されていた場合の
説明スプライトの表示ON
*/
static void cb_focused_swsp(gpointer s, gpointer data) {
static void cb_focused_swsp(void* s, void* data) {
sprite_t *sp = (sprite_t *)s;
int *update = (int *)data;
boolean oldstate = sp->show;
@@ -106,7 +105,7 @@ static void cb_focused_swsp(gpointer s, gpointer data) {
フォーカスを得たスプライトに説明スプライトが登録されていた場合の
説明スプライトの表示OFF
*/
static void cb_defocused_swsp(gpointer s, gpointer data) {
static void cb_defocused_swsp(void* s, void* data) {
sprite_t *sp = (sprite_t *)s;
int *update = (int *)data;
boolean oldstate = sp->show;
@@ -121,7 +120,7 @@ static void cb_defocused_swsp(gpointer s, gpointer data) {
}
// zkey hide off
static void cb_focused_zkey(gpointer s, gpointer data) {
static void cb_focused_zkey(void* s, void* data) {
sprite_t *sp = (sprite_t *)s;
int *update = (int *)data;
boolean oldstate = sp->show;
@@ -134,7 +133,7 @@ static void cb_focused_zkey(gpointer s, gpointer data) {
}
// zkey hide on
static void cb_defocused_zkey(gpointer s, gpointer data) {
static void cb_defocused_zkey(void* s, void* data) {
sprite_t *sp = (sprite_t *)s;
int *update = (int *)data;
boolean oldstate = sp->show;
@@ -215,7 +214,7 @@ static void cb_waitkey_simple(agsevent_t *e) {
if (e->d3 == KEY_Z) {
cur = get_high_counter(SYSTEMCOUNTER_MSEC);
if (!sact.zhiding) {
g_slist_foreach(sact.sp_zhide, cb_defocused_zkey, &update);
slist_foreach(sact.sp_zhide, cb_defocused_zkey, &update);
sact.zhiding = TRUE;
sact.zdooff = TRUE;
sact.zofftime = cur;
@@ -236,7 +235,7 @@ static void cb_waitkey_simple(agsevent_t *e) {
break;
}
if (sact.zhiding) {
g_slist_foreach(sact.sp_zhide, cb_focused_zkey, &update);
slist_foreach(sact.sp_zhide, cb_focused_zkey, &update);
sact.zhiding = FALSE;
}
// fall through
@@ -246,7 +245,7 @@ static void cb_waitkey_simple(agsevent_t *e) {
case KEY_Z:
cur = get_high_counter(SYSTEMCOUNTER_MSEC);
if (500 < (cur - sact.zofftime) || !sact.zdooff) {
g_slist_foreach(sact.sp_zhide, cb_focused_zkey, &update);
slist_foreach(sact.sp_zhide, cb_focused_zkey, &update);
sact.zhiding = FALSE;
}
break;
@@ -272,7 +271,7 @@ static void cb_waitkey_simple(agsevent_t *e) {
WaitKeySpriteのcallback
*/
static void cb_waitkey_sprite(agsevent_t *e) {
GSList *node;
SList *node;
sprite_t *focused_sp = NULL; // focus を得ている sprite
sprite_t *defocused_sp = NULL; // focus を失った sprite
int update = 0;
@@ -347,7 +346,7 @@ static void cb_waitkey_sprite(agsevent_t *e) {
if (defocused_sp) {
sprite_t *sp = defocused_sp;
if (sp->expsp) {
g_slist_foreach(sp->expsp, cb_defocused_swsp, &update);
slist_foreach(sp->expsp, cb_defocused_swsp, &update);
}
}
@@ -355,7 +354,7 @@ static void cb_waitkey_sprite(agsevent_t *e) {
if (focused_sp) {
sprite_t *sp = focused_sp;
if (sp->expsp) {
g_slist_foreach(sp->expsp, cb_focused_swsp, &update);
slist_foreach(sp->expsp, cb_focused_swsp, &update);
}
}
}
@@ -475,13 +474,13 @@ void spev_callback(agsevent_t *e) {
*/
void spev_add_eventlistener(sprite_t *sp, int (*cb)(sprite_t *, agsevent_t *)) {
sp->eventcb = cb;
sact.eventlisteners = g_slist_append(sact.eventlisteners, sp);
sact.eventlisteners = slist_append(sact.eventlisteners, sp);
}
/*
上で登録した callback の削除
*/
void spev_remove_eventlistener(sprite_t *sp) {
sact.eventlisteners = g_slist_remove(sact.eventlisteners, sp);
sact.eventlisteners = slist_remove(sact.eventlisteners, sp);
}
+3 -4
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "ags.h"
@@ -32,7 +31,7 @@
#include "sprite.h"
#include "sactsound.h"
static void cb_defocused_swsp(gpointer s, gpointer data);
static void cb_defocused_swsp(void* s, void* data);
static int eventCB_GET(sprite_t *sp, agsevent_t *e);
static void cb_remove(sprite_t *sp);
@@ -40,7 +39,7 @@ static void cb_remove(sprite_t *sp);
説明スプライトの消去
dragが始まったら説明スプライトは消去する
*/
static void cb_defocused_swsp(gpointer s, gpointer data) {
static void cb_defocused_swsp(void* s, void* data) {
sprite_t *sp = (sprite_t *)s;
int *update = (int *)data;
boolean oldstate = sp->show;
@@ -78,7 +77,7 @@ static int eventCB_GET(sprite_t *sp, agsevent_t *e) {
// 説明スプライトがある場合は、それを非表示にする
if (sp->expsp) {
g_slist_foreach(sp->expsp, cb_defocused_swsp, &update);
slist_foreach(sp->expsp, cb_defocused_swsp, &update);
}
// SpriteSoundがあれば、それを鳴らす
+4 -3
View File
@@ -24,10 +24,11 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <limits.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "counter.h"
#include "ags.h"
#include "nact.h"
@@ -122,7 +123,7 @@ int sp_keywait(int *vOK, int *vRND, int *vD01, int *vD02, int *vD03, int timeout
sp_update_all(TRUE);
// depthmap を準備
g_slist_foreach(sact.updatelist, sp_draw_dmap, NULL);
slist_foreach(sact.updatelist, sp_draw_dmap, NULL);
sact.waittype = KEYWAIT_SPRITE;
sact.waitkey = -1;
@@ -146,7 +147,7 @@ int sp_keywait(int *vOK, int *vRND, int *vD01, int *vD02, int *vD03, int timeout
// 終了時間の計算
curtime = get_high_counter(SYSTEMCOUNTER_MSEC);
endtime = timeout < 0 ? G_MAXINT: (curtime + timeout * 10);
endtime = timeout < 0 ? INT_MAX : (curtime + timeout * 10);
// スプライトキー待ちメイン
while (!waitcond(endtime)) {
+6 -7
View File
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <math.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -61,7 +60,7 @@ static void move_drain(sprite_t *sp) {
sp_updateme(sp);
// 後で、movelist から外してもらうための処理
sact.teventremovelist = g_slist_append(sact.teventremovelist, sp);
sact.teventremovelist = slist_append(sact.teventremovelist, sp);
sp->move.moving = FALSE;
sp->move.time = 0; // 移動時間の初期化
@@ -111,7 +110,7 @@ static int move_cb(sprite_t *sp, agsevent_t *e) {
@param data: sprite
@param userdata: 未使用
*/
void spev_move_setup(gpointer data, gpointer userdata) {
void spev_move_setup(void* data, void* userdata) {
sprite_t *sp = (sprite_t *)data;
// 非表示のものは移動しない(いいのかな)
@@ -157,10 +156,10 @@ void spev_move_waitend(sprite_t *sp, int dx, int dy, int time) {
sp->move.speed = time;
sp->move.time = -1;
sact.movelist = g_slist_append(sact.movelist, sp);
sact.movelist = slist_append(sact.movelist, sp);
sact.movestarttime = get_high_counter(SYSTEMCOUNTER_MSEC);
g_slist_foreach(sact.movelist, spev_move_setup, NULL);
g_slist_free(sact.movelist);
slist_foreach(sact.movelist, spev_move_setup, NULL);
slist_free(sact.movelist);
sact.movelist = NULL;
while (sp->move.moving) {
@@ -172,7 +171,7 @@ void spev_move_waitend(sprite_t *sp, int dx, int dy, int time) {
全ての移動中のスプライトが移動完了するのを待つ
*/
void spev_wait4moving_sp() {
GSList *node;
SList *node;
// 移動中のスプライトは sact.updatelist にあるはずだから
// そのなかのスプライトについて、移動中かどうかのフラグをチェック
+5 -6
View File
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -49,7 +48,7 @@ struct markinfo {
};
static boolean is_messagesprite(int wNum);
static void replacestr_cb(gpointer data, gpointer userdata);
static void replacestr_cb(void* data, void* userdata);
static char *replacestr(char *msg);
static void update_mark(sprite_t *sp, cginfo_t *cg);
static int setupmark(int wNum1, int wNum2, struct markinfo *minfo);
@@ -81,7 +80,7 @@ static boolean is_messagesprite(int wNum) {
}
// 文字列の置き換え処理
static void replacestr_cb(gpointer data, gpointer userdata) {
static void replacestr_cb(void* data, void* userdata) {
strexchange_t *ex = (strexchange_t *)data;
char *start, *next, *out;
@@ -113,7 +112,7 @@ static char *replacestr(char *msg) {
strncpy(repbuf[0], msg, REPLACEBUFSIZE);
replacesrc = repbuf[0];
replacedst = repbuf[1];
g_slist_foreach(sact.strreplace, replacestr_cb, NULL);
slist_foreach(sact.strreplace, replacestr_cb, NULL);
return (repbuf[0][0] == '\0') ? repbuf[1] : repbuf[0];
}
@@ -387,7 +386,7 @@ void smsg_clear(int wNum) {
sp_updateme(sp);
if (sact.logging) {
sact.log = g_list_append(sact.log, g_strdup("\n"));
sact.log = list_append(sact.log, strdup("\n"));
}
}
@@ -553,7 +552,7 @@ static void append_to_log(char *msg) {
static void sactlog_newline() {
if (sact.logging) {
if (sact.msgbuf2[0] == '\0') return;
sact.log = g_list_append(sact.log, g_strdup(sact.msgbuf2));
sact.log = list_append(sact.log, strdup(sact.msgbuf2));
sact.msgbuf2[0] = '\0';
}
}
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "ags.h"
+2 -2
View File
@@ -24,10 +24,10 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "imput.h"
#include "sact.h"
#include "surface.h"
@@ -49,7 +49,7 @@
int sp_quake_sprite(int wType, int wAmplitudeX, int wAmplitudeY, int wCount, int cancel) {
int edtime, curtime;
int i = 0, key;
GSList *node;
SList *node;
edtime = wCount * 10 + get_high_counter(SYSTEMCOUNTER_MSEC);
+3 -4
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "nact.h"
@@ -264,7 +263,7 @@ void ssel_clear() {
int i;
for (i = 0; i < SEL_ELEMENT_MAX; i++) {
g_free(sact.sel.elem[i]);
free(sact.sel.elem[i]);
sact.sel.elem[i] = NULL;
}
}
@@ -280,10 +279,10 @@ void ssel_add(int nString, int wI) {
return;
}
if (sact.sel.elem[wI] != NULL) {
g_free(sact.sel.elem[wI]);
free(sact.sel.elem[wI]);
}
sact.sel.elem[wI] = g_strdup(v_str(nString -1));
sact.sel.elem[wI] = strdup(v_str(nString -1));
}
/*
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "ags.h"
+6 -6
View File
@@ -24,10 +24,10 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "list.h"
#include "menu.h"
#include "imput.h"
#include "nact.h"
@@ -59,7 +59,7 @@ static void tevent_callback(agsevent_t *e);
タイマイベント callback メイン
*/
static void tevent_callback(agsevent_t *e) {
GSList *node;
SList *node;
int update = 0;
// SP_MOVE の同期移動のためのカウンタの読み込み
@@ -86,9 +86,9 @@ static void tevent_callback(agsevent_t *e) {
for (node = sact.teventremovelist; node; node = node->next) {
sprite_t *sp = (sprite_t *)node->data;
if (sp == NULL) continue;
sact.teventlisteners = g_slist_remove(sact.teventlisteners, sp);
sact.teventlisteners = slist_remove(sact.teventlisteners, sp);
}
g_slist_free(sact.teventremovelist);
slist_free(sact.teventremovelist);
sact.teventremovelist = NULL;
}
@@ -99,7 +99,7 @@ static void tevent_callback(agsevent_t *e) {
*/
void spev_add_teventlistener(sprite_t *sp, int (*cb)(sprite_t *, agsevent_t *)) {
sp->teventcb = cb;
sact.teventlisteners = g_slist_append(sact.teventlisteners, sp);
sact.teventlisteners = slist_append(sact.teventlisteners, sp);
}
/*
@@ -107,7 +107,7 @@ void spev_add_teventlistener(sprite_t *sp, int (*cb)(sprite_t *, agsevent_t *))
@param sp: 削除するスプライト
*/
void spev_remove_teventlistener(sprite_t *sp) {
sact.teventlisteners = g_slist_remove(sact.teventlisteners, sp);
sact.teventlisteners = slist_remove(sact.teventlisteners, sp);
}
/*
+15 -16
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -37,12 +36,12 @@
#include "sprite.h"
// スプライト再描画間の間に変更のあったスプライトの領域の和
static GSList *updatearea;
static SList *updatearea;
static void intersection(MyRectangle *r1, MyRectangle *r2, MyRectangle *rst);
static void disjunction(gpointer region, gpointer data);
static void disjunction(void* region, void* data);
static void get_updatearea();
static void do_update_each(gpointer data, gpointer userdata);
static void do_update_each(void* data, void* userdata);
// 領域1と領域2の積を計算
static void intersection(MyRectangle *r1, MyRectangle *r2, MyRectangle *rst) {
@@ -58,7 +57,7 @@ static void intersection(MyRectangle *r1, MyRectangle *r2, MyRectangle *rst) {
}
// 領域1と領域2をすべて含む矩形領域を計算
static void disjunction(gpointer region, gpointer data) {
static void disjunction(void* region, void* data) {
MyRectangle *r1 = (MyRectangle *)region;
MyRectangle *r2 = (MyRectangle *)data;
int x1, x2, y1, y2;
@@ -92,9 +91,9 @@ static void get_updatearea() {
MyRectangle clip = {0, 0, 0, 0};
MyRectangle rsf0 = {0, 0, sf0->width, sf0->height};
g_slist_foreach(updatearea, disjunction, &clip);
slist_foreach(updatearea, disjunction, &clip);
g_slist_free(updatearea);
slist_free(updatearea);
updatearea = NULL;
// surface0との領域の積をとる
@@ -108,7 +107,7 @@ static void get_updatearea() {
}
// updatelist に登録してあるすべてのスプライトを更新
static void do_update_each(gpointer data, gpointer userdata) {
static void do_update_each(void* data, void* userdata) {
sprite_t *sp = (sprite_t *)data;
// 非表示の場合はなにもしない
@@ -132,8 +131,8 @@ int sp_update_all(boolean syncscreen) {
if (sact.movelist) {
// 移動開始時間を合わせる
sact.movestarttime = get_high_counter(SYSTEMCOUNTER_MSEC);
g_slist_foreach(sact.movelist, spev_move_setup, NULL);
g_slist_free(sact.movelist);
slist_foreach(sact.movelist, spev_move_setup, NULL);
slist_free(sact.movelist);
sact.movelist = NULL;
}
@@ -145,7 +144,7 @@ int sp_update_all(boolean syncscreen) {
// updatelistに登録してあるスプライトを再描画
// updatelistはスプライトの番号順に並んでいる
g_slist_foreach(sact.updatelist, do_update_each, NULL);
slist_foreach(sact.updatelist, do_update_each, NULL);
// このルーチンが呼ばれるときはスプライトはドラッグ中ではない
@@ -175,7 +174,7 @@ int sp_update_clipped() {
}
// 更新領域に入っているスプライトの再描画
g_slist_foreach(sact.updatelist, do_update_each, NULL);
slist_foreach(sact.updatelist, do_update_each, NULL);
// drag中のスプライトを最後に描画
if (sact.draggedsp) {
@@ -198,13 +197,13 @@ int sp_updateme(sprite_t *sp) {
if (sp == NULL) return NG;
if (sp->cursize.width == 0 || sp->cursize.height == 0) return NG;
r = g_new(MyRectangle, 1);
r = malloc(sizeof(MyRectangle));
r->x = sp->cur.x;
r->y = sp->cur.y;
r->width = sp->cursize.width;
r->height = sp->cursize.height;
updatearea = g_slist_append(updatearea, r);
updatearea = slist_append(updatearea, r);
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
r->x, r->y, sp->no, r->width, r->height);
@@ -226,13 +225,13 @@ int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
if (sp == NULL) return NG;
if (w == 0 || h == 0) return NG;
r = g_new(MyRectangle, 1);
r = malloc(sizeof(MyRectangle));
r->x = sp->cur.x + x;
r->y = sp->cur.y + y;
r->width = w;
r->height = h;
updatearea = g_slist_append(updatearea, r);
updatearea = slist_append(updatearea, r);
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
r->x, r->y, sp->no, r->width, r->height);
-1
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+1 -2
View File
@@ -2,9 +2,8 @@ pkglib_LTLIBRARIES = ShCalc.la
ShCalc_la_LDFLAGS = -module -export-dynamic -avoid-version
ShCalc_la_SOURCES = ShCalc.c
ShCalc_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -10
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -135,7 +134,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
ShCalc_la_DEPENDENCIES =
ShCalc_la_LIBADD =
am_ShCalc_la_OBJECTS = ShCalc.lo
ShCalc_la_OBJECTS = $(am_ShCalc_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -409,8 +402,7 @@ top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = ShCalc.la
ShCalc_la_LDFLAGS = -module -export-dynamic -avoid-version
ShCalc_la_SOURCES = ShCalc.c
ShCalc_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
+8 -8
View File
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
#include <stdint.h>
#include "portab.h"
#include "nact.h"
@@ -37,15 +37,15 @@
#include "randMT.h"
static int numbase;
static gint64 l_1000A0C8;
static gint64 l_1000A0D0;
static gint64 l_1000A0D8;
static int64_t l_1000A0C8;
static int64_t l_1000A0D0;
static int64_t l_1000A0D8;
static gint64 mul64(gint64 a1, gint64 a2) {
static int64_t mul64(int64_t a1, int64_t a2) {
return a1 * a2;
}
static gint64 div64(gint64 a1, gint64 a2) {
static int64_t div64(int64_t a1, int64_t a2) {
if (a1 == 0 || a2 == 0) return 0;
return a1 / a2;
@@ -91,7 +91,7 @@ void GetIntNum16(void) { /* 3 */
var:
*/
int *var = getCaliVariable();
gint64 i;
int64_t i;
i = div64(l_1000A0D8, numbase);
@@ -167,7 +167,7 @@ void DivIntNum16(void) { /* 11 */
var:
*/
int *var = getCaliVariable();
gint64 i;
int64_t i;
l_1000A0C8 = *var;
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+1 -2
View File
@@ -2,9 +2,8 @@ pkglib_LTLIBRARIES = ShPort.la
ShPort_la_LDFLAGS = -module -export-dynamic -avoid-version
ShPort_la_SOURCES = ShPort.c
ShPort_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -10
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -135,7 +134,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
ShPort_la_DEPENDENCIES =
ShPort_la_LIBADD =
am_ShPort_la_OBJECTS = ShPort.lo
ShPort_la_OBJECTS = $(am_ShPort_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -409,8 +402,7 @@ top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = ShPort.la
ShPort_la_LDFLAGS = -module -export-dynamic -avoid-version
ShPort_la_SOURCES = ShPort.c
ShPort_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
+1 -2
View File
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "nact.h"
@@ -88,7 +87,7 @@ void InitKeyStatus(void) {
}
if (keymap[no -1] == NULL) {
keymap[no -1] = g_new0(BYTE, 256);
keymap[no -1] = calloc(256, sizeof(BYTE));
} else {
memset(keymap[no -1], 0, 256);
}
+1 -2
View File
@@ -2,10 +2,9 @@ pkglib_LTLIBRARIES = ShSound.la
ShSound_la_LDFLAGS = -module -export-dynamic -avoid-version
ShSound_la_SOURCES = ShSound.c
ShSound_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+2 -10
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -135,7 +134,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
ShSound_la_DEPENDENCIES =
ShSound_la_LIBADD =
am_ShSound_la_OBJECTS = ShSound.lo
ShSound_la_OBJECTS = $(am_ShSound_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -409,8 +402,7 @@ top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = ShSound.la
ShSound_la_LDFLAGS = -module -export-dynamic -avoid-version
ShSound_la_SOURCES = ShSound.c
ShSound_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
-1
View File
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "xsystem35.h"
+3 -3
View File
@@ -21,7 +21,7 @@
*/
/* $Id: shpcmlib.c,v 1.2 2003/08/02 13:10:32 chikama Exp $ */
#include <stdio.h>
#include <glib.h>
#include <limits.h>
#include "portab.h"
#include "wavfile.h"
@@ -73,7 +73,7 @@ void pcmlib_fade_volume_memory(WAVFILE *wfile, int start, int range) {
if (wfile == NULL) return;
if (wfile->samples > (G_MAXINT / 100)) {
if (wfile->samples > (INT_MAX / 100)) {
wavtime = (wfile->samples / wfile->rate) * 100;
} else {
wavtime = (wfile->samples * 100) / wfile->rate;
@@ -119,7 +119,7 @@ WAVFILE *pcmlib_load_rw(int no) {
wfile = wav_getinfo(dfile->data);
if (wfile) {
void *p = g_malloc(wfile->bytes);
void *p = malloc(wfile->bytes);
memcpy(p, wfile->data, wfile->bytes);
wfile->data = (BYTE *)p;
wfile->dfile = NULL;
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+1 -4
View File
@@ -1,6 +1,5 @@
noinst_LTLIBRARIES = libgraph.la libalk.la libdrawtext.la
libgraph_la_LIBADD = @GLIB_LIBS@
libgraph_la_SOURCES = graph.c surface.c cg.c \
graph_expandcolor_blend.c \
graph_fillrect.c \
@@ -23,12 +22,10 @@ libgraph_la_SOURCES = graph.c surface.c cg.c \
gre_blend_screen.c
libalk_la_SOURCES = alk.c
libalk_la_LIBADD = @GLIB_LIBS@
libdrawtext_la_SOURCES = drawtext.c
libdrawtext_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
+4 -14
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -107,17 +106,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libalk_la_DEPENDENCIES =
libalk_la_LIBADD =
am_libalk_la_OBJECTS = alk.lo
libalk_la_OBJECTS = $(am_libalk_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libdrawtext_la_DEPENDENCIES =
libdrawtext_la_LIBADD =
am_libdrawtext_la_OBJECTS = drawtext.lo
libdrawtext_la_OBJECTS = $(am_libdrawtext_la_OBJECTS)
libgraph_la_DEPENDENCIES =
libgraph_la_LIBADD =
am_libgraph_la_OBJECTS = graph.lo surface.lo cg.lo \
graph_expandcolor_blend.lo graph_fillrect.lo \
graph_fillrect_amap.lo graph_fillrect_acolor.lo graph_rect.lo \
@@ -229,13 +228,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -392,7 +385,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libgraph.la libalk.la libdrawtext.la
libgraph_la_LIBADD = @GLIB_LIBS@
libgraph_la_SOURCES = graph.c surface.c cg.c \
graph_expandcolor_blend.c \
graph_fillrect.c \
@@ -415,10 +407,8 @@ libgraph_la_SOURCES = graph.c surface.c cg.c \
gre_blend_screen.c
libalk_la_SOURCES = alk.c
libalk_la_LIBADD = @GLIB_LIBS@
libdrawtext_la_SOURCES = drawtext.c
libdrawtext_la_LIBADD = @GLIB_LIBS@
AM_CFLAGS = @DEBUG_CFLAGS@ @GLIB_CFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
$(LTDLINCL) \
+5 -5
View File
@@ -26,13 +26,13 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -69,13 +69,13 @@ alk_t *alk_new(char *path) {
return NULL;
}
alk = g_new0(alk_t, 1);
alk = calloc(1, sizeof(alk_t));
alk->mapadr = adr;
alk->size = sbuf.st_size;
alk->fd = fd;
alk->datanum = LittleEndian_getDW(adr, 4);
alk->offset = g_new(int, alk->datanum);
alk->offset = malloc(sizeof(int) * alk->datanum);
for (i = 0; i < alk->datanum; i++) {
alk->offset[i] = LittleEndian_getDW(adr, 8 + i * 8);
@@ -89,8 +89,8 @@ int alk_free(alk_t *alk) {
munmap(alk->mapadr, alk->size);
close(alk->fd);
g_free(alk->offset);
g_free(alk);
free(alk->offset);
free(alk);
return OK;
}
+4 -5
View File
@@ -24,7 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include "portab.h"
#include "system.h"
@@ -115,10 +114,10 @@ surface_t *sf_getcg(void *b) {
break;
}
if (cg->pic) g_free(cg->pic);
if (cg->pal) g_free(cg->pal);
if (cg->alpha) g_free(cg->alpha);
g_free(cg);
if (cg->pic) free(cg->pic);
if (cg->pal) free(cg->pal);
if (cg->alpha) free(cg->alpha);
free(cg);
return sf;
}
+8 -9
View File
@@ -1,7 +1,6 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <string.h>
#include "portab.h"
@@ -90,8 +89,8 @@ boolean gr_clip(surface_t *ss, int *sx, int *sy, int *sw, int *sh, surface_t *ds
*sy -= *dy; *sh += *dy; *dy = 0;
}
*sw = MIN(ss->width - *sx, MIN(ds->width - *dx, *sw));
*sh = MIN(ss->height - *sy, MIN(ds->height - *dy, *sh));
*sw = min(ss->width - *sx, min(ds->width - *dx, *sw));
*sh = min(ss->height - *sy, min(ds->height - *dy, *sh));
if (*sw <= 0) {
WARNING("sw become <=0\n");
@@ -152,8 +151,8 @@ boolean gr_clip_xywh(surface_t *ss, int *sx, int *sy, int *sw, int *sh) {
*sh += *sy; *sy = 0;
}
*sw = MIN(ss->width - *sx, *sw);
*sh = MIN(ss->height - *sy, *sh);
*sw = min(ss->width - *sx, *sw);
*sh = min(ss->height - *sy, *sh);
if (*sw <= 0) {
WARNING("sw become <=0\n");
@@ -258,10 +257,10 @@ void gr_copy_stretch_blend_alpha_map(surface_t *dst, int dx, int dy, int dw, int
a1 = (float)sw / (float)dw;
a2 = (float)sh / (float)dh;
// src width と dst width が同じときに問題があるので+1
row = g_new0(int, dw+1);
row = calloc(dw+1, sizeof(int));
// 1おおきくして初期化しないと col[dw-1]とcol[dw]が同じになる
// 可能性がある。
col = g_new0(int, dh+1);
col = calloc(dh+1, sizeof(int));
for (yd = 0.0, y = 0; y < dh; y++) {
col[y] = yd; yd += a2;
@@ -341,8 +340,8 @@ void gr_copy_stretch_blend_alpha_map(surface_t *dst, int dx, int dy, int dw, int
}
}
g_free(row);
g_free(col);
free(row);
free(col);
}
#include "graph2.c"
+18 -19
View File
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "surface.h"
@@ -39,9 +38,9 @@ int gr_buller(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, in
r2 = PIXR15((*(yls-step)));
g2 = PIXG15((*(yls-step)));
b2 = PIXB15((*(yls-step)));
r3 = MIN(255, (r1+r2) >> 1);
g3 = MIN(255, (g1+g2) >> 1);
b3 = MIN(255, (b1+b2) >> 1);
r3 = min(255, (r1+r2) >> 1);
g3 = min(255, (g1+g2) >> 1);
b3 = min(255, (b1+b2) >> 1);
*yld = PIX15(r3, g3, b3);
yld++; yls++;
@@ -72,9 +71,9 @@ int gr_buller(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, in
r2 = PIXR16((*(yls-step)));
g2 = PIXG16((*(yls-step)));
b2 = PIXB16((*(yls-step)));
r3 = MIN(255, (r1+r2) >> 1);
g3 = MIN(255, (g1+g2) >> 1);
b3 = MIN(255, (b1+b2) >> 1);
r3 = min(255, (r1+r2) >> 1);
g3 = min(255, (g1+g2) >> 1);
b3 = min(255, (b1+b2) >> 1);
*yld = PIX16(r3, g3, b3);
yld++; yls++;
@@ -106,9 +105,9 @@ int gr_buller(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, in
r2 = PIXR24((*(yls-step)));
g2 = PIXG24((*(yls-step)));
b2 = PIXB24((*(yls-step)));
r3 = MIN(255, (r1+r2) >> 1);
g3 = MIN(255, (g1+g2) >> 1);
b3 = MIN(255, (b1+b2) >> 1);
r3 = min(255, (r1+r2) >> 1);
g3 = min(255, (g1+g2) >> 1);
b3 = min(255, (b1+b2) >> 1);
*yld = PIX24(r3, g3, b3);
yld++; yls++;
@@ -156,9 +155,9 @@ int gr_buller_v(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy,
r2 = PIXR15((*(yls+(y-step)*src->width)));
g2 = PIXG15((*(yls+(y-step)*src->width)));
b2 = PIXB15((*(yls+(y-step)*src->width)));
r3 = MIN(255, (r1+r2) >> 1);
g3 = MIN(255, (g1+g2) >> 1);
b3 = MIN(255, (b1+b2) >> 1);
r3 = min(255, (r1+r2) >> 1);
g3 = min(255, (g1+g2) >> 1);
b3 = min(255, (b1+b2) >> 1);
*(yld+y*dst->width) = PIX15(r3, g3, b3);
}
@@ -186,9 +185,9 @@ int gr_buller_v(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy,
r2 = PIXR16((*(yls+(y-step)*src->width)));
g2 = PIXG16((*(yls+(y-step)*src->width)));
b2 = PIXB16((*(yls+(y-step)*src->width)));
r3 = MIN(255, (r1+r2) >> 1);
g3 = MIN(255, (g1+g2) >> 1);
b3 = MIN(255, (b1+b2) >> 1);
r3 = min(255, (r1+r2) >> 1);
g3 = min(255, (g1+g2) >> 1);
b3 = min(255, (b1+b2) >> 1);
*(yld+y*dst->width) = PIX16(r3, g3, b3);
}
@@ -217,9 +216,9 @@ int gr_buller_v(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy,
r2 = PIXR24((*(yls+(y-step)*src->width)));
g2 = PIXG24((*(yls+(y-step)*src->width)));
b2 = PIXB24((*(yls+(y-step)*src->width)));
r3 = MIN(255, (r1+r2) >> 1);
g3 = MIN(255, (g1+g2) >> 1);
b3 = MIN(255, (b1+b2) >> 1);
r3 = min(255, (r1+r2) >> 1);
g3 = min(255, (g1+g2) >> 1);
b3 = min(255, (b1+b2) >> 1);
*(yld+y*dst->width) = PIX24(r3, g3, b3);
}
+1 -2
View File
@@ -1,6 +1,5 @@
// alpha map の飽和加算
#include <glib.h>
#include "portab.h"
#include "system.h"
#include "surface.h"
@@ -33,7 +32,7 @@ int gr_saturadd_alpha_map(surface_t *dst, int dx, int dy, surface_t *src, int sx
BYTE *yld = dp + y * dst->width;
for (x = 0; x < sw; x++) {
int s = *yls, d = *yld;
*yld = (BYTE)(MIN(255, (s + d)));
*yld = (BYTE)(min(255, (s + d)));
yls++; yld++;
}
}
+4 -5
View File
@@ -1,7 +1,6 @@
// 拡大・縮小
#include <string.h>
#include <glib.h>
#include "portab.h"
#include "surface.h"
@@ -24,10 +23,10 @@ void gr_copy_stretch(surface_t *dst, int dx, int dy, int dw, int dh, surface_t *
a2 = (float)sh / (float)dh;
// src width と dst width が同じときに問題があるので+1
row = g_new0(int, dw+1);
row = calloc(dw+1, sizeof(int));
// 1おおきくして初期化しないと col[dw-1]とcol[dw]が同じになる
// 可能性がある。
col = g_new0(int, dh+1);
col = calloc(dh+1, sizeof(int));
for (yd = 0.0, y = 0; y < dh; y++) {
col[y] = yd; yd += a2;
@@ -84,6 +83,6 @@ void gr_copy_stretch(surface_t *dst, int dx, int dy, int dw, int dh, surface_t *
}
}
g_free(row);
g_free(col);
free(row);
free(col);
}
-1
View File
@@ -1,6 +1,5 @@
//
#include "config.h"
#include <glib.h>
#include "portab.h"
#include "surface.h"
+15 -15
View File
@@ -1,7 +1,7 @@
#include "config.h"
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "portab.h"
@@ -9,7 +9,7 @@
#include "system.h"
static surface_t *create(int width, int height, int depth, boolean has_pixel, boolean has_alpha) {
surface_t *s = g_new0(surface_t, 1);
surface_t *s = calloc(1, sizeof(surface_t));
s->width = width;
s->height = height;
@@ -23,19 +23,19 @@ static surface_t *create(int width, int height, int depth, boolean has_pixel, bo
if (s->has_pixel) {
switch (s->depth) {
case 8:
s->pixel = g_new0(BYTE, width * (height +1));
s->pixel = calloc(width * (height +1), sizeof(BYTE));
s->bytes_per_line = width;
s->bytes_per_pixel = 1;
break;
case 15:
case 16:
s->pixel = g_new0(BYTE, width * (height +1) * 2);
s->pixel = calloc(width * (height +1) * 2, sizeof(BYTE));
s->bytes_per_line = width * 2;
s->bytes_per_pixel = 2;
break;
case 24:
case 32:
s->pixel = g_new0(BYTE, width * (height +1) * 4);
s->pixel = calloc(width * (height +1) * 4, sizeof(BYTE));
s->bytes_per_line = width * 4;
s->bytes_per_pixel = 4;
break;
@@ -47,7 +47,7 @@ static surface_t *create(int width, int height, int depth, boolean has_pixel, bo
}
if (s->has_alpha) {
s->alpha = g_new0(BYTE, width * (height +1));
s->alpha = calloc(width * (height +1), sizeof(BYTE));
}
return s;
@@ -92,9 +92,9 @@ surface_t *sf_create_pixel(int width, int height, int depth) {
*/
void sf_free(surface_t *s) {
if (s == NULL) return;
if (s->pixel) g_free(s->pixel);
if (s->alpha) g_free(s->alpha);
g_free(s);
if (s->pixel) free(s->pixel);
if (s->alpha) free(s->alpha);
free(s);
}
/**
@@ -108,18 +108,18 @@ surface_t *sf_dup(surface_t *in) {
if (in == NULL) return NULL;
sf = g_new(surface_t, 1);
sf = malloc(sizeof(surface_t));
memcpy(sf, in, sizeof(surface_t));
if (in->has_pixel) {
len = sf->bytes_per_line * sf->height;
sf->pixel = g_new(BYTE, len + sf->bytes_per_line);
sf->pixel = malloc(sizeof(BYTE) * (len + sf->bytes_per_line));
memcpy(sf->pixel, in->pixel, len);
}
if (in->has_alpha) {
len = sf->width * sf->height;
sf->alpha = g_new(BYTE, len + sf->width);
sf->alpha = malloc(sizeof(BYTE) * (len + sf->width));
memcpy(sf->alpha, in->alpha, len);
}
@@ -167,12 +167,12 @@ surface_t *sf_dup2(surface_t *in, boolean copypixel, boolean copyalpha) {
if (in == NULL) return NULL;
sf = g_new(surface_t, 1);
sf = malloc(sizeof(surface_t));
memcpy(sf, in, sizeof(surface_t));
if (in->has_pixel) {
len = sf->bytes_per_line * sf->height;
sf->pixel = g_new(BYTE, len + sf->bytes_per_line);
sf->pixel = malloc(sizeof(BYTE) * (len + sf->bytes_per_line));
if (copypixel) {
memcpy(sf->pixel, in->pixel, len);
}
@@ -180,7 +180,7 @@ surface_t *sf_dup2(surface_t *in, boolean copypixel, boolean copyalpha) {
if (in->has_alpha) {
len = sf->width * sf->height;
sf->alpha = g_new(BYTE, len + sf->width);
sf->alpha = malloc(sizeof(BYTE) * (len + sf->width));
if (copyalpha) {
memcpy(sf->alpha, in->alpha, len);
}
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
-7
View File
@@ -87,7 +87,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -244,13 +243,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
+2 -3
View File
@@ -9,13 +9,13 @@ AM_CPPFLAGS = $(LTDLINCL)
xsystem35_LDFLAGS = @EXTRALDFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@ @X_CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ @ESD_CFLAGS@ @SDL_CFLAGS@ @EXTRACFLAGS@ @VORBIS_CFLAGS@ -DMODULE_PATH=\"$(libdir)/@PACKAGE@\" -DLOCALEDIR=\""$(datadir)/locale"\"
AM_CFLAGS = @DEBUG_CFLAGS@ @X_CFLAGS@ @GTK_CFLAGS@ @ESD_CFLAGS@ @SDL_CFLAGS@ @EXTRACFLAGS@ @VORBIS_CFLAGS@ -DMODULE_PATH=\"$(libdir)/@PACKAGE@\" -DLOCALEDIR=\""$(datadir)/locale"\"
SRC_SYS35CMD = cmdb.c cmdc.c cmdd.c cmde.c cmdf.c cmdg.c cmdh.c cmdi.c cmdj.c cmdk.c cmdl.c cmdm.c cmdn.c cmdo.c cmdp.c cmdq.c cmds.c cmdt.c cmdu.c cmdv.c cmdw.c cmdy.c cmdz.c cmd2F.c cmd2F60.c
SRC_CG = pms.c vsp.c bmp.c qnt.c
SRC_MUS = music.c music_client.c music_server.c music_cdrom.c music_midi.c music_pcm.c music_fader.c wavfile.c wavmix.c audio.c midi.c cdrom.c sndcnv.c musstream.c pcmlib.c music_bgm.c musstream_wav.c musstream_ogg.c musstream_wav_ima.c
SRC_MISC = LittleEndian.c counter.c imput.c profile.c mt19937-1.c @JOY_S@.c utfsjis.c filecheck.c tempname.c
SRC_MISC = LittleEndian.c counter.c imput.c profile.c mt19937-1.c @JOY_S@.c utfsjis.c filecheck.c tempname.c list.c
SRC_SCO = cali.c scenario.c variable.c cmd_check.c hankana2sjis.c nact.c selection.c message.c savedata.c hankaku.c s39ain.c s39init.c
SRC_GRAPH = ags.c font.c flood.c cg.c ecopy.c antialiase.c alpha_plane.c cursor.c
@@ -48,7 +48,6 @@ xsystem35_DEPENDENCIES = \
xsystem35_LDADD = \
@ZLIB_LIBS@ \
@X_LIBS@ \
@GLIB_LIBS@ \
@GTK_LIBS@ \
@ALSA_LIBS@ \
@ESD_LIBS@ \
+4 -11
View File
@@ -92,7 +92,6 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
$(top_srcdir)/macros/gettext.m4 \
$(top_srcdir)/macros/glib-2.0.m4 \
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/lib-ld.m4 \
$(top_srcdir)/macros/lib-link.m4 \
@@ -140,7 +139,7 @@ am__objects_5 = ags.$(OBJEXT) font.$(OBJEXT) flood.$(OBJEXT) \
am__objects_6 = LittleEndian.$(OBJEXT) counter.$(OBJEXT) \
imput.$(OBJEXT) profile.$(OBJEXT) mt19937-1.$(OBJEXT) \
@JOY_S@.$(OBJEXT) utfsjis.$(OBJEXT) filecheck.$(OBJEXT) \
tempname.$(OBJEXT)
tempname.$(OBJEXT) list.$(OBJEXT)
am__objects_7 = network.$(OBJEXT)
am__objects_8 =
am_xsystem35_OBJECTS = xsystem35.$(OBJEXT) dri.$(OBJEXT) \
@@ -256,13 +255,7 @@ FGREP = @FGREP@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
@@ -420,11 +413,11 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = $(LTDLINCL)
xsystem35_LDFLAGS = @EXTRALDFLAGS@
AM_CFLAGS = @DEBUG_CFLAGS@ @X_CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ @ESD_CFLAGS@ @SDL_CFLAGS@ @EXTRACFLAGS@ @VORBIS_CFLAGS@ -DMODULE_PATH=\"$(libdir)/@PACKAGE@\" -DLOCALEDIR=\""$(datadir)/locale"\"
AM_CFLAGS = @DEBUG_CFLAGS@ @X_CFLAGS@ @GTK_CFLAGS@ @ESD_CFLAGS@ @SDL_CFLAGS@ @EXTRACFLAGS@ @VORBIS_CFLAGS@ -DMODULE_PATH=\"$(libdir)/@PACKAGE@\" -DLOCALEDIR=\""$(datadir)/locale"\"
SRC_SYS35CMD = cmdb.c cmdc.c cmdd.c cmde.c cmdf.c cmdg.c cmdh.c cmdi.c cmdj.c cmdk.c cmdl.c cmdm.c cmdn.c cmdo.c cmdp.c cmdq.c cmds.c cmdt.c cmdu.c cmdv.c cmdw.c cmdy.c cmdz.c cmd2F.c cmd2F60.c
SRC_CG = pms.c vsp.c bmp.c qnt.c
SRC_MUS = music.c music_client.c music_server.c music_cdrom.c music_midi.c music_pcm.c music_fader.c wavfile.c wavmix.c audio.c midi.c cdrom.c sndcnv.c musstream.c pcmlib.c music_bgm.c musstream_wav.c musstream_ogg.c musstream_wav_ima.c
SRC_MISC = LittleEndian.c counter.c imput.c profile.c mt19937-1.c @JOY_S@.c utfsjis.c filecheck.c tempname.c
SRC_MISC = LittleEndian.c counter.c imput.c profile.c mt19937-1.c @JOY_S@.c utfsjis.c filecheck.c tempname.c list.c
SRC_SCO = cali.c scenario.c variable.c cmd_check.c hankana2sjis.c nact.c selection.c message.c savedata.c hankaku.c s39ain.c s39init.c
SRC_GRAPH = ags.c font.c flood.c cg.c ecopy.c antialiase.c alpha_plane.c cursor.c
SRC_NET = network.c
@@ -455,7 +448,6 @@ xsystem35_DEPENDENCIES = \
xsystem35_LDADD = \
@ZLIB_LIBS@ \
@X_LIBS@ \
@GLIB_LIBS@ \
@GTK_LIBS@ \
@ALSA_LIBS@ \
@ESD_LIBS@ \
@@ -615,6 +607,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hankaku.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hankana2sjis.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imput.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt19937-1.Po@am__quote@
+2 -3
View File
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <glib.h>
#include "portab.h"
#include "xsystem35.h"
@@ -164,9 +163,9 @@ void ags_setWorldSize(int width, int height, int depth) {
/* DIBが8以上の場合は、alpha plane を用意 */
if (depth > 8) {
if (nact->ags.dib->alpha != NULL) {
g_free(nact->ags.dib->alpha);
free(nact->ags.dib->alpha);
}
nact->ags.dib->alpha = g_new0(BYTE, width * height);
nact->ags.dib->alpha = calloc(width * height, sizeof(BYTE));
nact->ags.dib->has_alpha = TRUE;
}
+4 -4
View File
@@ -348,10 +348,10 @@ extern void ags_autorepeat(boolean bool);
#define WHITELEVEL24(p, lv) ALPHABLEND24(0xffffffff, p, lv)
#define SUTURADD15(pa, pb) PIX15(MIN(255,PIXR15(pa)+PIXR15(pb)), MIN(255, PIXG15(pa)+PIXG15(pb)), MIN(255, PIXB15(pa)+PIXB15(pb)));
#define SUTURADD16(pa, pb) PIX16(MIN(255,PIXR16(pa)+PIXR16(pb)), MIN(255, PIXG16(pa)+PIXG16(pb)), MIN(255, PIXB16(pa)+PIXB16(pb)));
//#define SUTURADD16(pa, pb) PIX16(MIN(255,(int)(PIXR16(pa))+(int)(PIXR16(pb))), MIN(255, (int)(PIXG16(pa))+(int)(PIXG16(pb))), MIN(255, (int)(PIXB16(pa))+(int)(PIXB16(pb))));
#define SUTURADD24(pa, pb) PIX24(MIN(255,PIXR24(pa)+PIXR24(pb)), MIN(255, PIXG24(pa)+PIXG24(pb)), MIN(255, PIXB24(pa)+PIXB24(pb)));
#define SUTURADD15(pa, pb) PIX15(min(255,PIXR15(pa)+PIXR15(pb)), min(255, PIXG15(pa)+PIXG15(pb)), min(255, PIXB15(pa)+PIXB15(pb)));
#define SUTURADD16(pa, pb) PIX16(min(255,PIXR16(pa)+PIXR16(pb)), min(255, PIXG16(pa)+PIXG16(pb)), min(255, PIXB16(pa)+PIXB16(pb)));
//#define SUTURADD16(pa, pb) PIX16(min(255,(int)(PIXR16(pa))+(int)(PIXR16(pb))), min(255, (int)(PIXG16(pa))+(int)(PIXG16(pb))), min(255, (int)(PIXB16(pa))+(int)(PIXB16(pb))));
#define SUTURADD24(pa, pb) PIX24(min(255,PIXR24(pa)+PIXR24(pb)), min(255, PIXG24(pa)+PIXG24(pb)), min(255, PIXB24(pa)+PIXB24(pb)));
/* exter methods */

Some files were not shown because too many files have changed in this diff Show More