monkey-bubble r338 - in trunk: . src/monkey
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: monkey-bubble r338 - in trunk: . src/monkey
- Date: Sat, 9 Feb 2008 14:48:07 +0000 (GMT)
Author: herzi
Date: Sat Feb 9 14:48:07 2008
New Revision: 338
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=338&view=rev
Log:
2008-02-09 Sven Herzberg <sven imendio com>
* src/monkey/playground.c: (playground_init): use G_DEFINE_TYPE
Modified:
trunk/ChangeLog
trunk/src/monkey/playground.c
Modified: trunk/src/monkey/playground.c
==============================================================================
--- trunk/src/monkey/playground.c (original)
+++ trunk/src/monkey/playground.c Sat Feb 9 14:48:07 2008
@@ -49,7 +49,7 @@
static void playground_notify_bubble_wall_collision(Playground * p);
static void playground_notify_lost(Playground * p);
-
+G_DEFINE_TYPE (Playground, playground, G_TYPE_OBJECT);
Playground *
playground_new(gdouble max_x,gdouble min_x,const gchar * level_filename,
@@ -66,8 +66,8 @@
}
-static void
-playground_instance_init(Playground * self)
+static void
+playground_init (Playground* self)
{
self->private =g_new0 (PlaygroundPrivate, 1);
PRIVATE(self)->played_bubble = NULL;
@@ -280,35 +280,8 @@
}
-
-GType playground_get_type(void) {
- static GType playground_type = 0;
-
- if (!playground_type) {
- static const GTypeInfo playground_info = {
- sizeof(PlaygroundClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) playground_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof(Playground),
- 1, /* n_preallocs */
- (GInstanceInitFunc) playground_instance_init,
- };
-
-
-
- playground_type = g_type_register_static(G_TYPE_OBJECT,
- "Playground",
- &playground_info, 0);
- }
-
- return playground_type;
-}
-
#ifdef MAEMO
-void
+void
playground_save(Playground * self, const gchar * level_filename)
{
board_save_to_file(PRIVATE(self)->board, level_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]