My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/ruby

#
# [[ Frozen-Bubble ]]
#
# Copyright (c) 2000-2007 Guillaume Cottenceau.
# Flash sourcecode - Copyright (c) 2007 Mickael Foucaux.
#
# This code is distributed under the GNU General Public License
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# Artwork:
# Alexis Younes <73lab at free.fr>
# (everything but the bubbles)
# Amaury Amblard-Ladurantie <amaury at linuxfr.org>
# (the bubbles)
#
# Soundtrack:
# Matthias Le Bidan <matthias.le_bidan at caramail.com>
# (the three musics and all the sound effects)
#
# Design & Programming:
# Guillaume Cottenceau <guillaume.cottenceau at free.fr>
# (design and manage the project, whole Perl sourcecode)
#
# JavaScript version:
# Glenn Sanson <glenn.sanson at free.fr>
# (whole JavaScript sourcecode, including JIGA classes
# http://glenn.sanson.free.fr/v2/?select=jiga )
#
# Flash version :
# Mickael Foucaux <mickael.foucaux at gmail.com>
# http://code.google.com/p/frozenbubbleflash/
#

xml = File.new("game.xml","w")

[
'<?xml version="1.0" encoding="iso-8859-1" ?>',
'<movie width="640" height="480" framerate="40">',
' <background color="#ffffff"/>',
' <frame>',
' <library>'
].each { |line|
xml.write line + "\n"
}

["snd","gfx"].each { |rep|
Dir.new(rep).each { |file|
next if (file == "." or file == "..")
name = file[0...-4]
xml.write "\t\t<clip id=\"#{name}\" import=\"./#{rep}/#{file}\"/>\n"
}
}

[
' </library>',
' </frame>',
'</movie>',
].each { |line|
xml.write line + "\n"
}

Change log

r2 by mickael.foucaux on Apr 15, 2007   Diff
first release
to play use arrow ;)
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 2181 bytes, 75 lines

File properties

svn:executable
Powered by Google Project Hosting