Merge remote-tracking (subtree) branch 'PracticingFlixel/master'
This commit is contained in:
commit
c0473f6fc3
2
PracticingFlixel/.gitignore
vendored
Normal file
2
PracticingFlixel/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dist/*.swf
|
||||||
|
dist/*.html
|
24
PracticingFlixel/.gitmodules
vendored
Normal file
24
PracticingFlixel/.gitmodules
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[submodule "HelloWorld"]
|
||||||
|
path = HelloWorld
|
||||||
|
url = git@github.com:meatballhat/HelloWorld.git
|
||||||
|
[submodule "flixel"]
|
||||||
|
path = flixel
|
||||||
|
url = git@github.com:meatballhat/flixel.git
|
||||||
|
[submodule "FlxInvaders"]
|
||||||
|
path = FlxInvaders
|
||||||
|
url = git@github.com:meatballhat/Flx-Invaders.git
|
||||||
|
[submodule "FlxCollisions"]
|
||||||
|
path = FlxCollisions
|
||||||
|
url = git@github.com:meatballhat/FlxCollisions.git
|
||||||
|
[submodule "FlxTeroids"]
|
||||||
|
path = FlxTeroids
|
||||||
|
url = git@github.com:meatballhat/FlxTeroids.git
|
||||||
|
[submodule "FlxBlur"]
|
||||||
|
path = FlxBlur
|
||||||
|
url = git@github.com:meatballhat/FlxBlur.git
|
||||||
|
[submodule "FlxBloom"]
|
||||||
|
path = FlxBloom
|
||||||
|
url = git@github.com:meatballhat/FlxBloom.git
|
||||||
|
[submodule "Mode"]
|
||||||
|
path = Mode
|
||||||
|
url = git@github.com:meatballhat/Mode.git
|
1
PracticingFlixel/FlxBloom
Submodule
1
PracticingFlixel/FlxBloom
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 3c6eb4461ddeabdaae679355999fd3a8cde6659e
|
1
PracticingFlixel/FlxBlur
Submodule
1
PracticingFlixel/FlxBlur
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 91c04213927598f054f9c53b3813c568e6d4b470
|
1
PracticingFlixel/FlxCollisions
Submodule
1
PracticingFlixel/FlxCollisions
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 6864eceee470fbc12d01620a01f46be7a165457f
|
1
PracticingFlixel/FlxInvaders
Submodule
1
PracticingFlixel/FlxInvaders
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 3ee355b5d143db62346901ed62b907add71e7e48
|
1
PracticingFlixel/FlxTeroids
Submodule
1
PracticingFlixel/FlxTeroids
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 18f31fccb65ea254305a7a2b99df3a4a35489eaf
|
1
PracticingFlixel/HelloWorld
Submodule
1
PracticingFlixel/HelloWorld
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 9e09b278c881bacab4adcea76222bd2efbfd1e2f
|
42
PracticingFlixel/Makefile
Normal file
42
PracticingFlixel/Makefile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
TOP := $(PWD)
|
||||||
|
FLIXEL := $(TOP)/flixel
|
||||||
|
PYTHON := python2.6
|
||||||
|
WRAP := $(TOP)/flash_html_wrap.py
|
||||||
|
DIST := $(TOP)/dist
|
||||||
|
|
||||||
|
MXMLC := mxmlc
|
||||||
|
MXMLC_FLAGS := -sp $(FLIXEL)
|
||||||
|
|
||||||
|
PROJECTS = \
|
||||||
|
FlxInvaders \
|
||||||
|
FlxBloom \
|
||||||
|
FlxBlur \
|
||||||
|
FlxCollisions \
|
||||||
|
FlxTeroids \
|
||||||
|
HelloWorld \
|
||||||
|
Mode
|
||||||
|
|
||||||
|
|
||||||
|
mkproject = \
|
||||||
|
cd $(project)/src && $(MAKE) && \
|
||||||
|
cd $(TOP) && \
|
||||||
|
$(call mkhtmlwrap,$(project)) && \
|
||||||
|
cd $(TOP) ;
|
||||||
|
|
||||||
|
|
||||||
|
mkhtmlwrap = \
|
||||||
|
cp $(TOP)/$(1)/src/$(1).swf $(DIST)/$(1).swf && \
|
||||||
|
$(PYTHON) $(WRAP) -P $(DIST)/$(1).properties > $(DIST)/$(1).html
|
||||||
|
|
||||||
|
|
||||||
|
%.html: %.swf
|
||||||
|
$(call mkhtmlwrap,$(*F))
|
||||||
|
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(foreach project,$(PROJECTS),$(mkproject)) echo "done" ;
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
.EXPORT_ALL_VARIABLES:
|
||||||
|
.SILENT: all
|
1
PracticingFlixel/Mode
Submodule
1
PracticingFlixel/Mode
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 1abd28d533c4a005149252b2b00aef7ea1499231
|
6
PracticingFlixel/dist/FlxBloom.properties
vendored
Normal file
6
PracticingFlixel/dist/FlxBloom.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Flixel Bloom
|
||||||
|
bgcolor=#000
|
||||||
|
application=flixel-bloom-app
|
||||||
|
swf=FlxBloom
|
||||||
|
width=800
|
||||||
|
height=600
|
6
PracticingFlixel/dist/FlxBlur.properties
vendored
Normal file
6
PracticingFlixel/dist/FlxBlur.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Flixel Blur
|
||||||
|
bgcolor=#000
|
||||||
|
application=flixel-blur-app
|
||||||
|
swf=FlxBlur
|
||||||
|
width=800
|
||||||
|
height=600
|
6
PracticingFlixel/dist/FlxCollisions.properties
vendored
Normal file
6
PracticingFlixel/dist/FlxCollisions.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Flixel Collisions
|
||||||
|
bgcolor=#000
|
||||||
|
application=flixel-collisions-app
|
||||||
|
swf=FlxCollisions
|
||||||
|
width=800
|
||||||
|
height=600
|
6
PracticingFlixel/dist/FlxInvaders.properties
vendored
Normal file
6
PracticingFlixel/dist/FlxInvaders.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Flixel Invaders
|
||||||
|
bgcolor=#000
|
||||||
|
application=flixel-invaders-app
|
||||||
|
swf=FlxInvaders
|
||||||
|
width=640
|
||||||
|
height=480
|
6
PracticingFlixel/dist/FlxTeroids.properties
vendored
Normal file
6
PracticingFlixel/dist/FlxTeroids.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Flixel Teroids
|
||||||
|
bgcolor=#000
|
||||||
|
application=flixel-teroids-app
|
||||||
|
swf=FlxTeroids
|
||||||
|
width=800
|
||||||
|
height=600
|
6
PracticingFlixel/dist/HelloWorld.properties
vendored
Normal file
6
PracticingFlixel/dist/HelloWorld.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Hello World
|
||||||
|
bgcolor=#000
|
||||||
|
application=hello-world-app
|
||||||
|
swf=HelloWorld
|
||||||
|
width=800
|
||||||
|
height=600
|
6
PracticingFlixel/dist/Mode.properties
vendored
Normal file
6
PracticingFlixel/dist/Mode.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
title=Mode
|
||||||
|
bgcolor=#000
|
||||||
|
application=mode-app
|
||||||
|
swf=Mode
|
||||||
|
width=800
|
||||||
|
height=600
|
116
PracticingFlixel/flash_html_wrap.py
Normal file
116
PracticingFlixel/flash_html_wrap.py
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from string import Template
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
OPTIONS = (
|
||||||
|
(('-P', '--properties-file'),
|
||||||
|
dict(help='specify a properties file for use as variables '
|
||||||
|
'in html wrapper')),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main(sysargs=sys.argv[:]):
|
||||||
|
parser = get_option_parser()
|
||||||
|
opts = parser.parse_args(sysargs[1:])
|
||||||
|
|
||||||
|
tmpl_vars = dict(VARS)
|
||||||
|
|
||||||
|
if opts.properties_file:
|
||||||
|
_update_from_properties(tmpl_vars, opts.properties_file)
|
||||||
|
|
||||||
|
print(TEMPLATE.substitute(**tmpl_vars))
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def get_option_parser():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
for args, kwargs in OPTIONS:
|
||||||
|
parser.add_argument(*args, **kwargs)
|
||||||
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
def _update_from_properties(tmpl_vars, properties_file):
|
||||||
|
defines = _get_defines_from_properties_file(properties_file)
|
||||||
|
tmpl_vars.update(defines)
|
||||||
|
|
||||||
|
|
||||||
|
def _get_defines_from_properties_file(properties_file):
|
||||||
|
ret = {}
|
||||||
|
|
||||||
|
with open(properties_file) as opened:
|
||||||
|
|
||||||
|
for line in opened:
|
||||||
|
line = line.strip()
|
||||||
|
|
||||||
|
if line.startswith('#'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
if '=' in line:
|
||||||
|
key, value = line.split('=', 1)
|
||||||
|
ret[key] = value
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
VARS = (
|
||||||
|
('title', ''),
|
||||||
|
('bgcolor', ''),
|
||||||
|
('application', ''),
|
||||||
|
('swf', ''),
|
||||||
|
('width', ''),
|
||||||
|
('height', ''),
|
||||||
|
)
|
||||||
|
TEMPLATE = Template("""
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>${title}</title>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
html, body { height:100%; }
|
||||||
|
body {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
overflow:auto;
|
||||||
|
text-align:center;
|
||||||
|
background-color: ${bgcolor};
|
||||||
|
}
|
||||||
|
#flashContent {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
*/]]>*/
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
|
||||||
|
width="${width}" height="${height}" id="${application}">
|
||||||
|
<param name="movie" value="${swf}.swf" />
|
||||||
|
<param name="quality" value="high" />
|
||||||
|
<param name="bgcolor" value="${bgcolor}" />
|
||||||
|
<param name="allowScriptAccess" value="sameDomain" />
|
||||||
|
<param name="allowFullScreen" value="true" />
|
||||||
|
<!--[if !IE]>-->
|
||||||
|
<object type="application/x-shockwave-flash" data="${swf}.swf"
|
||||||
|
width="${width}" height="${height}">
|
||||||
|
<param name="quality" value="high" />
|
||||||
|
<param name="bgcolor" value="${bgcolor}" />
|
||||||
|
<param name="allowScriptAccess" value="sameDomain" />
|
||||||
|
<param name="allowFullScreen" value="true" />
|
||||||
|
<!--<![endif]-->
|
||||||
|
<!--[if !IE]>-->
|
||||||
|
</object>
|
||||||
|
<!--<![endif]-->
|
||||||
|
</object>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
""")
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
||||||
|
|
||||||
|
# vim:filetype=python
|
1
PracticingFlixel/flixel
Submodule
1
PracticingFlixel/flixel
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit c2cf2b705436ca2119b6e78646c4ec68935cf061
|
Loading…
Reference in New Issue
Block a user