Skip to content

Commit

Permalink
get ready for 0.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
devinacker committed Feb 23, 2018
1 parent 6be805a commit ae7300d
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 25 deletions.
29 changes: 29 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
0.4.0 (2018/02/22)

add support for importing/exporting/editing sound effect lumps
add 'Thing' and 'Linedef' members to MapEditor class (aliases to the
thing and linedef classes used by the current map format)
add support for data stored inside map header lumps (e.g. FraggleScript)
add ability for WAD and WadIO classes to use empty space in WAD file, if
possible ('use_free' argument in relevant methods)
enforce maximum size for patch lumps
remove some old chr() calls for Python 3 users
fix previously broken WAD.load method
fix palette index 0 in patches becoming transparent when exporting
fix some lumps falsely being loaded as maps (e.g. aaliens.wad "LOADACS",
which was followed by a "SCRIPTS" lump and thus detected as a map)

0.3.0 (2017/10/06)

add support for Python 3.x (experimental; 3.5.0 or higher recommended)
add support for Hexen / ZDoom maps
add better map loading (supports names other than ExMx and MAPxx,
doesn't mistake MAPINFO for an actual map)
add better support for "limit removing" maps
add tall patch support
add support for importing/exporting RGBA images (converted to the WAD's
256-color palette on import, but can contain true transparency)
add better handling of missing map data
add draw_sector and misc. helper functions to MapEditor [jmickle66666666]
add ability to individually change single flags (by name) with MapEditor
fix a colormap generation bug and add Colormap.set_position [jmickle66666666]
30 changes: 25 additions & 5 deletions manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@ <h1>Omgifol manual</h1>
</td></tr></table>
<a name="Installation"></a><h2>Installation</h2>
<ol><li> Install Python 2.7 or 3.x, which can be downloaded from <a href="http://python.org" class='external' title="http://python.org">http://python.org</a>
</li><li> Extract the files in the Omgifol package into a directory named "omg" in <em>pythondir</em>/Lib/site-packages (replace <em>pythondir</em> with the directory where Python is installed).
</li><li> Use pip to install Omgifol: <tt>pip install omgifol</tt>
</li><li> Or, if pip is unavailable, extract the "omg" directory in the Omgifol package into <em>pythondir</em>/Lib/site-packages (replace <em>pythondir</em> with the directory where Python is installed).
</li></ol>
<p>Optionally:

</p>
<ol><li> Install the <a href='http://www.pythonware.com/products/pil/' class='external' title="http://www.pythonware.com/products/pil/">Python Imaging Library</a><span class='urlexpansion'> (<i>http://www.pythonware.com/products/pil/</i>)</span> or the newer <a href='https://python-pillow.github.io' class='external' title="https://python-pillow.github.io">Pillow</a><span class='urlexpansion'> (<i>https://python-pillow.github.io</i>)</span>. This is required to save or load images.
</li><li> Install <a href='http://psyco.sourceforge.net/' class='external' title="http://psyco.sourceforge.net/">Psyco</a><span class='urlexpansion'> (<i>http://psyco.sourceforge.net/</i>)</span>. This can make Omgifol quite a bit faster, typically 2-10x.
<ol><li> Install the <a href='https://python-pillow.github.io' class='external' title="https://python-pillow.github.io">Pillow library</a><span class='urlexpansion'> (<i>https://python-pillow.github.io</i>)</span>. This is required to import or export images.
</li>
<li> Install the <a href='https://pysoundfile.readthedocs.io' class='external' title="https://pysoundfile.readthedocs.io">PySoundFile library</a><span class='urlexpansion'> (<i>https://pysoundfile.readthedocs.io</i>)</span>. This is required to import or export sound files.
</li>
</ol>

</li></ol>
<a name="Using_Omgifol"></a><h2>Using Omgifol</h2>
<p>At the beginning of an interactive session, or as the first line in a Python script file, enter
</p>
Expand Down Expand Up @@ -176,7 +179,7 @@ <h1>Omgifol manual</h1>
<pre> w.data['FOOF'] = Lump('Hello!')
</pre>
<a name="Graphic_lumps"></a><h3>Graphic lumps</h3>
<p>There are subclasses of <tt >Lump</tt > for different types of lumps. Currently, only two of these provide special functionality: <tt >Graphic</tt > and <tt >Flat</tt >.
<p>There are subclasses of <tt >Lump</tt > for different types of lumps. Currently, only these provide special functionality: <tt >Graphic</tt >, <tt >Flat</tt >, and <tt>Sound</tt>.

</p><p><tt >Graphic</tt >, used to represent Doom format graphics, provides the following settable attributes:
</p>
Expand All @@ -198,6 +201,23 @@ <h1>Omgifol manual</h1>
<p>For the argument lists used by these functions, refer to the code and the inline documenation in lump.py.
</p><p><tt >Flat</tt > works similarly to <tt >Graphic</tt >, but handles format conversions slightly differently.

</p><p><tt >Sound</tt >, used to represent Doom format sounds, provides the following settable attributes:
</p>
<pre> .format Sound effect format (0-3)
.length Length of sound in samples
.sample_rate Sample rate for digitized sounds (defaults to 11025)
.midi_bank MIDI patch bank number (formats 1-2 only)
.midi_patch MIDI patch number (formats 1-2 only)
</pre>
<p><tt >Graphic</tt > defines the following methods in adddition to those defined by <tt >Lump</tt >:
</p>
<pre> .from_raw Load from a raw sound file
.to_raw Return the sound file converted to raw samples
.from_file Load from a sound file
.to_file Save the sound to a file
</pre>


</p>
<a name="Editors"></a><h2>Editors</h2>
<p><em>Editors</em> are used to edit lumps or lump groups. They represent lump data with high-level objects and structures, and provide methods to modify the data. The following editors have been implemented so far:
Expand Down
2 changes: 1 addition & 1 deletion omg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '0.3.0'
__version__ = '0.4.0'
__author__ = 'Devin Acker, Fredrik Johansson'

from omg.wadio import *
Expand Down
23 changes: 21 additions & 2 deletions omg/mapedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,30 @@ class MapEditor:
"""Doom map editor
Data members:
header Lump object consisting of data in map header (if any)
vertexes List containing Vertex objects
sidedefs List containing Sidedef objects
linedefs List containing Linedef objects
linedefs List containing Linedef or ZLinedef objects
sectors List containing Sector objects
things List containing Thing objects"""
things List containing Thing or ZThing objects
Data members (Hexen/ZDoom formats only):
behavior Lump object containing compiled ACS scripts
scripts Lump object containing ACS script source
Other members:
Thing alias to Thing or ZThing class, depending on format
Linedef alias to Linedef or ZLinedef class, depending on format
Currently present but unused:
segs List containing Seg objects
ssectors List containing SubSector objects
nodes List containing Node objects
blockmap Lump object containing blockmap data
reject Lump object containing reject table data
(These five lumps are not updated when saving; you will need to use
an external node builder utility)
"""

def __init__(self, from_lumps=None):
"""Create new, optionally from a lump group"""
Expand Down
20 changes: 4 additions & 16 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
Omgifol -- a Python library for Doom WAD files

By Fredrik Johansson
http://fredrikj.net
Originally by Fredrik Johansson (http://fredrikj.net).
Maintained since 0.3.0 by Devin Acker (http://revenant1.net).

See manual.html for installation and usage notes.
Requires Python 2.7 or Python 3.x.
Use `pip install omgifol` to install. See manual.html (and module/class
docstrings) for usage notes. Requires Python 2.7 or Python 3.x.

This is Revenant's personal fork. What's new:

- support for Python 3.x (experimental; 3.5.0 or higher recommended)
- support for Hexen / ZDoom maps
- better map loading (supports names other than ExMx and MAPxx,
doesn't mistake MAPINFO for an actual map)
- better support for "limit removing" maps
- better handling of missing map data
- tall patch support
- support for importing/exporting RGBA images (converted to the WAD's
256-color palette on import, but can contain true transparency)

Some planned things:

- UDMF map support
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name = 'omgifol',
version = '0.3.0',
version = '0.4.0',
description = 'A Python library for manipulation of Doom WAD files',
url = 'https://github.com/devinacker/omgifol',
author = 'Devin Acker, Fredrik Johansson',
Expand Down

0 comments on commit ae7300d

Please sign in to comment.