2 from datatypes
import *
5 def __init__(self
, filename
=""):
6 Struct
.__init
__(self
, "CDataSound")
8 self
.filename
= String(filename
)
10 class SoundSet(Struct
):
11 def __init__(self
, name
="", files
=[]):
12 Struct
.__init
__(self
, "CDataSoundset")
13 self
.name
= String(name
)
14 self
.sounds
= Array(Sound())
17 self
.sounds
.Add(Sound(name
))
20 def __init__(self
, name
="", filename
=""):
21 Struct
.__init
__(self
, "CDataImage")
22 self
.name
= String(name
)
23 self
.filename
= String(filename
)
26 class SpriteSet(Struct
):
27 def __init__(self
, name
="", image
=None, gridx
=0, gridy
=0):
28 Struct
.__init
__(self
, "CDataSpriteset")
29 self
.image
= Pointer(Image
, image
) # TODO
30 self
.gridx
= Int(gridx
)
31 self
.gridy
= Int(gridy
)
34 def __init__(self
, name
="", Set
=None, x
=0, y
=0, w
=0, h
=0):
35 Struct
.__init
__(self
, "CDataSprite")
36 self
.name
= String(name
)
37 self
.set = Pointer(SpriteSet
, Set
) # TODO
44 def __init__(self
, name
="", respawntime
=15, spawndelay
=0):
45 Struct
.__init
__(self
, "CDataPickupspec")
46 self
.name
= String(name
)
47 self
.respawntime
= Int(respawntime
)
48 self
.spawndelay
= Int(spawndelay
)
50 class AnimKeyframe(Struct
):
51 def __init__(self
, time
=0, x
=0, y
=0, angle
=0):
52 Struct
.__init
__(self
, "CAnimKeyframe")
53 self
.time
= Float(time
)
56 self
.angle
= Float(angle
)
58 class AnimSequence(Struct
):
60 Struct
.__init
__(self
, "CAnimSequence")
61 self
.frames
= Array(AnimKeyframe())
63 class Animation(Struct
):
64 def __init__(self
, name
=""):
65 Struct
.__init
__(self
, "CAnimation")
66 self
.name
= String(name
)
67 self
.body
= AnimSequence()
68 self
.back_foot
= AnimSequence()
69 self
.front_foot
= AnimSequence()
70 self
.attach
= AnimSequence()
72 class WeaponSpec(Struct
):
73 def __init__(self
, container
=None, name
=""):
74 Struct
.__init
__(self
, "CDataWeaponspec")
75 self
.name
= String(name
)
76 self
.sprite_body
= Pointer(Sprite
, Sprite())
77 self
.sprite_cursor
= Pointer(Sprite
, Sprite())
78 self
.sprite_proj
= Pointer(Sprite
, Sprite())
79 self
.sprite_muzzles
= Array(Pointer(Sprite
, Sprite()))
80 self
.visual_size
= Int(96)
82 self
.firedelay
= Int(500)
83 self
.maxammo
= Int(10)
84 self
.ammoregentime
= Int(0)
87 self
.offsetx
= Float(0)
88 self
.offsety
= Float(0)
89 self
.muzzleoffsetx
= Float(0)
90 self
.muzzleoffsety
= Float(0)
91 self
.muzzleduration
= Float(5)
93 # dig out sprites if we have a container
95 for sprite
in container
.sprites
.items
:
96 if sprite
.name
.value
== "weapon_"+name
+"_body": self
.sprite_body
.Set(sprite
)
97 elif sprite
.name
.value
== "weapon_"+name
+"_cursor": self
.sprite_cursor
.Set(sprite
)
98 elif sprite
.name
.value
== "weapon_"+name
+"_proj": self
.sprite_proj
.Set(sprite
)
99 elif "weapon_"+name
+"_muzzle" in sprite
.name
.value
:
100 self
.sprite_muzzles
.Add(Pointer(Sprite
, sprite
))
102 class Weapon_Hammer(Struct
):
104 Struct
.__init
__(self
, "CDataWeaponspecHammer")
105 self
.base
= Pointer(WeaponSpec
, WeaponSpec())
107 class Weapon_Gun(Struct
):
109 Struct
.__init
__(self
, "CDataWeaponspecGun")
110 self
.base
= Pointer(WeaponSpec
, WeaponSpec())
111 self
.curvature
= Float(1.25)
112 self
.speed
= Float(2200)
113 self
.lifetime
= Float(2.0)
115 class Weapon_Shotgun(Struct
):
117 Struct
.__init
__(self
, "CDataWeaponspecShotgun")
118 self
.base
= Pointer(WeaponSpec
, WeaponSpec())
119 self
.curvature
= Float(1.25)
120 self
.speed
= Float(2200)
121 self
.speeddiff
= Float(0.8)
122 self
.lifetime
= Float(0.25)
124 class Weapon_Grenade(Struct
):
126 Struct
.__init
__(self
, "CDataWeaponspecGrenade")
127 self
.base
= Pointer(WeaponSpec
, WeaponSpec())
128 self
.curvature
= Float(7.0)
129 self
.speed
= Float(1000)
130 self
.lifetime
= Float(2.0)
132 class Weapon_Rifle(Struct
):
134 Struct
.__init
__(self
, "CDataWeaponspecRifle")
135 self
.base
= Pointer(WeaponSpec
, WeaponSpec())
136 self
.reach
= Float(800.0)
137 self
.bounce_delay
= Int(150)
138 self
.bounce_num
= Int(1)
139 self
.bounce_cost
= Float(0)
141 class Weapon_Ninja(Struct
):
143 Struct
.__init
__(self
, "CDataWeaponspecNinja")
144 self
.base
= Pointer(WeaponSpec
, WeaponSpec())
145 self
.duration
= Int(15000)
146 self
.movetime
= Int(200)
147 self
.velocity
= Int(50)
149 class Weapons(Struct
):
151 Struct
.__init
__(self
, "CDataWeaponspecs")
152 self
.hammer
= Weapon_Hammer()
153 self
.gun
= Weapon_Gun()
154 self
.shotgun
= Weapon_Shotgun()
155 self
.grenade
= Weapon_Grenade()
156 self
.rifle
= Weapon_Rifle()
157 self
.ninja
= Weapon_Ninja()
158 self
.id = Array(WeaponSpec())
160 class DataContainer(Struct
):
162 Struct
.__init
__(self
, "CDataContainer")
163 self
.sounds
= Array(SoundSet())
164 self
.images
= Array(Image())
165 self
.pickups
= Array(Pickup())
166 self
.spritesets
= Array(SpriteSet())
167 self
.sprites
= Array(Sprite())
168 self
.animations
= Array(Animation())
169 self
.weapons
= Weapons()
171 def FileList(format
, num
):
172 return [format
%(x
+1) for x
in range(0,num
)]
174 container
= DataContainer()
175 container
.sounds
.Add(SoundSet("gun_fire", FileList("audio/wp_gun_fire-%02d.wv", 3)))
176 container
.sounds
.Add(SoundSet("shotgun_fire", FileList("audio/wp_shotty_fire-%02d.wv", 3)))
178 container
.sounds
.Add(SoundSet("grenade_fire", FileList("audio/wp_flump_launch-%02d.wv", 3)))
179 container
.sounds
.Add(SoundSet("hammer_fire", FileList("audio/wp_hammer_swing-%02d.wv", 3)))
180 container
.sounds
.Add(SoundSet("hammer_hit", FileList("audio/wp_hammer_hit-%02d.wv", 3)))
181 container
.sounds
.Add(SoundSet("ninja_fire", FileList("audio/wp_ninja_attack-%02d.wv", 3)))
182 container
.sounds
.Add(SoundSet("grenade_explode", FileList("audio/wp_flump_explo-%02d.wv", 3)))
183 container
.sounds
.Add(SoundSet("ninja_hit", FileList("audio/wp_ninja_hit-%02d.wv", 3)))
184 container
.sounds
.Add(SoundSet("rifle_fire", FileList("audio/wp_rifle_fire-%02d.wv", 3)))
185 container
.sounds
.Add(SoundSet("rifle_bounce", FileList("audio/wp_rifle_bnce-%02d.wv", 3)))
186 container
.sounds
.Add(SoundSet("weapon_switch", FileList("audio/wp_switch-%02d.wv", 3)))
188 container
.sounds
.Add(SoundSet("player_pain_short", FileList("audio/vo_teefault_pain_short-%02d.wv", 12)))
189 container
.sounds
.Add(SoundSet("player_pain_long", FileList("audio/vo_teefault_pain_long-%02d.wv", 2)))
191 container
.sounds
.Add(SoundSet("body_land", FileList("audio/foley_land-%02d.wv", 4)))
192 container
.sounds
.Add(SoundSet("player_airjump", FileList("audio/foley_dbljump-%02d.wv", 3)))
193 container
.sounds
.Add(SoundSet("player_jump", FileList("audio/foley_foot_left-%02d.wv", 4) + FileList("audio/foley_foot_right-%02d.wv", 4)))
194 container
.sounds
.Add(SoundSet("player_die", FileList("audio/foley_body_splat-%02d.wv", 3)))
195 container
.sounds
.Add(SoundSet("player_spawn", FileList("audio/vo_teefault_spawn-%02d.wv", 7)))
196 container
.sounds
.Add(SoundSet("player_skid", FileList("audio/sfx_skid-%02d.wv", 4)))
197 container
.sounds
.Add(SoundSet("tee_cry", FileList("audio/vo_teefault_cry-%02d.wv", 2)))
199 container
.sounds
.Add(SoundSet("hook_loop", FileList("audio/hook_loop-%02d.wv", 2)))
201 container
.sounds
.Add(SoundSet("hook_attach_ground", FileList("audio/hook_attach-%02d.wv", 3)))
202 container
.sounds
.Add(SoundSet("hook_attach_player", FileList("audio/foley_body_impact-%02d.wv", 3)))
203 container
.sounds
.Add(SoundSet("hook_noattach", FileList("audio/hook_noattach-%02d.wv", 2)))
204 container
.sounds
.Add(SoundSet("pickup_health", FileList("audio/sfx_pickup_hrt-%02d.wv", 2)))
205 container
.sounds
.Add(SoundSet("pickup_armor", FileList("audio/sfx_pickup_arm-%02d.wv", 4)))
207 container
.sounds
.Add(SoundSet("pickup_grenade", ["audio/sfx_pickup_launcher.wv"]))
208 container
.sounds
.Add(SoundSet("pickup_shotgun", ["audio/sfx_pickup_sg.wv"]))
209 container
.sounds
.Add(SoundSet("pickup_ninja", ["audio/sfx_pickup_ninja.wv"]))
210 container
.sounds
.Add(SoundSet("weapon_spawn", FileList("audio/sfx_spawn_wpn-%02d.wv", 3)))
211 container
.sounds
.Add(SoundSet("weapon_noammo", FileList("audio/wp_noammo-%02d.wv", 5)))
213 container
.sounds
.Add(SoundSet("hit", FileList("audio/sfx_hit_weak-%02d.wv", 2)))
215 container
.sounds
.Add(SoundSet("chat_server", ["audio/sfx_msg-server.wv"]))
216 container
.sounds
.Add(SoundSet("chat_client", ["audio/sfx_msg-client.wv"]))
217 container
.sounds
.Add(SoundSet("chat_highlight", ["audio/sfx_msg-highlight.wv"]))
218 container
.sounds
.Add(SoundSet("ctf_drop", ["audio/sfx_ctf_drop.wv"]))
219 container
.sounds
.Add(SoundSet("ctf_return", ["audio/sfx_ctf_rtn.wv"]))
220 container
.sounds
.Add(SoundSet("ctf_grab_pl", ["audio/sfx_ctf_grab_pl.wv"]))
221 container
.sounds
.Add(SoundSet("ctf_grab_en", ["audio/sfx_ctf_grab_en.wv"]))
222 container
.sounds
.Add(SoundSet("ctf_capture", ["audio/sfx_ctf_cap_pl.wv"]))
224 container
.sounds
.Add(SoundSet("menu", ["audio/music_menu.wv"]))
226 image_null
= Image("null", "")
227 image_particles
= Image("particles", "particles.png")
228 image_game
= Image("game", "game.png")
229 image_browseicons
= Image("browseicons", "browse_icons.png")
230 image_emoticons
= Image("emoticons", "emoticons.png")
231 image_demobuttons
= Image("demobuttons", "demo_buttons.png")
232 image_fileicons
= Image("fileicons", "file_icons.png")
233 image_guibuttons
= Image("guibuttons", "gui_buttons.png")
234 image_guiicons
= Image("guiicons", "gui_icons.png")
236 container
.images
.Add(image_null
)
237 container
.images
.Add(image_game
)
238 container
.images
.Add(image_particles
)
239 container
.images
.Add(Image("cursor", "gui_cursor.png"))
240 container
.images
.Add(Image("banner", "gui_logo.png"))
241 container
.images
.Add(image_emoticons
)
242 container
.images
.Add(image_browseicons
)
243 container
.images
.Add(Image("console_bg", "console.png"))
244 container
.images
.Add(Image("console_bar", "console_bar.png"))
245 container
.images
.Add(image_demobuttons
)
246 container
.images
.Add(image_fileicons
)
247 container
.images
.Add(image_guibuttons
)
248 container
.images
.Add(image_guiicons
)
250 container
.pickups
.Add(Pickup("health"))
251 container
.pickups
.Add(Pickup("armor"))
252 container
.pickups
.Add(Pickup("weapon"))
253 container
.pickups
.Add(Pickup("ninja", 90, 90))
255 set_particles
= SpriteSet("particles", image_particles
, 8, 8)
256 set_game
= SpriteSet("game", image_game
, 32, 16)
257 set_tee
= SpriteSet("tee", image_null
, 8, 4)
258 set_browseicons
= SpriteSet("browseicons", image_browseicons
, 4, 1)
259 set_emoticons
= SpriteSet("emoticons", image_emoticons
, 4, 4)
260 set_demobuttons
= SpriteSet("demobuttons", image_demobuttons
, 5, 1)
261 set_fileicons
= SpriteSet("fileicons", image_fileicons
, 8, 1)
262 set_guibuttons
= SpriteSet("guibuttons", image_guibuttons
, 12, 4)
263 set_guiicons
= SpriteSet("guiicons", image_guiicons
, 8, 2)
265 container
.spritesets
.Add(set_particles
)
266 container
.spritesets
.Add(set_game
)
267 container
.spritesets
.Add(set_tee
)
268 container
.spritesets
.Add(set_browseicons
)
269 container
.spritesets
.Add(set_emoticons
)
270 container
.spritesets
.Add(set_demobuttons
)
271 container
.spritesets
.Add(set_fileicons
)
272 container
.spritesets
.Add(set_guibuttons
)
273 container
.spritesets
.Add(set_guiicons
)
275 container
.sprites
.Add(Sprite("part_slice", set_particles
, 0,0,1,1))
276 container
.sprites
.Add(Sprite("part_ball", set_particles
, 1,0,1,1))
277 container
.sprites
.Add(Sprite("part_splat01", set_particles
, 2,0,1,1))
278 container
.sprites
.Add(Sprite("part_splat02", set_particles
, 3,0,1,1))
279 container
.sprites
.Add(Sprite("part_splat03", set_particles
, 4,0,1,1))
281 container
.sprites
.Add(Sprite("part_smoke", set_particles
, 0,1,1,1))
282 container
.sprites
.Add(Sprite("part_shell", set_particles
, 0,2,2,2))
283 container
.sprites
.Add(Sprite("part_expl01", set_particles
, 0,4,4,4))
284 container
.sprites
.Add(Sprite("part_airjump", set_particles
, 2,2,2,2))
285 container
.sprites
.Add(Sprite("part_hit01", set_particles
, 4,1,2,2))
287 container
.sprites
.Add(Sprite("health_full", set_game
, 21,0,2,2))
288 container
.sprites
.Add(Sprite("health_empty", set_game
, 23,0,2,2))
289 container
.sprites
.Add(Sprite("armor_full", set_game
, 21,2,2,2))
290 container
.sprites
.Add(Sprite("armor_empty", set_game
, 23,2,2,2))
292 container
.sprites
.Add(Sprite("star1", set_game
, 15,0,2,2))
293 container
.sprites
.Add(Sprite("star2", set_game
, 17,0,2,2))
294 container
.sprites
.Add(Sprite("star3", set_game
, 19,0,2,2))
296 container
.sprites
.Add(Sprite("part1", set_game
, 6,0,1,1))
297 container
.sprites
.Add(Sprite("part2", set_game
, 6,1,1,1))
298 container
.sprites
.Add(Sprite("part3", set_game
, 7,0,1,1))
299 container
.sprites
.Add(Sprite("part4", set_game
, 7,1,1,1))
300 container
.sprites
.Add(Sprite("part5", set_game
, 8,0,1,1))
301 container
.sprites
.Add(Sprite("part6", set_game
, 8,1,1,1))
302 container
.sprites
.Add(Sprite("part7", set_game
, 9,0,2,2))
303 container
.sprites
.Add(Sprite("part8", set_game
, 11,0,2,2))
304 container
.sprites
.Add(Sprite("part9", set_game
, 13,0,2,2))
306 container
.sprites
.Add(Sprite("weapon_gun_body", set_game
, 2,4,4,2))
307 container
.sprites
.Add(Sprite("weapon_gun_cursor", set_game
, 0,4,2,2))
308 container
.sprites
.Add(Sprite("weapon_gun_proj", set_game
, 6,4,2,2))
309 container
.sprites
.Add(Sprite("weapon_gun_muzzle1", set_game
, 8,4,3,2))
310 container
.sprites
.Add(Sprite("weapon_gun_muzzle2", set_game
, 12,4,3,2))
311 container
.sprites
.Add(Sprite("weapon_gun_muzzle3", set_game
, 16,4,3,2))
313 container
.sprites
.Add(Sprite("weapon_shotgun_body", set_game
, 2,6,8,2))
314 container
.sprites
.Add(Sprite("weapon_shotgun_cursor", set_game
, 0,6,2,2))
315 container
.sprites
.Add(Sprite("weapon_shotgun_proj", set_game
, 10,6,2,2))
316 container
.sprites
.Add(Sprite("weapon_shotgun_muzzle1", set_game
, 12,6,3,2))
317 container
.sprites
.Add(Sprite("weapon_shotgun_muzzle2", set_game
, 16,6,3,2))
318 container
.sprites
.Add(Sprite("weapon_shotgun_muzzle3", set_game
, 20,6,3,2))
320 container
.sprites
.Add(Sprite("weapon_grenade_body", set_game
, 2,8,7,2))
321 container
.sprites
.Add(Sprite("weapon_grenade_cursor", set_game
, 0,8,2,2))
322 container
.sprites
.Add(Sprite("weapon_grenade_proj", set_game
, 10,8,2,2))
324 container
.sprites
.Add(Sprite("weapon_hammer_body", set_game
, 2,1,4,3))
325 container
.sprites
.Add(Sprite("weapon_hammer_cursor", set_game
, 0,0,2,2))
326 container
.sprites
.Add(Sprite("weapon_hammer_proj", set_game
, 0,0,0,0))
328 container
.sprites
.Add(Sprite("weapon_ninja_body", set_game
, 2,10,8,2))
329 container
.sprites
.Add(Sprite("weapon_ninja_cursor", set_game
, 0,10,2,2))
330 container
.sprites
.Add(Sprite("weapon_ninja_proj", set_game
, 0,0,0,0))
332 container
.sprites
.Add(Sprite("weapon_rifle_body", set_game
, 2,12,7,3))
333 container
.sprites
.Add(Sprite("weapon_rifle_cursor", set_game
, 0,12,2,2))
334 container
.sprites
.Add(Sprite("weapon_rifle_proj", set_game
, 10,12,2,2))
336 container
.sprites
.Add(Sprite("hook_chain", set_game
, 2,0,1,1))
337 container
.sprites
.Add(Sprite("hook_head", set_game
, 3,0,2,1))
339 container
.sprites
.Add(Sprite("weapon_ninja_muzzle1", set_game
, 25,0,7,4))
340 container
.sprites
.Add(Sprite("weapon_ninja_muzzle2", set_game
, 25,4,7,4))
341 container
.sprites
.Add(Sprite("weapon_ninja_muzzle3", set_game
, 25,8,7,4))
343 container
.sprites
.Add(Sprite("pickup_health", set_game
, 10,2,2,2))
344 container
.sprites
.Add(Sprite("pickup_armor", set_game
, 12,2,2,2))
345 container
.sprites
.Add(Sprite("pickup_weapon", set_game
, 3,0,6,2))
346 container
.sprites
.Add(Sprite("pickup_ninja", set_game
, 2,10,8,2))
348 container
.sprites
.Add(Sprite("flag_blue", set_game
, 12,8,4,8))
349 container
.sprites
.Add(Sprite("flag_red", set_game
, 16,8,4,8))
351 container
.sprites
.Add(Sprite("tee_body", set_tee
, 0,0,3,3))
352 container
.sprites
.Add(Sprite("tee_body_outline", set_tee
, 3,0,3,3))
353 container
.sprites
.Add(Sprite("tee_foot", set_tee
, 6,1,2,1))
354 container
.sprites
.Add(Sprite("tee_foot_outline", set_tee
, 6,2,2,1))
355 container
.sprites
.Add(Sprite("tee_hand", set_tee
, 6,0,1,1))
356 container
.sprites
.Add(Sprite("tee_hand_outline", set_tee
, 7,0,1,1))
357 container
.sprites
.Add(Sprite("tee_eye_normal", set_tee
, 2,3,1,1))
358 container
.sprites
.Add(Sprite("tee_eye_angry", set_tee
, 3,3,1,1))
359 container
.sprites
.Add(Sprite("tee_eye_pain", set_tee
, 4,3,1,1))
360 container
.sprites
.Add(Sprite("tee_eye_happy", set_tee
, 5,3,1,1))
361 container
.sprites
.Add(Sprite("tee_eye_dead", set_tee
, 6,3,1,1))
362 container
.sprites
.Add(Sprite("tee_eye_surprise", set_tee
, 7,3,1,1))
364 container
.sprites
.Add(Sprite("oop", set_emoticons
, 0, 0, 1, 1))
365 container
.sprites
.Add(Sprite("exclamation", set_emoticons
, 1, 0, 1, 1))
366 container
.sprites
.Add(Sprite("hearts", set_emoticons
, 2, 0, 1, 1))
367 container
.sprites
.Add(Sprite("drop", set_emoticons
, 3, 0, 1, 1))
368 container
.sprites
.Add(Sprite("dotdot", set_emoticons
, 0, 1, 1, 1))
369 container
.sprites
.Add(Sprite("music", set_emoticons
, 1, 1, 1, 1))
370 container
.sprites
.Add(Sprite("sorry", set_emoticons
, 2, 1, 1, 1))
371 container
.sprites
.Add(Sprite("ghost", set_emoticons
, 3, 1, 1, 1))
372 container
.sprites
.Add(Sprite("sushi", set_emoticons
, 0, 2, 1, 1))
373 container
.sprites
.Add(Sprite("splattee", set_emoticons
, 1, 2, 1, 1))
374 container
.sprites
.Add(Sprite("deviltee", set_emoticons
, 2, 2, 1, 1))
375 container
.sprites
.Add(Sprite("zomg", set_emoticons
, 3, 2, 1, 1))
376 container
.sprites
.Add(Sprite("zzz", set_emoticons
, 0, 3, 1, 1))
377 container
.sprites
.Add(Sprite("wtf", set_emoticons
, 1, 3, 1, 1))
378 container
.sprites
.Add(Sprite("eyes", set_emoticons
, 2, 3, 1, 1))
379 container
.sprites
.Add(Sprite("question", set_emoticons
, 3, 3, 1, 1))
381 container
.sprites
.Add(Sprite("browse_lock", set_browseicons
, 0,0,1,1))
382 container
.sprites
.Add(Sprite("browse_heart", set_browseicons
, 1,0,1,1))
383 container
.sprites
.Add(Sprite("browse_unpure", set_browseicons
, 3,0,1,1))
385 container
.sprites
.Add(Sprite("demobutton_play", set_demobuttons
, 0,0,1,1))
386 container
.sprites
.Add(Sprite("demobutton_pause", set_demobuttons
, 1,0,1,1))
387 container
.sprites
.Add(Sprite("demobutton_stop", set_demobuttons
, 2,0,1,1))
388 container
.sprites
.Add(Sprite("demobutton_slower", set_demobuttons
, 3,0,1,1))
389 container
.sprites
.Add(Sprite("demobutton_faster", set_demobuttons
, 4,0,1,1))
391 container
.sprites
.Add(Sprite("file_demo1", set_fileicons
, 0,0,1,1))
392 container
.sprites
.Add(Sprite("file_demo2", set_fileicons
, 1,0,1,1))
393 container
.sprites
.Add(Sprite("file_folder", set_fileicons
, 2,0,1,1))
394 container
.sprites
.Add(Sprite("file_map1", set_fileicons
, 5,0,1,1))
395 container
.sprites
.Add(Sprite("file_map2", set_fileicons
, 6,0,1,1))
397 container
.sprites
.Add(Sprite("guibutton_off", set_guibuttons
, 0,0,4,4))
398 container
.sprites
.Add(Sprite("guibutton_on", set_guibuttons
, 4,0,4,4))
399 container
.sprites
.Add(Sprite("guibutton_hover", set_guibuttons
, 8,0,4,4))
401 container
.sprites
.Add(Sprite("guiicon_mute", set_guiicons
, 0,0,4,2))
402 container
.sprites
.Add(Sprite("guiicon_friend", set_guiicons
, 4,0,4,2))
404 anim
= Animation("base")
405 anim
.body
.frames
.Add(AnimKeyframe(0, 0, -4, 0))
406 anim
.back_foot
.frames
.Add(AnimKeyframe(0, 0, 10, 0))
407 anim
.front_foot
.frames
.Add(AnimKeyframe(0, 0, 10, 0))
408 container
.animations
.Add(anim
)
410 anim
= Animation("idle")
411 anim
.back_foot
.frames
.Add(AnimKeyframe(0, -7, 0, 0))
412 anim
.front_foot
.frames
.Add(AnimKeyframe(0, 7, 0, 0))
413 container
.animations
.Add(anim
)
415 anim
= Animation("inair")
416 anim
.back_foot
.frames
.Add(AnimKeyframe(0, -3, 0, -0.1))
417 anim
.front_foot
.frames
.Add(AnimKeyframe(0, 3, 0, -0.1))
418 container
.animations
.Add(anim
)
420 anim
= Animation("walk")
421 anim
.body
.frames
.Add(AnimKeyframe(0.0, 0, 0, 0))
422 anim
.body
.frames
.Add(AnimKeyframe(0.2, 0,-1, 0))
423 anim
.body
.frames
.Add(AnimKeyframe(0.4, 0, 0, 0))
424 anim
.body
.frames
.Add(AnimKeyframe(0.6, 0, 0, 0))
425 anim
.body
.frames
.Add(AnimKeyframe(0.8, 0,-1, 0))
426 anim
.body
.frames
.Add(AnimKeyframe(1.0, 0, 0, 0))
428 anim
.back_foot
.frames
.Add(AnimKeyframe(0.0, 8, 0, 0))
429 anim
.back_foot
.frames
.Add(AnimKeyframe(0.2, -8, 0, 0))
430 anim
.back_foot
.frames
.Add(AnimKeyframe(0.4,-10,-4, 0.2))
431 anim
.back_foot
.frames
.Add(AnimKeyframe(0.6, -8,-8, 0.3))
432 anim
.back_foot
.frames
.Add(AnimKeyframe(0.8, 4,-4,-0.2))
433 anim
.back_foot
.frames
.Add(AnimKeyframe(1.0, 8, 0, 0))
435 anim
.front_foot
.frames
.Add(AnimKeyframe(0.0,-10,-4, 0.2))
436 anim
.front_foot
.frames
.Add(AnimKeyframe(0.2, -8,-8, 0.3))
437 anim
.front_foot
.frames
.Add(AnimKeyframe(0.4, 4,-4,-0.2))
438 anim
.front_foot
.frames
.Add(AnimKeyframe(0.6, 8, 0, 0))
439 anim
.front_foot
.frames
.Add(AnimKeyframe(0.8, 8, 0, 0))
440 anim
.front_foot
.frames
.Add(AnimKeyframe(1.0,-10,-4, 0.2))
441 container
.animations
.Add(anim
)
443 anim
= Animation("hammer_swing")
444 anim
.attach
.frames
.Add(AnimKeyframe(0.0, 0, 0, -0.10))
445 anim
.attach
.frames
.Add(AnimKeyframe(0.3, 0, 0, 0.25))
446 anim
.attach
.frames
.Add(AnimKeyframe(0.4, 0, 0, 0.30))
447 anim
.attach
.frames
.Add(AnimKeyframe(0.5, 0, 0, 0.25))
448 anim
.attach
.frames
.Add(AnimKeyframe(1.0, 0, 0, -0.10))
449 container
.animations
.Add(anim
)
451 anim
= Animation("ninja_swing")
452 anim
.attach
.frames
.Add(AnimKeyframe(0.00, 0, 0, -0.25))
453 anim
.attach
.frames
.Add(AnimKeyframe(0.10, 0, 0, -0.05))
454 anim
.attach
.frames
.Add(AnimKeyframe(0.15, 0, 0, 0.35))
455 anim
.attach
.frames
.Add(AnimKeyframe(0.42, 0, 0, 0.40))
456 anim
.attach
.frames
.Add(AnimKeyframe(0.50, 0, 0, 0.35))
457 anim
.attach
.frames
.Add(AnimKeyframe(1.00, 0, 0, -0.25))
458 container
.animations
.Add(anim
)
460 weapon
= WeaponSpec(container
, "hammer")
461 weapon
.firedelay
.Set(125)
463 weapon
.visual_size
.Set(96)
464 weapon
.offsetx
.Set(4)
465 weapon
.offsety
.Set(-20)
466 container
.weapons
.hammer
.base
.Set(weapon
)
467 container
.weapons
.id.Add(weapon
)
469 weapon
= WeaponSpec(container
, "gun")
470 weapon
.firedelay
.Set(125)
471 weapon
.ammoregentime
.Set(500)
472 weapon
.visual_size
.Set(64)
473 weapon
.offsetx
.Set(32)
474 weapon
.offsety
.Set(-4)
475 weapon
.muzzleoffsetx
.Set(50)
476 weapon
.muzzleoffsety
.Set(6)
477 container
.weapons
.gun
.base
.Set(weapon
)
478 container
.weapons
.id.Add(weapon
)
480 weapon
= WeaponSpec(container
, "shotgun")
481 weapon
.firedelay
.Set(500)
482 weapon
.visual_size
.Set(96)
483 weapon
.offsetx
.Set(24)
484 weapon
.offsety
.Set(-2)
485 weapon
.muzzleoffsetx
.Set(70)
486 weapon
.muzzleoffsety
.Set(6)
487 container
.weapons
.shotgun
.base
.Set(weapon
)
488 container
.weapons
.id.Add(weapon
)
490 weapon
= WeaponSpec(container
, "grenade")
491 weapon
.firedelay
.Set(500) # TODO: fix this
492 weapon
.visual_size
.Set(96)
493 weapon
.offsetx
.Set(24)
494 weapon
.offsety
.Set(-2)
495 container
.weapons
.grenade
.base
.Set(weapon
)
496 container
.weapons
.id.Add(weapon
)
498 weapon
= WeaponSpec(container
, "rifle")
499 weapon
.firedelay
.Set(800)
500 weapon
.visual_size
.Set(92)
502 weapon
.offsetx
.Set(24)
503 weapon
.offsety
.Set(-2)
504 container
.weapons
.rifle
.base
.Set(weapon
)
505 container
.weapons
.id.Add(weapon
)
507 weapon
= WeaponSpec(container
, "ninja")
508 weapon
.firedelay
.Set(800)
510 weapon
.visual_size
.Set(96)
511 weapon
.offsetx
.Set(0)
512 weapon
.offsety
.Set(0)
513 weapon
.muzzleoffsetx
.Set(40)
514 weapon
.muzzleoffsety
.Set(-4)
515 container
.weapons
.ninja
.base
.Set(weapon
)
516 container
.weapons
.id.Add(weapon
)