[Tux4kids-commits] [SCM] tuxhistory - Educational history game branch, master, updated. 520ed1376e147814fae013417b65def367fe044c

julio (none) julio at julio-desktop.
Thu Jun 24 17:23:42 UTC 2010


The following commit has been merged in the master branch:
commit 520ed1376e147814fae013417b65def367fe044c
Author: julio <julio at julio-desktop.(none)>
Date:   Thu Jun 24 12:22:47 2010 -0500

    Object type added

diff --git a/src/map.h b/src/map.h
index bc5539d..398f594 100644
--- a/src/map.h
+++ b/src/map.h
@@ -6,6 +6,21 @@
  *  directly.
  */
 
+#define MAX_X_TILDES
+#define MAX_Y_TILDES
+
+// List of objects that can be used
+// in create_object. 
+// TODO: (maybe this should be in game.c
+//          with int create_object(int type, int x, int y)
+//          prototype...)
+//       
+
+enum{
+    TREE,
+    NUM_OF_OBJECTS
+};
+
 // th_map is the main data strucutre
 // th_map_tilde specifies the terrain
 // of the isometric map
@@ -13,15 +28,29 @@
 typedef struct th_map{
     int height; //Height of this tilde
     int terrain;
+    th_obj *obj;// Pointer to object
 }th_map;
 
+// th_obj represent each object in the field, in 
+// each tilde there can be only one object.
+
+typedef struct th_obj{
+    int x, y; // (x,y) in the th_map array
+    int type;
+    int live; // 100 to 0 
+    char *name;
+    int defence;
+    int attack;
+    int move; 
+}th_obj;
+
 //The map array.
-th_map **map;
+th_map map[MAX_X_TILDES][MAX_Y_TILDES];
     
 void th_draw_map(void);
 
 //Generates the th_map from a XML string.
-th_map** th_make_map(char *);
+//th_map** th_make_map(char *);
 
 char* th_serialize_map(th_map **);
 
diff --git a/src/setup.c b/src/setup.c
index 9e9f7d1..a364b43 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -12,14 +12,15 @@
 
   Modified by David Bruce
   davidstuartbruce at gmail.com
+  and Jesus Mager
+  fongog at gmail.com
 
   Part of "Tux4Kids" Project
   http://www.tux4kids.com/
-  Subversion repository:
-  https://svn.debian.alioth.org/tux4kids/tuxmath/
+  Git repository:
+  git://git.debian.org/git/tux4kids/tuxhistory.git
 
-
-  August 26, 2001 - Sept 18, 2007.
+  August 26, 2001 - June, 2010.
 */
 
 

-- 
tuxhistory - Educational history game



More information about the Tux4kids-commits mailing list