diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..a762662 --- /dev/null +++ b/CHANGES @@ -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] diff --git a/manual.html b/manual.html index 9f67fd2..f595a40 100644 --- a/manual.html +++ b/manual.html @@ -35,15 +35,18 @@

Omgifol manual

Installation

  1. Install Python 2.7 or 3.x, which can be downloaded from http://python.org -
  2. Extract the files in the Omgifol package into a directory named "omg" in pythondir/Lib/site-packages (replace pythondir with the directory where Python is installed). +
  3. Use pip to install Omgifol: pip install omgifol +
  4. Or, if pip is unavailable, extract the "omg" directory in the Omgifol package into pythondir/Lib/site-packages (replace pythondir with the directory where Python is installed).

Optionally:

-
  1. Install the Python Imaging Library (http://www.pythonware.com/products/pil/) or the newer Pillow (https://python-pillow.github.io). This is required to save or load images. -
  2. Install Psyco (http://psyco.sourceforge.net/). This can make Omgifol quite a bit faster, typically 2-10x. +
    1. Install the Pillow library (https://python-pillow.github.io). This is required to import or export images. +
    2. +
    3. Install the PySoundFile library (https://pysoundfile.readthedocs.io). This is required to import or export sound files. +
    4. +
    -

Using Omgifol

At the beginning of an interactive session, or as the first line in a Python script file, enter

@@ -176,7 +179,7 @@

Omgifol manual

 w.data['FOOF'] = Lump('Hello!')
 

Graphic lumps

-

There are subclasses of Lump for different types of lumps. Currently, only two of these provide special functionality: Graphic and Flat. +

There are subclasses of Lump for different types of lumps. Currently, only these provide special functionality: Graphic, Flat, and Sound.

Graphic, used to represent Doom format graphics, provides the following settable attributes:

@@ -198,6 +201,23 @@

Omgifol manual

For the argument lists used by these functions, refer to the code and the inline documenation in lump.py.

Flat works similarly to Graphic, but handles format conversions slightly differently. +

Sound, used to represent Doom format sounds, provides the following settable attributes: +

+
 .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)
+
+

Graphic defines the following methods in adddition to those defined by Lump: +

+
 .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
+
+ +

Editors

Editors 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: diff --git a/omg/__init__.py b/omg/__init__.py index 6271fcb..44335a5 100644 --- a/omg/__init__.py +++ b/omg/__init__.py @@ -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 * diff --git a/omg/mapedit.py b/omg/mapedit.py index 0f3eeca..a2fe1f7 100644 --- a/omg/mapedit.py +++ b/omg/mapedit.py @@ -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""" diff --git a/readme.txt b/readme.txt index c4a636c..45e1dac 100644 --- a/readme.txt +++ b/readme.txt @@ -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 diff --git a/setup.py b/setup.py index 57fd459..89c66a5 100644 --- a/setup.py +++ b/setup.py @@ -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',