| Copyright | (c) 2015 Martin Grabmueller |
|---|---|
| License | BSD3 |
| Maintainer | martin@grabmueller.de |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Game.Waddle.ExportJS
Description
The function exportJS exports a WAD file into several JavaScript
files, where each file defines an object:
- One file for each level, called
level-E1M1.js,level-MAP03.jsetc. Each file defines an object for the level, called e.g.level_E1M1. Example:
var level_E1M1 = {
things: [ ... ],
...
vertices: [
{x:1088,y:-3680},
...
],
...
};- One file
levels.js, which includes all levels and defines an object calledlevels. Example:
var levels = {"MAP01": level_MAP01, ..., "MAP32": level_MAP32};- One file for textures, called
textures.js, defining an objecttextures. Example:
var textures = {
"AASHITTY": {name:"AASHITTY",width:64,height:64,patches:[
{xoffset:0,yoffset:0,pname:0,stepdir:1,colormap:0}
]},
...
};- One file for flats (floors and ceilings), called
flats.js, defining an objectflats. Example:
var flats = {
"BLOOD1":{name:"BLOOD1",data:[46,46,45,...]},
...
};- One file for sprites, called
sprites.js, defining an objectsprites. No example, I think you get the idea! - One file for patches, called
patches.js, defining an objectpatches. - One file for pnames, called
pnames.js, defining a listpnames. - One file for palettes, called
palettes.js, defining a list of listspalettes. - One file for colormaps, called
colormap.js, defining a listcolormap.
To see how this data can be used, have a look at the HTML5 view included in the distribution in directory "visualize".