aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/love/love.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-24 11:42:09 +1000
committerDavid Walter Seikel2014-05-24 11:42:09 +1000
commitb7d9306c8689bdd7f37ce31ed63ce4e65fa396e2 (patch)
treeb2016c16ec01ce1ab40decb7533ef6849fa69956 /src/love/love.h
parentPretend to login, and some commenting out so it all compiles. Fix it up later. (diff)
downloadSledjHamr-b7d9306c8689bdd7f37ce31ed63ce4e65fa396e2.zip
SledjHamr-b7d9306c8689bdd7f37ce31ed63ce4e65fa396e2.tar.gz
SledjHamr-b7d9306c8689bdd7f37ce31ed63ce4e65fa396e2.tar.bz2
SledjHamr-b7d9306c8689bdd7f37ce31ed63ce4e65fa396e2.tar.xz
Big include and libraries clean up.
Diffstat (limited to 'src/love/love.h')
-rw-r--r--src/love/love.h172
1 files changed, 0 insertions, 172 deletions
diff --git a/src/love/love.h b/src/love/love.h
deleted file mode 100644
index 925ad0e..0000000
--- a/src/love/love.h
+++ /dev/null
@@ -1,172 +0,0 @@
1#ifndef _LOVE_H_
2#define _LOVE_H_
3
4
5
6/*
7
8What do we need as an internal world object format?
9
10Can't call it Things, that's taken already.
11
12"Stuffs" works though. B-)
13
14Love server needs to manage in world stuffs, and send changes to everyone.
15
16Extantz needs to manage what's shown in world, and edit that stuffs.
17
18Combining the data structures seems sane. Letting the love server
19define those data structures also seems sane, hence this file.
20
21
22Extantz needs -
23 what it looks like (Evas_3D stuff)
24 "link sets"
25 what is attached to what
26 mesh
27 vertices, triangles, ...
28 local position and orientation relative to parent
29 material
30 textures
31 colours, including alpha
32 light
33 shade mode
34 where it is
35 position, orientation
36 animation stuff
37
38
39common
40 UUID
41 name & description
42 owner
43 position, orientation
44 "link sets"
45
46
47love needs
48 UUID
49 name & description
50 owner
51 position, orientation
52 "link sets"
53 LL used a list of prims, we can do better I'm sure.
54 Though for the sake of this experimental version, just use an array of stuffs.
55 contents
56 scripts, cards, other stuffs, animations, sounds, textures, ...
57 content types
58
59*/
60
61
62/* Stuffs is a single "primitive" object, it can be -
63 single mesh object - NOTE: Should include a list of materials.
64 LL style prim, including tree, defined as a small bunch of data defining the type and parameters
65 LL style mesh "file"
66 single mesh file, collada, other mesh format
67 height field, for land, or water
68 LuaSL script
69 "notecard", just a text file, with no limits
70 animation, BVH, Alice's BVJ, or perhaps any other animation file format
71 sounds, MP3, other sound formats
72 textures, PNG, JPEG, JPEG2000, TIFF, GIF, other texture formats
73 other LL stuff
74 landmark
75 clothing
76 body part, shape, skin, hair, or eyes
77 gesture
78 calling card
79*/
80
81#include <Eina.h>
82
83typedef struct _material
84{
85 int face;
86 //type?
87 char texture[PATH_MAX];
88 //colour
89 //alpha
90 //other stuff
91} Material;
92
93typedef struct _mesh
94{
95 char fileName[PATH_MAX];
96 //type
97// Evas_Vec3 pos;
98// Evas_Vec4 rot;
99 Eina_Inarray materials; // Material
100 Eina_Inarray parts; // Mesh
101} Mesh;
102
103typedef struct _stuffs
104{
105 char UUID[32], *name, *description, owner[32];
106 //type
107 union
108 {
109 Mesh *mesh;
110// script *script;
111 void *other;
112 } details;
113} Stuffs;
114
115
116typedef struct _loveStuffs
117{
118 Stuffs stuffs;
119 Eina_Inarray contents; // Stuffs
120} LoveStuffs;
121
122typedef struct _extantzStuffs
123{
124 Stuffs stuffs;
125// Evas_3D_Mesh *mesh;
126// Evas_3D_Node *mesh_node;
127 Eina_Inarray *materials; // Evas_3D_Material
128 Eina_Inarray *textures; // Evas_3D_Texture
129} ExtantzStuffs;
130
131
132/* Data flow
133
134love server starts up
135 scans sim disk structure looking for scripts in stuffs
136 keep track of which script is in which stuffs
137 -> LuaSL compile script
138 -> LuaSL load this saved state
139 -> LuaSL run script
140
141Extantz client starts up
142 -> love login(name, password)
143 loads user details
144 <- love this is your user uuid
145 get sim details from lspace at this URL (or local disk directory file://)
146 -> lspace gimme the sim (or just pick up the index.omg file from disk)
147 <- lspace index.omg
148 figure out which mesh stuffs to load
149 -> lspace gimme(uuid) (or load it from disk)
150 <- lspace uuid.omg
151 figure out which mesh and texture files to load
152 -> lspace gimme this mesh file (or load it from disk)
153 <- lspace mesh file
154 -> lspace gimme this texture file (or load it from disk)
155 <- lspace texture file
156
157 user clicks on in world stuffs
158 -> love touched(user uuid, stuffs.uuid)
159 looks up stuffs, loops through scripts
160 -> LuaSL script.uuid.touch_start() and the detected stuff
161
162 user edits stuffs in world
163 -> love get contents(stuffs.uuid)
164 loads stuffs.omg from disk
165 loads stuffs.index.omg
166 <- love here's the list of contents Stuffs
167 -> love change this bit
168 changes that bit and stores on disk
169 send update nails commands to everyone/thing watching
170*/
171
172#endif