Initial penguins module commit.
Penguins is a module that display fancy penguins on you desktop. The module code is good enought, but the autotools stuff need some revision, it fails on dist, dist-check etc. If someone want to have a look at the autofoo stuff I will be very happy as I don't know well how to implement it correctly. Thanks in advice DaveMDS SVN revision: 32124
This commit is contained in:
commit
e0342de4a8
|
@ -0,0 +1,27 @@
|
|||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.rpath
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
libtool
|
||||
m4
|
||||
missing
|
||||
mkinstalldirs
|
||||
ltmain.sh
|
||||
stamp-h1
|
||||
*.lo
|
||||
*.la
|
||||
*.spec
|
||||
*.tar.gz
|
||||
module.desktop
|
|
@ -0,0 +1,28 @@
|
|||
Copyright (C) 2007 Davide Andreoli and various contributors (see AUTHORS)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies of the Software and its Copyright notices. In addition publicly
|
||||
documented acknowledgment must be given that this software has been used if no
|
||||
source code of this software is made available publicly. This includes
|
||||
acknowledgments in either Copyright notices, Manuals, Publicity and Marketing
|
||||
documents or any documentation provided with any product containing this
|
||||
software. This License does not apply to any software that links to the
|
||||
libraries provided by this software (statically or dynamically), but only to
|
||||
the software provided.
|
||||
|
||||
Please see the COPYING.PLAIN for a plain-english explanation of this notice
|
||||
and it's intent.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,33 @@
|
|||
Plain English Copyright Notice
|
||||
|
||||
This file is not intended to be the actual License. The reason this file
|
||||
exists is that we here are programmers and engineers. We aren't lawyers. We
|
||||
provide licenses that we THINK say the right things, but we have our own
|
||||
intentions at heart. This is a plain-english explanation of what those
|
||||
intentions are, and if you follow them you will be within the "spirit" of
|
||||
the license.
|
||||
|
||||
The intent is for us to enjoy writing software that is useful to us (the
|
||||
AUTHORS) and allow others to use it freely and also benefit from the work we
|
||||
put into making it. We don't want to restrict others using it. They should
|
||||
not *HAVE* to make the source code of the applications they write that
|
||||
simply link to these libraries (be that statically or dynamically), or for
|
||||
them to be limited as to what license they choose to use (be it open, closed
|
||||
or anything else). But we would like to know you are using these libraries.
|
||||
We simply would like to know that it has been useful to someone. This is why
|
||||
we ask for acknowledgement of some sort.
|
||||
|
||||
You can do what you want with the source of this software - it doesn't
|
||||
matter. We still have it here for ourselves and it is open and free to use
|
||||
and download and play with. It can't be taken away. We don't really mind what
|
||||
you do with the source to your software. We would simply like to know that
|
||||
you are using it - especially if it makes it to a commerical product. If you
|
||||
simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and
|
||||
then make sure you include a paragraph or page in the manual for the product
|
||||
with the copyright notice and state that you used this software, we will be
|
||||
very happy. If you want to contribute back modifications and fixes you may have
|
||||
made we will welcome those too with open arms (generally). If you want help
|
||||
with changes needed, ports needed or features to be added, arrangements can
|
||||
be easily made with some dialogue.
|
||||
|
||||
Christopher Michael <devilhorns@comcast.net>
|
|
@ -0,0 +1,11 @@
|
|||
COMPILING and INSTALLING:
|
||||
|
||||
If you got a official release tar archive do:
|
||||
./autogen.sh
|
||||
|
||||
Then to compile:
|
||||
make
|
||||
|
||||
To install:
|
||||
make install
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
SUBDIRS = po themes
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 ABOUT-NLS config.h.in \
|
||||
config.guess config.rpath config.sub configure depcomp ltmain.sh \
|
||||
install-sh missing mkinstalldirs m4
|
||||
|
||||
# data files for the module
|
||||
filesdir = $(datadir)
|
||||
files_DATA = \
|
||||
module.desktop \
|
||||
e-module-penguins.edj
|
||||
|
||||
EXTRA_DIST = $(files_DATA) e_modules-penguins.spec
|
||||
|
||||
# the module .so file
|
||||
INCLUDES = -I. \
|
||||
-I$(top_srcdir) \
|
||||
-I$(includedir) \
|
||||
@e_cflags@
|
||||
pkgdir = $(datadir)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
e_mod_main.h \
|
||||
e_mod_config.c \
|
||||
e_mod_config.h
|
||||
module_la_LIBADD = @e_libs@
|
||||
module_la_LDFLAGS = -module -avoid-version
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
uninstall:
|
||||
rm -rf $(datadir)
|
|
@ -0,0 +1 @@
|
|||
penguins is a module that display fancy penguins on your desktop
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
rm -rf autom4te.cache
|
||||
rm -f aclocal.m4 ltmain.sh
|
||||
|
||||
touch README
|
||||
|
||||
echo "Running autopoint..." ; autopoint -f || :
|
||||
echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1
|
||||
echo "Running autoheader..." ; autoheader || exit 1
|
||||
echo "Running autoconf..." ; autoconf || exit 1
|
||||
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
|
||||
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
|
||||
echo "Generating gettext penguins.pot template"; \
|
||||
xgettext \
|
||||
--output penguins.pot \
|
||||
--output-dir=po \
|
||||
--language=C \
|
||||
--add-location \
|
||||
--keyword=D_ \
|
||||
--sort-by-file \
|
||||
--copyright-holder="TODO" \
|
||||
--foreign-user \
|
||||
`find . -name "*.[ch]" -print` || exit 1
|
||||
|
||||
if [ -z "$NOCONFIGURE" ]; then
|
||||
./configure "$@"
|
||||
fi
|
|
@ -0,0 +1,131 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
# get rid of that stupid cache mechanism
|
||||
rm -f config.cache
|
||||
|
||||
AC_INIT(configure.in)
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(penguins, 0.0.1)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_ISC_POSIX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
ALL_LINGUAS="it"
|
||||
AC_SUBST(ALL_LINGUAS)
|
||||
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION(0.14)
|
||||
|
||||
MODULE_ARCH="$host_os-$host_cpu"
|
||||
AC_SUBST(MODULE_ARCH)
|
||||
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
|
||||
|
||||
if test "x${bindir}" = 'x${exec_prefix}/bin'; then
|
||||
if test "x${exec_prefix}" = "xNONE"; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
bindir="${ac_default_prefix}/bin";
|
||||
else
|
||||
bindir="${prefix}/bin";
|
||||
fi
|
||||
else
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
bindir="${ac_default_prefix}/bin";
|
||||
else
|
||||
bindir="${prefix}/bin";
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${libdir}" = 'x${exec_prefix}/lib'; then
|
||||
if test "x${exec_prefix}" = "xNONE"; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
libdir="${ac_default_prefix}/lib";
|
||||
else
|
||||
libdir="${prefix}/lib";
|
||||
fi
|
||||
else
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
libdir="${ac_default_prefix}/lib";
|
||||
else
|
||||
libdir="${prefix}/lib";
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_BIN_DIR in config.h.
|
||||
if test "x${bindir}" = 'xNONE'; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", "Package installed binaries destination")
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", "Package installed binaries destination")
|
||||
fi
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", "Package installed binaries destination")
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_LIB_DIR in config.h.
|
||||
if test "x${libdir}" = 'xNONE'; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", "Package installed libraries destination")
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", "Package installed libraries destination")
|
||||
fi
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", "Package installed libraries destination")
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_DATA_DIR in config.h.
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${HOME}/.e/e/modules/${PACKAGE}", "Package installed data destination")
|
||||
datadir="${HOME}/.e/e/modules/${PACKAGE}"
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${libdir}/enlightenment/modules/${PACKAGE}", "Package installed data destination")
|
||||
datadir="${libdir}/enlightenment/modules/${PACKAGE}"
|
||||
fi
|
||||
|
||||
AC_PREFIX_DEFAULT(${HOME}/.e/e)
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
datarootdir=${ac_default_prefix}
|
||||
else
|
||||
datarootdir=${prefix}/share
|
||||
fi
|
||||
localedir=${datarootdir}/locale
|
||||
AC_SUBST(LOCALEDIR, "${localedir}")
|
||||
AC_DEFINE_UNQUOTED(LOCALEDIR, "${localedir}", [Module Locale Directory])
|
||||
|
||||
#AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
|
||||
#AC_SUBST(dlopen_libs)
|
||||
|
||||
AC_ARG_WITH(enlightenment-config,
|
||||
[ --with-enlightenment-config=E_CONFIG use enlightenment-config specified ],
|
||||
[
|
||||
E_CONFIG=$withval;
|
||||
echo "using "$E_CONFIG" for enlightenment-config";
|
||||
],[
|
||||
PROG="enlightenment-config";
|
||||
AC_PATH_PROG(E_CONFIG, $PROG, "", $PATH)
|
||||
])
|
||||
e_cflags=`$E_CONFIG --cflags`
|
||||
e_libs=`$E_CONFIG --libs`
|
||||
e_modules=`$E_CONFIG --module-dir`
|
||||
AC_SUBST(e_cflags)
|
||||
AC_SUBST(e_libs)
|
||||
AC_SUBST(e_modules)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
e_modules-penguins.spec
|
||||
po/Makefile
|
||||
themes/Makefile
|
||||
themes/default/Makefile
|
||||
themes/lemmings/Makefile
|
||||
],[
|
||||
])
|
||||
|
Binary file not shown.
|
@ -0,0 +1,182 @@
|
|||
#include <e.h>
|
||||
#include "e_mod_main.h"
|
||||
#include "e_mod_config.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
double zoom;
|
||||
int penguins_count;
|
||||
char *theme;
|
||||
int alpha;
|
||||
};
|
||||
|
||||
/* Protos */
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(Population *pop, E_Config_Dialog_Data *cfdata);
|
||||
static void _ilist_cb_selected(void *data);
|
||||
|
||||
void
|
||||
_config_penguin_module(E_Container *con, Population *pop)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
char buf[4096];
|
||||
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
if (v)
|
||||
{
|
||||
v->create_cfdata = _create_data;
|
||||
v->free_cfdata = _free_data;
|
||||
v->basic.apply_cfdata = _basic_apply_data;
|
||||
v->basic.create_widgets = _basic_create_widgets;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/module.edj", e_module_dir_get(pop->module));
|
||||
cfd = e_config_dialog_new(con, D_("Penguins Module"), "Penguins", "_e_modules_penguins_config_dialog", buf, 0, v, pop);
|
||||
pop->config_dialog = cfd;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_fill_data(Population *pop, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
cfdata->penguins_count = pop->conf->penguins_count;
|
||||
cfdata->zoom = pop->conf->zoom;
|
||||
cfdata->alpha = pop->conf->alpha;
|
||||
cfdata->theme = strdup(pop->conf->theme);//TOFO FREE old cfdata->theme
|
||||
}
|
||||
|
||||
static void *
|
||||
_create_data(E_Config_Dialog *cfd)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
Population *pop;
|
||||
|
||||
pop = cfd->data;
|
||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||
|
||||
_fill_data(pop, cfdata);
|
||||
return cfdata;
|
||||
}
|
||||
|
||||
static void
|
||||
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Population *pop;
|
||||
|
||||
pop = cfd->data;
|
||||
pop->config_dialog = NULL;
|
||||
free(cfdata);
|
||||
cfdata = NULL;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *o, *of, *ob, *ol, *oi;
|
||||
E_Radio_Group *rg;
|
||||
Population *pop;
|
||||
|
||||
pop = cfd->data;
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
|
||||
of = e_widget_framelist_add(evas, D_("Population Settings"), 0);
|
||||
|
||||
ob = e_widget_label_add(evas, D_("Number of penguins:"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f"), 1, 50, 1, 0, NULL, &(cfdata->penguins_count), 200);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
ob = e_widget_label_add(evas, D_("Zoom factor:"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_slider_add(evas, 1, 0, D_("%1.1f X"), 0.2, 3, 0.2, 0, &(cfdata->zoom), NULL, 200);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
ob = e_widget_label_add(evas, D_("Transparency:"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f"), 50, 255, 1, 0, NULL, &(cfdata->alpha), 200);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Lista
|
||||
ob = e_widget_label_add(evas, D_("Select population:"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ol = e_widget_ilist_add(evas, 24, 24, &(cfdata->theme));
|
||||
|
||||
e_widget_ilist_clear(ol);
|
||||
e_widget_ilist_go(ol);
|
||||
|
||||
Evas_List *l;
|
||||
int count;
|
||||
l = pop->themes;
|
||||
count = 0;
|
||||
while (l)
|
||||
{
|
||||
char * theme;
|
||||
char * name;
|
||||
Evas_Object *oi;
|
||||
theme = l->data;
|
||||
name = edje_file_data_get (theme, "PopulationName");
|
||||
if (name)
|
||||
{
|
||||
oi = edje_object_add(evas);
|
||||
e_util_edje_icon_set(oi, "enlightenment/shelf_position_left");
|
||||
edje_object_file_set(oi, theme, "icon");
|
||||
printf("TEMA: %s (%s)\n", name, cfdata->theme);
|
||||
e_widget_ilist_append(ol, oi, name,
|
||||
_ilist_cb_selected, theme, theme);
|
||||
if (strcmp(theme,cfdata->theme) == 0)
|
||||
{
|
||||
e_widget_ilist_selected_set(ol, count);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
l = evas_list_next(l);
|
||||
}
|
||||
e_widget_ilist_go(ol);
|
||||
e_widget_min_size_set(ol, 155, 250);
|
||||
e_widget_framelist_object_append(of, ol);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
return o;
|
||||
}
|
||||
static void
|
||||
_ilist_cb_selected(void *data)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
char *th;
|
||||
th = data;
|
||||
//cfdata = data;
|
||||
//if (!cfdata) return;
|
||||
|
||||
printf("CB %s\n",th);
|
||||
|
||||
}
|
||||
static int
|
||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Population *pop;
|
||||
|
||||
pop = cfd->data;
|
||||
e_border_button_bindings_ungrab_all();
|
||||
|
||||
pop->conf->penguins_count = cfdata->penguins_count;
|
||||
pop->conf->zoom = cfdata->zoom;
|
||||
pop->conf->alpha = cfdata->alpha;
|
||||
|
||||
pop->conf->theme = strdup(cfdata->theme);//TODO FREE old pop->conf->theme
|
||||
|
||||
e_config_save_queue();
|
||||
e_border_button_bindings_grab_all();
|
||||
|
||||
_penguins_cb_config_updated(pop);
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
#else
|
||||
# ifndef E_MOD_CONFIG_H
|
||||
# define E_MOD_CONFIG_H
|
||||
# include "e_mod_main.h"
|
||||
void _config_penguin_module(E_Container *con, Population *pop);
|
||||
# endif
|
||||
#endif
|
|
@ -0,0 +1,902 @@
|
|||
#include <e.h>
|
||||
#include "config.h"
|
||||
#include "e_mod_main.h"
|
||||
#include "e_mod_config.h"
|
||||
|
||||
#define CLIMBER_PROB 4 // 4 Means: one climber every 5 - 1 Means: all climber - !!Don't set to 0
|
||||
#define FLOATER_PROB 2
|
||||
#define MAX_FALLER_HEIGHT 300
|
||||
|
||||
#define FLYER_PROB 1000 // every n animation cicle
|
||||
#define CUSTOM_PROB 600 // every n animation cicle
|
||||
|
||||
//_RAND is true 1 time every prob
|
||||
#define _RAND(prob) ( ( random() % prob ) == 0 )
|
||||
|
||||
/* module private routines */
|
||||
static int _is_inside_any_win(Population *pop, int x, int y, int ret_value);
|
||||
static Population *_population_init(E_Module *m);
|
||||
static void _population_shutdown(Population *pop);
|
||||
static int _cb_animator(void *data);
|
||||
static void _population_load(Population *pop);
|
||||
static void _theme_load(Population *pop);
|
||||
static void _start_walking_at(Penguin *tux, int at_y);
|
||||
static void _start_climbing_at(Penguin *tux, int at_x);
|
||||
static void _start_falling_at(Penguin *tux, int at_x);
|
||||
static void _start_flying_at(Penguin *tux, int at_y);
|
||||
static void _start_splatting_at(Penguin *tux, int at_y);
|
||||
static void _start_custom_at(Penguin *tux, int at_y);
|
||||
//static void _win_shape_change(void *data, E_Container_Shape *es, E_Container_Shape_Change ch);
|
||||
static void _reborn(Penguin *tux);
|
||||
|
||||
/* public module routines. all modules must have these */
|
||||
EAPI E_Module_Api e_modapi = {
|
||||
E_MODULE_API_VERSION,
|
||||
"Penguins"
|
||||
};
|
||||
|
||||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
Population *pop;
|
||||
|
||||
/* Set up module's message catalogue */
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset(PACKAGE, "UTF-8");
|
||||
|
||||
pop = _population_init(m);
|
||||
return pop;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_shutdown(E_Module *m)
|
||||
{
|
||||
Population *pop;
|
||||
|
||||
pop = m->data;
|
||||
if (pop)
|
||||
{
|
||||
if (pop->config_dialog)
|
||||
{
|
||||
e_object_del(E_OBJECT(pop->config_dialog));
|
||||
pop->config_dialog = NULL;
|
||||
}
|
||||
_population_shutdown(pop);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_save(E_Module *m)
|
||||
{
|
||||
Population *pop;
|
||||
|
||||
pop = m->data;
|
||||
if (!pop)
|
||||
return 1;
|
||||
e_config_domain_save("module.penguins", pop->conf_edd, pop->conf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_about(E_Module *m)
|
||||
{
|
||||
e_module_dialog_show(m, D_("Enlightenment Penguins Module"),
|
||||
D_
|
||||
("This is a module to display fancy penguins on your desktop.<br>and you can choose the population you like"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_config(E_Module *m)
|
||||
{
|
||||
Population *pop;
|
||||
E_Container *con;
|
||||
Evas_List *l;
|
||||
|
||||
pop = m->data;
|
||||
if (!pop)
|
||||
return 0;
|
||||
if (!pop->cons)
|
||||
return 0;
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
for (l = pop->cons; l; l = l->next)
|
||||
{
|
||||
E_Container *c;
|
||||
|
||||
c = l->data;
|
||||
if (c == con)
|
||||
{
|
||||
_config_penguin_module(con, pop);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* module private routines */
|
||||
static Population *
|
||||
_population_init(E_Module *m)
|
||||
{
|
||||
Population *pop;
|
||||
Evas_List *managers, *l, *l2, *l3;
|
||||
|
||||
pop = calloc(1, sizeof(Population));
|
||||
if (!pop)
|
||||
return NULL;
|
||||
|
||||
pop->module = m;
|
||||
pop->conf_edd = E_CONFIG_DD_NEW("Penguins_Config", Config);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T Config
|
||||
#define D pop->conf_edd
|
||||
E_CONFIG_VAL(D, T, zoom, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, penguins_count, INT);
|
||||
E_CONFIG_VAL(D, T, theme, STR);
|
||||
E_CONFIG_VAL(D, T, alpha, INT);
|
||||
|
||||
pop->conf = e_config_domain_load("module.penguins", pop->conf_edd);
|
||||
if (!pop->conf)
|
||||
{
|
||||
pop->conf = E_NEW(Config, 1);
|
||||
|
||||
pop->conf->zoom = 1;
|
||||
pop->conf->penguins_count = 3;
|
||||
pop->conf->alpha = 200;
|
||||
pop->conf->theme = PACKAGE_DATA_DIR"/themes/default.edj";
|
||||
}
|
||||
|
||||
managers = e_manager_list();
|
||||
for (l = managers; l; l = l->next)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
||||
man = l->data;
|
||||
|
||||
for (l2 = man->containers; l2; l2 = l2->next)
|
||||
{
|
||||
E_Container *con;
|
||||
con = l2->data;
|
||||
printf("E_container: '%s' [x:%d y:%d w:%d h:%d]\n",
|
||||
con->name, con->x, con->y, con->w, con->h);
|
||||
pop->cons = evas_list_append(pop->cons, con);
|
||||
pop->canvas = con->bg_evas;
|
||||
//e_container_shape_change_callback_add(con, _win_shape_change, NULL);
|
||||
for (l3 = e_container_shape_list_get(con); l3; l3 = l3->next)
|
||||
{
|
||||
E_Container_Shape *es;
|
||||
int x, y, w, h;
|
||||
es = l3->data;
|
||||
if (es->visible)
|
||||
{
|
||||
e_container_shape_geometry_get(es, &x, &y, &w, &h);
|
||||
printf("E_shape: [%d] x:%d y:%d w:%d h:%d\n", es->visible,x, y, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
evas_output_viewport_get(pop->canvas, NULL, NULL, &pop->width, &pop->height);
|
||||
|
||||
printf("Get themes list\n");
|
||||
Ecore_List *files;
|
||||
char *filename;
|
||||
char *name;
|
||||
char buf[4096];
|
||||
|
||||
files = ecore_file_ls(PACKAGE_DATA_DIR"/themes");
|
||||
while ((filename = ecore_list_next(files)))
|
||||
{
|
||||
if (ecore_str_has_suffix(filename, ".edj"))
|
||||
{
|
||||
snprintf(buf,sizeof(buf),"%s/%s",PACKAGE_DATA_DIR"/themes",filename);
|
||||
name = edje_file_data_get (buf, "PopulationName");
|
||||
if (name)
|
||||
{
|
||||
printf("THEME FILE: %s (%s)\n",filename,name);
|
||||
pop->themes = evas_list_append(pop->themes,strdup(buf));
|
||||
}
|
||||
}
|
||||
}
|
||||
ecore_list_destroy(files);
|
||||
|
||||
_theme_load(pop);
|
||||
_population_load(pop);
|
||||
|
||||
pop->animator = ecore_animator_add(_cb_animator, pop);
|
||||
//srand(ecore_time_get()); TODO we need it?
|
||||
return pop;
|
||||
}
|
||||
|
||||
Evas_Bool
|
||||
_action_free(Evas_Hash *hash, const char *key, void *data, void *fdata)
|
||||
{
|
||||
Action *a;
|
||||
a = data;
|
||||
printf("Free Action '%s' :(\n",a->name);
|
||||
E_FREE(a->name);
|
||||
E_FREE (a);
|
||||
return 1;
|
||||
}
|
||||
static void
|
||||
_population_free(Population *pop)
|
||||
{
|
||||
while (pop->penguins)
|
||||
{
|
||||
Penguin *tux;
|
||||
printf("Free TUX :(\n");
|
||||
tux = pop->penguins->data;
|
||||
evas_object_del(tux->obj);
|
||||
pop->penguins = evas_list_remove_list(pop->penguins, pop->penguins);
|
||||
E_FREE(tux);
|
||||
tux = NULL;
|
||||
}
|
||||
while (pop->customs)
|
||||
{
|
||||
Custom_Action *cus;
|
||||
printf("Free Custom :(\n");
|
||||
cus = pop->customs->data;
|
||||
E_FREE(cus->name);
|
||||
E_FREE(cus->left_program_name);
|
||||
E_FREE(cus->right_program_name);
|
||||
|
||||
pop->customs = evas_list_remove_list(pop->customs, pop->customs);
|
||||
E_FREE(cus);
|
||||
cus = NULL;
|
||||
}
|
||||
|
||||
evas_hash_foreach(pop->actions, _action_free, NULL);
|
||||
evas_hash_free(pop->actions);
|
||||
pop->actions = NULL;
|
||||
}
|
||||
|
||||
/* static void
|
||||
_real_population_shutdown(Population *pop)
|
||||
{
|
||||
|
||||
} */
|
||||
|
||||
static void
|
||||
_population_shutdown(Population *pop)
|
||||
{
|
||||
printf("KILL 'EM ALL\n");
|
||||
|
||||
while (pop->cons)
|
||||
{
|
||||
E_Container *con;
|
||||
|
||||
con = pop->cons->data;
|
||||
pop->cons = evas_list_remove_list(pop->cons, pop->cons);
|
||||
}
|
||||
|
||||
_population_free(pop);
|
||||
|
||||
|
||||
if (pop->animator)
|
||||
ecore_animator_del(pop->animator);
|
||||
|
||||
while (pop->themes)
|
||||
{
|
||||
printf("Free Theme '%s' :(\n",pop->themes->data);
|
||||
pop->themes = evas_list_remove_list(pop->themes, pop->themes);
|
||||
}
|
||||
|
||||
//E_FREE(pop->conf->theme); //TODO Why can't free??
|
||||
E_FREE(pop->conf);
|
||||
E_CONFIG_DD_FREE(pop->conf_edd);
|
||||
|
||||
|
||||
E_FREE(pop);
|
||||
pop = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_penguins_cb_config_updated(void *data)
|
||||
{
|
||||
Population *pop;
|
||||
|
||||
pop = (Population *)data;
|
||||
if (!pop)
|
||||
return;
|
||||
|
||||
_population_free(pop);
|
||||
|
||||
_theme_load(pop);
|
||||
_population_load(pop);
|
||||
}
|
||||
static Action*
|
||||
_load_action(Population *pop, char *filename, char *name, int id)
|
||||
{
|
||||
Action *act;
|
||||
char *data;
|
||||
int w, h, speed;
|
||||
|
||||
data = edje_file_data_get (filename, name);
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
act = calloc(1, sizeof(Action));
|
||||
if (!act)
|
||||
return NULL;
|
||||
|
||||
act->name = strdup(name);
|
||||
sscanf(data, "%d %d %d", &act->w, &act->h, &act->speed);
|
||||
|
||||
act->w = act->w * pop->conf->zoom;
|
||||
act->h = act->h * pop->conf->zoom;
|
||||
act->id = id;
|
||||
//TODO ZOOM ALSO THE SPEED ???
|
||||
|
||||
pop->actions = evas_hash_add(pop->actions, name, act);
|
||||
|
||||
return act;
|
||||
}
|
||||
static Custom_Action*
|
||||
_load_custom_action(Population *pop, char *filename, char *name)
|
||||
{
|
||||
Custom_Action *c;
|
||||
char *data;
|
||||
int w, h, speed;
|
||||
char buf[25];
|
||||
|
||||
data = edje_file_data_get (filename, name);
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
c = calloc(1, sizeof(Custom_Action));
|
||||
if (!c)
|
||||
return NULL;
|
||||
|
||||
c->name = strdup(name);
|
||||
sscanf(data, "%d %d %d %d %d %d",
|
||||
&c->w, &c->h, &c->h_speed, &c->v_speed, &c->r_min, &c->r_max);
|
||||
|
||||
c->w = c->w * pop->conf->zoom;
|
||||
c->h = c->h * pop->conf->zoom;
|
||||
|
||||
snprintf(buf, sizeof(buf), "start_custom_%d_left", pop->custom_num+1);
|
||||
c->left_program_name = strdup(buf);
|
||||
snprintf(buf, sizeof(buf), "start_custom_%d_right", pop->custom_num+1);
|
||||
c->right_program_name = strdup(buf);
|
||||
|
||||
pop->customs = evas_list_append(pop->customs, c);
|
||||
pop->custom_num++;
|
||||
|
||||
return c;
|
||||
}
|
||||
Evas_Bool hash_fn(Evas_Hash *hash, const char *key, void *data, void *fdata)
|
||||
{
|
||||
Action *a = data;
|
||||
printf("ACTIONS: name:'%s' w:%d h:%d speed:%d\n",key,a->w,a->h,a->speed);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
_theme_load(Population *pop)
|
||||
{
|
||||
char *name;
|
||||
Action *act;
|
||||
char buf[15];
|
||||
int i;
|
||||
|
||||
pop->actions = NULL;
|
||||
pop->customs = NULL;
|
||||
pop->custom_num = 0;
|
||||
|
||||
if (!pop->conf->theme)
|
||||
pop->conf->theme = PACKAGE_DATA_DIR "/default.edj";
|
||||
|
||||
|
||||
name = edje_file_data_get (pop->conf->theme, "PopulationName");
|
||||
if (!name)
|
||||
return;
|
||||
|
||||
printf("*** LOAD THEME %s (%s)\n", name, pop->conf->theme);
|
||||
|
||||
// load standard actions
|
||||
_load_action(pop, pop->conf->theme, "Walker", ID_WALKER);
|
||||
|
||||
_load_action(pop, pop->conf->theme, "Faller", ID_FALLER);
|
||||
_load_action(pop, pop->conf->theme, "Climber", ID_CLIMBER);
|
||||
_load_action(pop, pop->conf->theme, "Floater", ID_FLOATER);
|
||||
//_load_action(pop, pop->conf->theme, "Bomber");
|
||||
_load_action(pop, pop->conf->theme, "Splatter", ID_SPLATTER);
|
||||
_load_action(pop, pop->conf->theme, "Flyer", ID_FLYER);
|
||||
|
||||
// load custom actions
|
||||
i = 2;
|
||||
snprintf(buf, sizeof(buf), "Custom_1");
|
||||
while(_load_custom_action(pop, pop->conf->theme, buf))
|
||||
snprintf(buf, sizeof(buf), "Custom_%d", i++);
|
||||
|
||||
evas_hash_foreach(pop->actions, hash_fn, NULL);
|
||||
Evas_List *l;
|
||||
for ( l = pop->customs; l; l = l->next )
|
||||
{
|
||||
Custom_Action *c = l->data;
|
||||
printf("CUSTOMS: name:'%s' w:%d h:%d h_speed:%d v_speed:%d\n",
|
||||
c->name, c->w, c->h, c->h_speed, c->v_speed);
|
||||
}
|
||||
}
|
||||
static void
|
||||
_population_load(Population *pop)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Evas_Coord xx, yy, ww, hh;
|
||||
int i;
|
||||
Penguin *tux;
|
||||
|
||||
evas_output_viewport_get(pop->canvas, &xx, &yy, &ww, &hh);
|
||||
|
||||
//Create edje
|
||||
printf("\n *** LOAD %d ANIMS ***\n",pop->conf->penguins_count);
|
||||
|
||||
|
||||
for (i = 0; i < pop->conf->penguins_count; i++)
|
||||
{
|
||||
Evas_Coord tx, ty;
|
||||
|
||||
tux = malloc(sizeof(Penguin));
|
||||
|
||||
o = edje_object_add(pop->canvas);
|
||||
edje_object_file_set(o, pop->conf->theme, "anims");
|
||||
|
||||
tux->action = evas_hash_find(pop->actions,"Faller");
|
||||
|
||||
evas_object_image_alpha_set(o, 0.5);
|
||||
evas_object_color_set(o, pop->conf->alpha, pop->conf->alpha,
|
||||
pop->conf->alpha,pop->conf->alpha);
|
||||
evas_object_pass_events_set(o, 1);
|
||||
|
||||
tux->obj = o;
|
||||
tux->pop = pop;
|
||||
|
||||
|
||||
pop->penguins = evas_list_append(pop->penguins, tux);
|
||||
evas_object_show(o);
|
||||
|
||||
_reborn(tux);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_reborn(Penguin *tux)
|
||||
{
|
||||
printf("Reborn :)\n");
|
||||
tux->reverse = random() % (2);
|
||||
tux->x = random() % (tux->pop->width);
|
||||
tux->y = 0;
|
||||
tux->custom = 0;
|
||||
evas_object_move(tux->obj, (int)tux->x, (int)tux->y);
|
||||
_start_falling_at(tux, tux->x);
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
evas_object_image_fill_set(tux->obj, 0, 0, tux->action->w, tux->action->h);
|
||||
}
|
||||
|
||||
static int
|
||||
_cb_animator(void *data)
|
||||
{
|
||||
Population *pop;
|
||||
Evas_List *l;
|
||||
double d;
|
||||
int ran;
|
||||
|
||||
pop = data;
|
||||
for (l=pop->penguins; l ;l=l->next)
|
||||
{
|
||||
Penguin *tux;
|
||||
int touch;
|
||||
tux = l->data;
|
||||
|
||||
// ****** CUSTOM ACTIONS ********
|
||||
if (tux->custom)
|
||||
{
|
||||
tux->x += ((double)tux->custom->h_speed / 100);
|
||||
tux->y += ((double)tux->custom->v_speed / 100);
|
||||
}
|
||||
// ****** FALLER ********
|
||||
else if (tux->action->id == ID_FALLER)
|
||||
{
|
||||
tux->y += ((double)tux->action->speed / 100);
|
||||
if (touch = _is_inside_any_win(pop,
|
||||
(int)tux->x+(tux->action->w/2),
|
||||
(int)tux->y + tux->action->h,
|
||||
_RET_TOP_VALUE))
|
||||
{
|
||||
if (( (int)tux->y - tux->faller_h) > MAX_FALLER_HEIGHT)
|
||||
_start_splatting_at(tux, touch);
|
||||
else
|
||||
_start_walking_at(tux, touch);
|
||||
}
|
||||
else if(( (int)tux->y + tux->action->h ) > pop->height)
|
||||
{
|
||||
if (( (int)tux->y - tux->faller_h) > MAX_FALLER_HEIGHT)
|
||||
_start_splatting_at(tux, pop->height);
|
||||
else
|
||||
_start_walking_at(tux, pop->height);
|
||||
}
|
||||
|
||||
}
|
||||
// ****** FLOATER ********
|
||||
else if (tux->action->id == ID_FLOATER)
|
||||
{
|
||||
tux->y += ((double)tux->action->speed / 100);
|
||||
if (touch = _is_inside_any_win(pop,
|
||||
(int)tux->x+(tux->action->w/2),
|
||||
(int)tux->y + tux->action->h,
|
||||
_RET_TOP_VALUE)
|
||||
)
|
||||
_start_walking_at(tux, touch);
|
||||
else if(( (int)tux->y + tux->action->h ) > pop->height)
|
||||
_start_walking_at(tux, pop->height);
|
||||
|
||||
}
|
||||
// ****** WALKER ********
|
||||
else if (tux->action->id == ID_WALKER)
|
||||
{
|
||||
// random flyer
|
||||
if (_RAND(FLYER_PROB)){
|
||||
_start_flying_at(tux,tux->y);
|
||||
}
|
||||
// random custom
|
||||
else if (_RAND(CUSTOM_PROB)){
|
||||
_start_custom_at(tux,tux->y+tux->action->h);
|
||||
}
|
||||
// left
|
||||
else if (tux->reverse)
|
||||
{
|
||||
tux->x -= ((double)tux->action->speed / 100);
|
||||
if ((touch = _is_inside_any_win(pop, (int)tux->x , (int)tux->y, _RET_RIGHT_VALUE)) ||
|
||||
tux->x < 0)
|
||||
{
|
||||
if (_RAND(CLIMBER_PROB))
|
||||
_start_climbing_at(tux, touch);
|
||||
else
|
||||
{
|
||||
edje_object_signal_emit(tux->obj, "start_walking_right", "epenguins");
|
||||
tux->reverse = FALSE;
|
||||
}
|
||||
}
|
||||
if ((tux->y + tux->action->h) < pop->height)
|
||||
if (!_is_inside_any_win(pop, (int)tux->x+(tux->action->w/2) , (int)tux->y+tux->action->h+1, _RET_NONE_VALUE))
|
||||
_start_falling_at(tux, (int)tux->x+(tux->action->w/2));
|
||||
}
|
||||
// right
|
||||
else
|
||||
{
|
||||
tux->x += ((double)tux->action->speed / 100);
|
||||
if ((touch = _is_inside_any_win(pop, (int)tux->x + tux->action->w, (int)tux->y, _RET_LEFT_VALUE)) ||
|
||||
(tux->x + tux->action->w) > pop->width)
|
||||
{
|
||||
if (_RAND(CLIMBER_PROB))
|
||||
{
|
||||
if (touch)
|
||||
_start_climbing_at(tux, touch);
|
||||
else
|
||||
_start_climbing_at(tux, pop->width);
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_signal_emit(tux->obj, "start_walking_left", "epenguins");
|
||||
tux->reverse = TRUE;
|
||||
}
|
||||
}
|
||||
if ((tux->y + tux->action->h) < pop->height)
|
||||
if (!_is_inside_any_win(pop, (int)tux->x+(tux->action->w/2), (int)tux->y+tux->action->h+1, _RET_NONE_VALUE))
|
||||
_start_falling_at(tux, (int)tux->x+(tux->action->w/2));
|
||||
}
|
||||
|
||||
}
|
||||
// ****** FLYER ********
|
||||
else if (tux->action->id == ID_FLYER)
|
||||
{
|
||||
tux->y -= ((double)tux->action->speed / 100);
|
||||
tux->x += (random() % 3) - 1;
|
||||
if (tux->y < 0){
|
||||
tux->reverse = !tux->reverse;
|
||||
_start_falling_at(tux, (int)tux->x);
|
||||
}
|
||||
}
|
||||
// ****** CLIMBER ********
|
||||
else if (tux->action->id == ID_CLIMBER)
|
||||
{
|
||||
tux->y -= ((double)tux->action->speed / 100);
|
||||
// left
|
||||
if (tux->reverse)
|
||||
{
|
||||
if (!_is_inside_any_win(pop,
|
||||
(int)tux->x-1,
|
||||
(int)tux->y+(tux->action->h/2),
|
||||
_RET_NONE_VALUE))
|
||||
{
|
||||
if (tux->x > 0)
|
||||
{
|
||||
tux->x-=(tux->action->w/2)+1;
|
||||
_start_walking_at(tux, (int)tux->y+(tux->action->h/2));
|
||||
}
|
||||
}
|
||||
}
|
||||
// right
|
||||
else
|
||||
{
|
||||
if (!_is_inside_any_win(pop,
|
||||
(int)tux->x+tux->action->w+1,
|
||||
(int)tux->y+(tux->action->h/2),
|
||||
_RET_NONE_VALUE))
|
||||
{
|
||||
if ((tux->x+tux->action->w) < pop->width)
|
||||
{
|
||||
tux->x+=(tux->action->w/2)+1;
|
||||
_start_walking_at(tux, (int)tux->y+(tux->action->h/2));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tux->y < 0){
|
||||
tux->reverse = !tux->reverse;
|
||||
_start_falling_at(tux, (int)tux->x);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// printf("Place tux at x:%d y:%d w:%d h:%d\n",tux->x, tux->y,tux->action->w, tux->action->h);
|
||||
evas_object_move(tux->obj, (int)tux->x, (int)tux->y);
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
_is_inside_any_win(Population *pop, int x, int y, int ret_value)
|
||||
{
|
||||
Evas_List *l;
|
||||
E_Container *con;
|
||||
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
|
||||
for (l = e_container_shape_list_get(con); l; l = l->next)
|
||||
{
|
||||
E_Container_Shape *es;
|
||||
int sx, sy, sw, sh;
|
||||
es = l->data;
|
||||
if (es->visible)
|
||||
{
|
||||
e_container_shape_geometry_get(es, &sx, &sy, &sw, &sh);
|
||||
//printf("E_shape: [%d] x:%d y:%d w:%d h:%d\n", es->visible,sx, sy, sw, sh);
|
||||
if ( ((x > sx) && (x < (sx+sw))) &&
|
||||
((y > sy) && (y < (sy+sh))) )
|
||||
{
|
||||
switch (ret_value)
|
||||
{
|
||||
case _RET_NONE_VALUE:
|
||||
return 1;
|
||||
break;
|
||||
case _RET_RIGHT_VALUE:
|
||||
return sx+sw;
|
||||
break;
|
||||
case _RET_BOTTOM_VALUE:
|
||||
return sy+sh;
|
||||
break;
|
||||
case _RET_TOP_VALUE:
|
||||
return sy;
|
||||
break;
|
||||
case _RET_LEFT_VALUE:
|
||||
return sx;
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_start_walking_at(Penguin *tux, int at_y)
|
||||
{
|
||||
printf("Start walking...at %d\n",at_y);
|
||||
tux->action = evas_hash_find(tux->pop->actions, "Walker");
|
||||
|
||||
tux->y = at_y - tux->action->h;
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
|
||||
if (tux->reverse)
|
||||
edje_object_signal_emit(tux->obj, "start_walking_left", "epenguins");
|
||||
else
|
||||
edje_object_signal_emit(tux->obj, "start_walking_right", "epenguins");
|
||||
}
|
||||
static void
|
||||
_start_climbing_at(Penguin *tux, int at_x)
|
||||
{
|
||||
//printf("Start climbing...at: %d\n",at_x);
|
||||
tux->action = evas_hash_find(tux->pop->actions, "Climber");
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
|
||||
if (tux->reverse)
|
||||
{
|
||||
tux->x = at_x;
|
||||
edje_object_signal_emit(tux->obj, "start_climbing_left", "epenguins");
|
||||
}
|
||||
else
|
||||
{
|
||||
tux->x = at_x - tux->action->w;
|
||||
edje_object_signal_emit(tux->obj, "start_climbing_right", "epenguins");
|
||||
}
|
||||
|
||||
}
|
||||
static void
|
||||
_start_falling_at(Penguin *tux, int at_x)
|
||||
{
|
||||
if (_RAND(FLOATER_PROB))
|
||||
{
|
||||
//printf("Start floating...\n");
|
||||
tux->action = evas_hash_find(tux->pop->actions, "Floater");
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
|
||||
if (tux->reverse)
|
||||
{
|
||||
tux->x = (double)(at_x - tux->action->w);
|
||||
edje_object_signal_emit(tux->obj, "start_floating_left", "epenguins");
|
||||
}
|
||||
else
|
||||
{
|
||||
tux->x = (double)at_x;
|
||||
edje_object_signal_emit(tux->obj, "start_floating_right", "epenguins");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//printf("Start falling...\n");
|
||||
tux->action = evas_hash_find(tux->pop->actions, "Faller");
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
|
||||
if (tux->reverse)
|
||||
{
|
||||
tux->x = (double)(at_x - tux->action->w);
|
||||
edje_object_signal_emit(tux->obj, "start_falling_left", "epenguins");
|
||||
}
|
||||
else
|
||||
{
|
||||
tux->x = (double)at_x;
|
||||
edje_object_signal_emit(tux->obj, "start_falling_right", "epenguins");
|
||||
}
|
||||
}
|
||||
tux->faller_h = (int)tux->y;
|
||||
}
|
||||
|
||||
static void
|
||||
_start_flying_at(Penguin *tux, int at_y)
|
||||
{
|
||||
tux->action = evas_hash_find(tux->pop->actions, "Flyer");
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
tux->y = at_y - tux->action->h;
|
||||
if (tux->reverse)
|
||||
edje_object_signal_emit(tux->obj, "start_flying_left", "epenguins");
|
||||
else
|
||||
edje_object_signal_emit(tux->obj, "start_flying_right", "epenguins");
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_splatter_end (void *data, Evas_Object *o, const char *emi, const char *src)
|
||||
{
|
||||
_reborn((Penguin*)data);
|
||||
edje_object_signal_callback_del(o,"splatting_done","edje",_cb_splatter_end);
|
||||
}
|
||||
|
||||
static void
|
||||
_start_splatting_at(Penguin *tux, int at_y)
|
||||
{
|
||||
// printf("Start splatting...\n");
|
||||
evas_object_hide(tux->obj);
|
||||
tux->action = evas_hash_find(tux->pop->actions, "Splatter");
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
evas_object_image_fill_set(tux->obj,0,0, tux->action->w, tux->action->h);
|
||||
tux->y = at_y - tux->action->h;
|
||||
if (tux->reverse)
|
||||
edje_object_signal_emit(tux->obj, "start_splatting_left", "epenguins");
|
||||
else
|
||||
edje_object_signal_emit(tux->obj, "start_splatting_right", "epenguins");
|
||||
|
||||
|
||||
edje_object_signal_callback_add(tux->obj,"splatting_done","edje",_cb_splatter_end, tux);
|
||||
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
|
||||
evas_object_image_fill_set(tux->obj,0,0, tux->action->w, tux->action->h);
|
||||
evas_object_move(tux->obj,(int)tux->x,(int)tux->y);
|
||||
evas_object_show(tux->obj);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_cb_custom_end (void *data, Evas_Object *o, const char *emi, const char *src)
|
||||
{
|
||||
Penguin* tux = data;
|
||||
// printf("CUSTOM END.\n");
|
||||
if (tux->r_count > 0)
|
||||
{
|
||||
if (tux->reverse)
|
||||
edje_object_signal_emit(tux->obj, tux->custom->left_program_name, "epenguins");
|
||||
else
|
||||
edje_object_signal_emit(tux->obj, tux->custom->right_program_name, "epenguins");
|
||||
tux->r_count--;
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_signal_callback_del(o,"custom_done","edje",_cb_custom_end);
|
||||
_start_walking_at(tux,tux->y+tux->custom->h);
|
||||
tux->custom = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_start_custom_at(Penguin *tux, int at_y)
|
||||
{
|
||||
int ran;
|
||||
char buf[25];
|
||||
|
||||
if (tux->pop->custom_num < 1)
|
||||
return;
|
||||
|
||||
ran = random() % (tux->pop->custom_num);
|
||||
tux->custom = evas_list_nth(tux->pop->customs, ran);
|
||||
if (!tux->custom)
|
||||
return;
|
||||
|
||||
evas_object_resize(tux->obj, tux->custom->w, tux->custom->h);
|
||||
tux->y = at_y - tux->custom->h;
|
||||
|
||||
if ( tux->custom->r_min == tux->custom->r_max)
|
||||
tux->r_count = tux->custom->r_min;
|
||||
else
|
||||
tux->r_count = tux->custom->r_min +
|
||||
(random() % (tux->custom->r_max - tux->custom->r_min + 1));
|
||||
tux->r_count --;
|
||||
if (tux->reverse)
|
||||
edje_object_signal_emit(tux->obj, tux->custom->left_program_name, "epenguins");
|
||||
else
|
||||
edje_object_signal_emit(tux->obj, tux->custom->right_program_name, "epenguins");
|
||||
|
||||
|
||||
|
||||
printf("START Custom Action n %d (%s) repeat: %d\n", ran, tux->custom->left_program_name,tux->r_count);
|
||||
|
||||
edje_object_signal_callback_add(tux->obj,"custom_done","edje",_cb_custom_end, tux);
|
||||
|
||||
}
|
||||
/* static void
|
||||
_win_shape_change(void *data, E_Container_Shape *es, E_Container_Shape_Change ch)
|
||||
{
|
||||
//printf("Shape changed\n");
|
||||
int x, y, w, h;
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case E_CONTAINER_SHAPE_ADD:
|
||||
|
||||
break;
|
||||
case E_CONTAINER_SHAPE_DEL:
|
||||
|
||||
|
||||
break;
|
||||
case E_CONTAINER_SHAPE_SHOW:
|
||||
|
||||
break;
|
||||
case E_CONTAINER_SHAPE_HIDE:
|
||||
|
||||
break;
|
||||
case E_CONTAINER_SHAPE_MOVE:
|
||||
|
||||
break;
|
||||
case E_CONTAINER_SHAPE_RESIZE:
|
||||
|
||||
break;
|
||||
case E_CONTAINER_SHAPE_RECTS:
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} */
|
|
@ -0,0 +1,92 @@
|
|||
#define D_(str) dgettext(PACKAGE, str)
|
||||
|
||||
#ifndef E_MOD_MAIN_H
|
||||
#define E_MOD_MAIN_H
|
||||
|
||||
#define _RET_NONE_VALUE 0
|
||||
#define _RET_BOTTOM_VALUE 1
|
||||
#define _RET_TOP_VALUE 2
|
||||
#define _RET_LEFT_VALUE 3
|
||||
#define _RET_RIGHT_VALUE 4
|
||||
|
||||
#define ID_WALKER 1
|
||||
#define ID_FALLER 2
|
||||
#define ID_CLIMBER 3
|
||||
#define ID_FLOATER 4
|
||||
#define ID_SPLATTER 5
|
||||
#define ID_FLYER 6
|
||||
|
||||
typedef struct _Config Config;
|
||||
typedef struct _Population Population;
|
||||
typedef struct _Penguin Penguin;
|
||||
typedef struct _Action Action;
|
||||
typedef struct _Custom_Action Custom_Action;
|
||||
|
||||
struct _Config
|
||||
{
|
||||
double zoom;
|
||||
int penguins_count;
|
||||
char *theme;
|
||||
int alpha;
|
||||
};
|
||||
|
||||
struct _Population
|
||||
{
|
||||
E_Module *module;
|
||||
Evas_List *cons;
|
||||
Evas *canvas;
|
||||
Ecore_Animator *animator;
|
||||
Evas_List *penguins;
|
||||
Evas_Hash *actions;
|
||||
Evas_List *customs;
|
||||
int custom_num;
|
||||
Evas_List *themes;
|
||||
|
||||
E_Config_DD *conf_edd;
|
||||
Config *conf;
|
||||
Evas_Coord width, height;
|
||||
E_Config_Dialog *config_dialog;
|
||||
|
||||
};
|
||||
|
||||
struct _Action
|
||||
{
|
||||
char *name;
|
||||
int id;
|
||||
Evas_Coord w,h;
|
||||
int speed;
|
||||
};
|
||||
struct _Custom_Action
|
||||
{
|
||||
char *name;
|
||||
Evas_Coord w,h;
|
||||
int h_speed;
|
||||
int v_speed;
|
||||
int r_min;
|
||||
int r_max;
|
||||
char *left_program_name;
|
||||
char *right_program_name;
|
||||
};
|
||||
struct _Penguin
|
||||
{
|
||||
Evas_Object *obj;
|
||||
int reverse;
|
||||
double x, y;
|
||||
int faller_h;
|
||||
int r_count;
|
||||
Action *action;
|
||||
Custom_Action *custom;
|
||||
Population *pop;
|
||||
};
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init(E_Module *m);
|
||||
EAPI int e_modapi_shutdown(E_Module *m);
|
||||
EAPI int e_modapi_save(E_Module *m);
|
||||
EAPI int e_modapi_about(E_Module *m);
|
||||
EAPI int e_modapi_config(E_Module *m);
|
||||
|
||||
void _penguins_cb_config_updated(void *data);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,50 @@
|
|||
%define module_name penguins
|
||||
|
||||
Summary: %{module_name} module for the Enlightenment window manager
|
||||
Name: e_modules-%{module_name}
|
||||
Version: @VERSION@
|
||||
Release: 0.%(date '+%Y%m%d')
|
||||
License: BSD
|
||||
Group: User Interface/Desktops
|
||||
URL: http://www.enlightenment.org/
|
||||
Source: ftp://ftp.enlightenment.org/pub/enlightenment/%{module_name}-%{version}.tar.gz
|
||||
Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
|
||||
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
|
||||
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
||||
BuildRequires: ecore-devel, evas-devel, esmart-devel, edje-bin
|
||||
BuildRequires: edje-devel, eet-devel, enlightenment-devel >= 0.16.999
|
||||
Requires: enlightenment >= 0.16.999
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
%{module_name} module for the Enlightenment window manager.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{module_name}-%{version}
|
||||
|
||||
%build
|
||||
%{configure}
|
||||
%{__make} %{?_smp_mflags} %{?mflags}
|
||||
|
||||
%install
|
||||
%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
|
||||
%{find_lang} %{module_name} || true > %{module_name}.lang
|
||||
|
||||
%clean
|
||||
test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files -f %{module_name}.lang
|
||||
%defattr(-, root, root)
|
||||
%doc AUTHORS ChangeLog COPYING* INSTALL NEWS README
|
||||
%if "%{module_name}" == "emu"
|
||||
%{_bindir}/%{module_name}*
|
||||
%endif
|
||||
%{_libdir}/enlightenment/modules/%{module_name}*
|
||||
|
||||
%changelog
|
|
@ -0,0 +1,5 @@
|
|||
[Desktop Entry]
|
||||
Type=Link
|
||||
Name=Penguins
|
||||
Icon=e-module-penguins
|
||||
Comment=<hilight>Penguins Module</hilight><br>Module to display fancy penguins<br>walking around your desktop
|
|
@ -0,0 +1,30 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in $(PACKAGE).pot boldquot.sed insert-header.sin \
|
||||
en@boldquot.header en@quot.header Makefile.in.in Makevars.template quot.sed \
|
||||
remove-potcdate.sin Rules-quot
|
||||
|
||||
MSGFMT = msgfmt
|
||||
|
||||
localedir = @LOCALEDIR@
|
||||
locale_DATA = $(addsuffix .mo,$(ALL_LINGUAS))
|
||||
|
||||
EXTRA_DIST = $(PACKAGE).pot $(addsuffix .po,$(ALL_LINGUAS))
|
||||
|
||||
%.mo : %.po
|
||||
$(MSGFMT) -f -o $@ $<
|
||||
|
||||
install-localeDATA:
|
||||
uninstall-localeDATA:
|
||||
install-data-local:
|
||||
for L in $(ALL_LINGUAS); do \
|
||||
$(mkinstalldirs) $(DESTDIR)$(localedir)/$$L/LC_MESSAGES; \
|
||||
$(INSTALL_DATA) \
|
||||
$$L.mo $(DESTDIR)$(localedir)/$$L/LC_MESSAGES/$(PACKAGE).mo; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
for L in $(ALL_LINGUAS); do \
|
||||
rm -f $(DESTDIR)$(localedir)/$$L/LC_MESSAGES/$(PACKAGE).mo; \
|
||||
done
|
||||
|
||||
clean-local:
|
||||
rm -f *.mo
|
|
@ -0,0 +1,61 @@
|
|||
# Italian translation for penguins module.
|
||||
# This file is put in the public domain.
|
||||
# DaveMDS <dave@gurumeditation.it>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Penguins\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-10-20 12:44+0200\n"
|
||||
"PO-Revision-Date: 2007-10-20 13:50+0200\n"
|
||||
"Last-Translator: DaveMDS <dave@gurumeditation.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: e_mod_config.c:40
|
||||
msgid "Penguins Module"
|
||||
msgstr "Modulo dei pinguini"
|
||||
|
||||
#: e_mod_config.c:88
|
||||
msgid "Population Settings"
|
||||
msgstr "Impostazioni della popolazione"
|
||||
|
||||
#: e_mod_config.c:90
|
||||
msgid "Number of penguins:"
|
||||
msgstr "Numero di pinguini"
|
||||
|
||||
#: e_mod_config.c:92 e_mod_config.c:102
|
||||
#, c-format
|
||||
msgid "%1.0f"
|
||||
msgstr "%1.0f"
|
||||
|
||||
#: e_mod_config.c:95
|
||||
msgid "Zoom factor:"
|
||||
msgstr "Ingrandimento:"
|
||||
|
||||
#: e_mod_config.c:97
|
||||
#, c-format
|
||||
msgid "%1.1f X"
|
||||
msgstr "%1.1f X"
|
||||
|
||||
#: e_mod_config.c:100
|
||||
msgid "Transparency:"
|
||||
msgstr "Trasparenza:"
|
||||
|
||||
#: e_mod_config.c:110
|
||||
msgid "Select population:"
|
||||
msgstr "Seleziona il tipo di popolazione:"
|
||||
|
||||
#: e_mod_main.c:84
|
||||
msgid "Enlightenment Penguins Module"
|
||||
msgstr "Modulo dei pinguini per Enlightenment"
|
||||
|
||||
#: e_mod_main.c:86
|
||||
msgid ""
|
||||
"This is a module to display fancy penguins on your desktop.<br>and you can "
|
||||
"choose the population you like"
|
||||
msgstr ""
|
||||
"Questo modulo riempie il vostro desktop di simpatici pinguini.<br>"
|
||||
"Se preferite potete anche scegliere popolazioni diverse dai pinguini."
|
|
@ -0,0 +1,2 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
SUBDIRS = default lemmings
|
|
@ -0,0 +1,22 @@
|
|||
THEME = default
|
||||
EDC = $(THEME).edc
|
||||
EDJ = $(THEME).edj
|
||||
SUFFIXES = .edc .edj
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = $(EDJ)
|
||||
|
||||
pkgdatadir = $(datadir)
|
||||
themedir = $(pkgdatadir)/themes
|
||||
theme_DATA = $(EDJ)
|
||||
|
||||
all: $(EDJ)
|
||||
|
||||
.edc.edj:
|
||||
edje_cc -v -id $(top_srcdir)/themes/$(THEME) -fd $(top_srcdir)/themes/$(THEME) $< $@
|
||||
|
||||
EXTRA_DIST = \
|
||||
default.edc \
|
||||
Makefile
|
||||
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir) -name CVS`
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,879 @@
|
|||
#define FRAME LOSSY 90
|
||||
images
|
||||
{
|
||||
image: "icon.png" FRAME;
|
||||
|
||||
image: "walker0a.png" FRAME;
|
||||
image: "walker0b.png" FRAME;
|
||||
image: "walker1a.png" FRAME;
|
||||
image: "walker1b.png" FRAME;
|
||||
image: "walker2a.png" FRAME;
|
||||
image: "walker2b.png" FRAME;
|
||||
image: "walker3a.png" FRAME;
|
||||
image: "walker3b.png" FRAME;
|
||||
image: "walker4a.png" FRAME;
|
||||
image: "walker4b.png" FRAME;
|
||||
image: "walker5a.png" FRAME;
|
||||
image: "walker5b.png" FRAME;
|
||||
image: "walker6a.png" FRAME;
|
||||
image: "walker6b.png" FRAME;
|
||||
image: "walker7a.png" FRAME;
|
||||
image: "walker7b.png" FRAME;
|
||||
|
||||
image: "faller0.png" FRAME;
|
||||
image: "faller1.png" FRAME;
|
||||
image: "faller2.png" FRAME;
|
||||
image: "faller3.png" FRAME;
|
||||
image: "faller4.png" FRAME;
|
||||
image: "faller5.png" FRAME;
|
||||
image: "faller6.png" FRAME;
|
||||
image: "faller7.png" FRAME;
|
||||
|
||||
image: "floater0.png" FRAME;
|
||||
image: "floater1.png" FRAME;
|
||||
image: "floater2.png" FRAME;
|
||||
image: "floater3.png" FRAME;
|
||||
image: "floater4.png" FRAME;
|
||||
image: "floater5.png" FRAME;
|
||||
image: "floater6.png" FRAME;
|
||||
image: "floater7.png" FRAME;
|
||||
|
||||
image: "climber0a.png" FRAME;
|
||||
image: "climber1a.png" FRAME;
|
||||
image: "climber2a.png" FRAME;
|
||||
image: "climber3a.png" FRAME;
|
||||
image: "climber4a.png" FRAME;
|
||||
image: "climber5a.png" FRAME;
|
||||
image: "climber6a.png" FRAME;
|
||||
image: "climber7a.png" FRAME;
|
||||
image: "climber0b.png" FRAME;
|
||||
image: "climber1b.png" FRAME;
|
||||
image: "climber2b.png" FRAME;
|
||||
image: "climber3b.png" FRAME;
|
||||
image: "climber4b.png" FRAME;
|
||||
image: "climber5b.png" FRAME;
|
||||
image: "climber6b.png" FRAME;
|
||||
image: "climber7b.png" FRAME;
|
||||
|
||||
image: "bomber0.png" FRAME;
|
||||
image: "bomber1.png" FRAME;
|
||||
image: "bomber2.png" FRAME;
|
||||
image: "bomber3.png" FRAME;
|
||||
image: "bomber4.png" FRAME;
|
||||
image: "bomber5.png" FRAME;
|
||||
image: "bomber6.png" FRAME;
|
||||
image: "bomber7.png" FRAME;
|
||||
image: "bomber8.png" FRAME;
|
||||
image: "bomber9.png" FRAME;
|
||||
image: "bomber10.png" FRAME;
|
||||
image: "bomber11.png" FRAME;
|
||||
image: "bomber12.png" FRAME;
|
||||
image: "bomber13.png" FRAME;
|
||||
image: "bomber14.png" FRAME;
|
||||
image: "bomber15.png" FRAME;
|
||||
|
||||
image: "splatter0.png" FRAME;
|
||||
image: "splatter1.png" FRAME;
|
||||
image: "splatter2.png" FRAME;
|
||||
image: "splatter3.png" FRAME;
|
||||
image: "splatter4.png" FRAME;
|
||||
image: "splatter5.png" FRAME;
|
||||
image: "splatter6.png" FRAME;
|
||||
image: "splatter7.png" FRAME;
|
||||
image: "splatter8.png" FRAME;
|
||||
image: "splatter9.png" FRAME;
|
||||
image: "splatter10.png" FRAME;
|
||||
image: "splatter11.png" FRAME;
|
||||
|
||||
image: "flyer0.png" FRAME;
|
||||
image: "flyer1.png" FRAME;
|
||||
image: "flyer2.png" FRAME;
|
||||
image: "flyer3.png" FRAME;
|
||||
image: "flyer4.png" FRAME;
|
||||
image: "flyer5.png" FRAME;
|
||||
image: "flyer6.png" FRAME;
|
||||
image: "flyer7.png" FRAME;
|
||||
|
||||
image: "digger0.png" FRAME;
|
||||
image: "digger1.png" FRAME;
|
||||
image: "digger2.png" FRAME;
|
||||
image: "digger3.png" FRAME;
|
||||
image: "digger4.png" FRAME;
|
||||
image: "digger5.png" FRAME;
|
||||
image: "digger6.png" FRAME;
|
||||
image: "digger7.png" FRAME;
|
||||
image: "digger8.png" FRAME;
|
||||
image: "digger9.png" FRAME;
|
||||
image: "digger10.png" FRAME;
|
||||
image: "digger11.png" FRAME;
|
||||
image: "digger12.png" FRAME;
|
||||
image: "digger13.png" FRAME;
|
||||
|
||||
image: "reader0.png" FRAME;
|
||||
image: "reader1.png" FRAME;
|
||||
image: "reader2.png" FRAME;
|
||||
image: "reader3.png" FRAME;
|
||||
image: "reader4.png" FRAME;
|
||||
image: "reader5.png" FRAME;
|
||||
image: "reader6.png" FRAME;
|
||||
image: "reader7.png" FRAME;
|
||||
image: "reader8.png" FRAME;
|
||||
image: "reader9.png" FRAME;
|
||||
image: "reader10.png" FRAME;
|
||||
image: "reader11.png" FRAME;
|
||||
}
|
||||
data
|
||||
{
|
||||
|
||||
item: "PopulationName" "Default penguins";
|
||||
|
||||
/**************************************************************
|
||||
* Standard actions definitions.
|
||||
* All this action MUST be defined
|
||||
*
|
||||
* Example
|
||||
* item: "<action>" "width height speed";
|
||||
* width: the width of the animation in pixel at zoom 1.0
|
||||
* height: the height of the animation in pixel at zoom 1.0
|
||||
* speed: the speed of the movement (not the frame rate)
|
||||
* acceptable value are from 10 to 1000
|
||||
*************************************************************/
|
||||
item: "Faller" "30 30 600"; //600
|
||||
item: "Floater" "30 30 300"; //600
|
||||
item: "Walker" "30 30 150"; //90
|
||||
item: "Climber" "30 30 150";
|
||||
//item: "Bomber" "30 30 0";
|
||||
item: "Splatter" "30 30 0";
|
||||
item: "Flyer" "30 30 200";
|
||||
|
||||
/**************************************************************
|
||||
* Custom actions definitions.
|
||||
* Here you can define your own animation, how many you need.
|
||||
* For each custom action defined you MUST also declare at least
|
||||
* two program: 'start_custom_x_left' and 'start_custom_x_left'
|
||||
* See the programs part in this file for details.
|
||||
*
|
||||
* Example
|
||||
* item: "name" "width height h_speed v_speed r_min r_max";
|
||||
*
|
||||
* name:
|
||||
* The name must be 'Custom_x', where x is a progressive
|
||||
* number starting a 1.
|
||||
* In fact: Custom_1, Custom_2, .. , Custom_n
|
||||
*
|
||||
* width,height: the size of the animation in pixel at zoom 1.0x
|
||||
*
|
||||
* h_speed,v_speed:
|
||||
* the speed of the movement on the 2 axis
|
||||
* acceptable value are from 10 to 1000
|
||||
*
|
||||
* r_min,r_max:
|
||||
* The minimum and maximum number of times
|
||||
* to repeat the animation. The anim will be looped a
|
||||
* random number of times ranging from r_min to r_max.
|
||||
* If r_min = r_max the animation is played exactly that
|
||||
* number of times.
|
||||
* Don't set this to 0 (it doesn't make sense)
|
||||
*************************************************************/
|
||||
item: "Custom_1" "30 30 0 0 2 5"; //digger
|
||||
item: "Custom_2" "30 30 0 0 10 15"; //reader
|
||||
// item: "Custom_2" "30 30 202 202";
|
||||
// item: "Custom_3" "30 30 203 203";
|
||||
}
|
||||
collections
|
||||
{
|
||||
group
|
||||
{
|
||||
name: "icon";
|
||||
parts
|
||||
{
|
||||
part
|
||||
{
|
||||
name: "icon_";
|
||||
type: IMAGE;
|
||||
mouse_events: 0;
|
||||
description
|
||||
{
|
||||
state: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
rel1
|
||||
{
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
image {
|
||||
normal: "icon.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group
|
||||
{
|
||||
name: "anims";
|
||||
parts
|
||||
{
|
||||
part
|
||||
{
|
||||
name: "penguins";
|
||||
type: IMAGE;
|
||||
mouse_events: 0;
|
||||
description
|
||||
{
|
||||
state: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
rel1
|
||||
{
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
image {
|
||||
normal: "walker1a.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "walker" 0.0;
|
||||
image {
|
||||
normal: "walker0a.png";
|
||||
tween: "walker1a.png";
|
||||
tween: "walker2a.png";
|
||||
tween: "walker3a.png";
|
||||
tween: "walker4a.png";
|
||||
tween: "walker5a.png";
|
||||
tween: "walker6a.png";
|
||||
tween: "walker7a.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "walker" 1.0;
|
||||
image {
|
||||
normal: "walker0b.png";
|
||||
tween: "walker1b.png";
|
||||
tween: "walker2b.png";
|
||||
tween: "walker3b.png";
|
||||
tween: "walker4b.png";
|
||||
tween: "walker5b.png";
|
||||
tween: "walker6b.png";
|
||||
tween: "walker7b.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "faller" 0.0;
|
||||
image {
|
||||
normal: "faller0.png";
|
||||
tween: "faller1.png";
|
||||
tween: "faller2.png";
|
||||
tween: "faller3.png";
|
||||
tween: "faller4.png";
|
||||
tween: "faller5.png";
|
||||
tween: "faller6.png";
|
||||
tween: "faller7.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "faller" 1.0;
|
||||
image {
|
||||
normal: "faller0.png";
|
||||
tween: "faller1.png";
|
||||
tween: "faller2.png";
|
||||
tween: "faller3.png";
|
||||
tween: "faller4.png";
|
||||
tween: "faller5.png";
|
||||
tween: "faller6.png";
|
||||
tween: "faller7.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "floater" 0.0;
|
||||
image {
|
||||
normal: "floater0.png";
|
||||
tween: "floater1.png";
|
||||
tween: "floater2.png";
|
||||
tween: "floater3.png";
|
||||
tween: "floater4.png";
|
||||
tween: "floater5.png";
|
||||
tween: "floater6.png";
|
||||
tween: "floater7.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "floater" 1.0;
|
||||
image {
|
||||
normal: "floater0.png";
|
||||
tween: "floater1.png";
|
||||
tween: "floater2.png";
|
||||
tween: "floater3.png";
|
||||
tween: "floater4.png";
|
||||
tween: "floater5.png";
|
||||
tween: "floater6.png";
|
||||
tween: "floater7.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "climber" 0.0;
|
||||
image {
|
||||
normal: "climber0a.png";
|
||||
tween: "climber1a.png";
|
||||
tween: "climber2a.png";
|
||||
tween: "climber3a.png";
|
||||
tween: "climber4a.png";
|
||||
tween: "climber5a.png";
|
||||
tween: "climber6a.png";
|
||||
tween: "climber7a.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "climber" 1.0;
|
||||
image {
|
||||
normal: "climber0b.png";
|
||||
tween: "climber1b.png";
|
||||
tween: "climber2b.png";
|
||||
tween: "climber3b.png";
|
||||
tween: "climber4b.png";
|
||||
tween: "climber5b.png";
|
||||
tween: "climber6b.png";
|
||||
tween: "climber7b.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "bomber" 0.0;
|
||||
image {
|
||||
normal: "bomber0.png";
|
||||
tween: "bomber1.png";
|
||||
tween: "bomber2.png";
|
||||
tween: "bomber3.png";
|
||||
tween: "bomber4.png";
|
||||
tween: "bomber5.png";
|
||||
tween: "bomber6.png";
|
||||
tween: "bomber7.png";
|
||||
tween: "bomber8.png";
|
||||
tween: "bomber9.png";
|
||||
tween: "bomber10.png";
|
||||
tween: "bomber11.png";
|
||||
tween: "bomber12.png";
|
||||
tween: "bomber13.png";
|
||||
tween: "bomber14.png";
|
||||
tween: "bomber15.png";
|
||||
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "bomber" 1.0;
|
||||
image {
|
||||
normal: "bomber0.png";
|
||||
tween: "bomber1.png";
|
||||
tween: "bomber2.png";
|
||||
tween: "bomber3.png";
|
||||
tween: "bomber4.png";
|
||||
tween: "bomber5.png";
|
||||
tween: "bomber6.png";
|
||||
tween: "bomber7.png";
|
||||
tween: "bomber8.png";
|
||||
tween: "bomber9.png";
|
||||
tween: "bomber10.png";
|
||||
tween: "bomber11.png";
|
||||
tween: "bomber12.png";
|
||||
tween: "bomber13.png";
|
||||
tween: "bomber14.png";
|
||||
tween: "bomber15.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "splatter" 0.0;
|
||||
image {
|
||||
normal: "splatter11.png";
|
||||
tween: "splatter0.png";
|
||||
tween: "splatter1.png";
|
||||
tween: "splatter2.png";
|
||||
tween: "splatter3.png";
|
||||
tween: "splatter4.png";
|
||||
tween: "splatter5.png";
|
||||
tween: "splatter6.png";
|
||||
tween: "splatter7.png";
|
||||
tween: "splatter8.png";
|
||||
tween: "splatter9.png";
|
||||
tween: "splatter10.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "splatter" 1.0;
|
||||
image {
|
||||
normal: "splatter11.png";
|
||||
tween: "splatter0.png";
|
||||
tween: "splatter1.png";
|
||||
tween: "splatter2.png";
|
||||
tween: "splatter3.png";
|
||||
tween: "splatter4.png";
|
||||
tween: "splatter5.png";
|
||||
tween: "splatter6.png";
|
||||
tween: "splatter7.png";
|
||||
tween: "splatter8.png";
|
||||
tween: "splatter9.png";
|
||||
tween: "splatter10.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "flyer" 0.0;
|
||||
image {
|
||||
normal: "flyer0.png";
|
||||
tween: "flyer1.png";
|
||||
tween: "flyer2.png";
|
||||
tween: "flyer3.png";
|
||||
tween: "flyer4.png";
|
||||
tween: "flyer5.png";
|
||||
tween: "flyer6.png";
|
||||
tween: "flyer7.png";
|
||||
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "flyer" 1.0;
|
||||
image {
|
||||
normal: "flyer0.png";
|
||||
tween: "flyer1.png";
|
||||
tween: "flyer2.png";
|
||||
tween: "flyer3.png";
|
||||
tween: "flyer4.png";
|
||||
tween: "flyer5.png";
|
||||
tween: "flyer6.png";
|
||||
tween: "flyer7.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "custom_1" 0.0;
|
||||
image {
|
||||
normal: "digger0.png";
|
||||
tween: "digger1.png";
|
||||
tween: "digger2.png";
|
||||
tween: "digger3.png";
|
||||
tween: "digger4.png";
|
||||
tween: "digger5.png";
|
||||
tween: "digger6.png";
|
||||
tween: "digger7.png";
|
||||
tween: "digger8.png";
|
||||
tween: "digger9.png";
|
||||
tween: "digger10.png";
|
||||
tween: "digger11.png";
|
||||
tween: "digger12.png";
|
||||
tween: "digger13.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "custom_1" 1.0;
|
||||
image {
|
||||
normal: "digger0.png";
|
||||
tween: "digger1.png";
|
||||
tween: "digger2.png";
|
||||
tween: "digger3.png";
|
||||
tween: "digger4.png";
|
||||
tween: "digger5.png";
|
||||
tween: "digger6.png";
|
||||
tween: "digger7.png";
|
||||
tween: "digger8.png";
|
||||
tween: "digger9.png";
|
||||
tween: "digger10.png";
|
||||
tween: "digger11.png";
|
||||
tween: "digger12.png";
|
||||
tween: "digger13.png";
|
||||
}
|
||||
}
|
||||
description
|
||||
{
|
||||
state: "reader" 0.0;
|
||||
image {
|
||||
normal: "reader0.png";
|
||||
tween: "reader1.png";
|
||||
tween: "reader2.png";
|
||||
tween: "reader3.png";
|
||||
tween: "reader4.png";
|
||||
tween: "reader5.png";
|
||||
tween: "reader6.png";
|
||||
tween: "reader7.png";
|
||||
tween: "reader8.png";
|
||||
tween: "reader9.png";
|
||||
tween: "reader10.png";
|
||||
tween: "reader11.png";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
programs //****************************
|
||||
{
|
||||
program
|
||||
{
|
||||
name: "stop_all";
|
||||
action: ACTION_STOP;
|
||||
target: "falling_left";
|
||||
target: "falling_right";
|
||||
target: "walking_left";
|
||||
target: "walking_right";
|
||||
target: "climbing_left";
|
||||
target: "climbing_right";
|
||||
target: "floating_left";
|
||||
target: "floating_right";
|
||||
}
|
||||
/****************************
|
||||
* Faller
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_falling_right";
|
||||
signal: "start_falling_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "faller" 0.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "falling_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "falling_right";
|
||||
action: STATE_SET "faller" 0.0;
|
||||
transition: LINEAR 0.5;
|
||||
target: "penguins";
|
||||
after: "falling_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_falling_left";
|
||||
signal: "start_falling_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "faller" 1.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "falling_left";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "falling_left";
|
||||
action: STATE_SET "faller" 1.0;
|
||||
transition: LINEAR 0.5;
|
||||
target: "penguins";
|
||||
after: "falling_left";
|
||||
}
|
||||
/****************************
|
||||
* Floater
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_floating_right";
|
||||
signal: "start_floating_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "floater" 0.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "floating_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "floating_right";
|
||||
action: STATE_SET "floater" 0.0;
|
||||
transition: LINEAR 0.25;
|
||||
target: "penguins";
|
||||
after: "floating_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_floating_left";
|
||||
signal: "start_floating_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "floater" 1.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "floating_left";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "floating_left";
|
||||
action: STATE_SET "floater" 1.0;
|
||||
transition: LINEAR 0.25;
|
||||
target: "penguins";
|
||||
after: "floating_left";
|
||||
}
|
||||
/****************************
|
||||
* Walker
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_walking_right";
|
||||
signal: "start_walking_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "walker" 0.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "walking_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "walking_right";
|
||||
action: STATE_SET "walker" 0.0;
|
||||
transition: LINEAR 0.8;
|
||||
target: "penguins";
|
||||
after: "walking_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_walking_left";
|
||||
signal: "start_walking_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "walker" 1.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "walking_left";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "walking_left";
|
||||
action: STATE_SET "walker" 1.0;
|
||||
transition: LINEAR 0.8;
|
||||
target: "penguins";
|
||||
after: "walking_left";
|
||||
}
|
||||
/****************************
|
||||
* Climber
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_climbing_right";
|
||||
signal: "start_climbing_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "climber" 0.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "climbing_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "climbing_right";
|
||||
action: STATE_SET "climber" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "climbing_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_climbing_left";
|
||||
signal: "start_climbing_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "climber" 1.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "climbing_left";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "climbing_left";
|
||||
action: STATE_SET "climber" 1.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "climbing_left";
|
||||
}
|
||||
/****************************
|
||||
* Flyer
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_flying_right";
|
||||
signal: "start_flying_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "flyer" 0.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "flying_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "flying_right";
|
||||
action: STATE_SET "flyer" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "flying_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_flying_left";
|
||||
signal: "start_flying_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "flyer" 1.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "flying_left";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "flying_left";
|
||||
action: STATE_SET "flyer" 1.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "flying_left";
|
||||
}
|
||||
/****************************
|
||||
* Bomber
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_bombing_right";
|
||||
signal: "start_bombing_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "bomber" 0.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "bombing_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "bombing_right";
|
||||
action: STATE_SET "bomber" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "bombing_right";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_bombing_left";
|
||||
signal: "start_bombing_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "bomber" 1.0;
|
||||
transition: LINEAR 0;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "bombing_left";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "bombing_left";
|
||||
action: STATE_SET "bomber" 1.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "bombing_left";
|
||||
}
|
||||
/****************************
|
||||
* Splatter
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_splatting_right";
|
||||
signal: "start_splatting_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "splatter" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "splatting_done";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_splatting_left";
|
||||
signal: "start_splatting_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "splatter" 1.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "splatting_done";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "splatting_done";
|
||||
action: SIGNAL_EMIT "splatting_done" "edje";
|
||||
}
|
||||
/*****************************************
|
||||
* Customs programs
|
||||
* Every teme must have this program set
|
||||
*****************************************/
|
||||
program
|
||||
{
|
||||
name: "custom_done";
|
||||
action: SIGNAL_EMIT "custom_done" "edje";
|
||||
}
|
||||
/****************************
|
||||
* Custom_1 - digger
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_custom_1_right";
|
||||
signal: "start_custom_1_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "custom_1" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "custom_done";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_custom_1_left";
|
||||
signal: "start_custom_1_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "custom_1" 1.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "custom_done";
|
||||
}
|
||||
/****************************
|
||||
* Custom_2 - reader
|
||||
****************************/
|
||||
program
|
||||
{
|
||||
name: "start_custom_2_right";
|
||||
signal: "start_custom_2_right";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "reader" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "custom_done";
|
||||
}
|
||||
program
|
||||
{
|
||||
name: "start_custom_2_left";
|
||||
signal: "start_custom_2_left";
|
||||
source: "epenguins";
|
||||
action: STATE_SET "reader" 0.0;
|
||||
transition: LINEAR 1;
|
||||
target: "penguins";
|
||||
after: "stop_all";
|
||||
after: "custom_done";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue