From ae7300dfc6edba52eb45fe74d4d07fc6e325c5bf Mon Sep 17 00:00:00 2001
From: devinacker Optionally:
At the beginning of an interactive session, or as the first line in a Python script file, enter
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:
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:
+ Graphic defines the following methods in adddition to those defined by Lump:
+Omgifol manual
Installation
-Using Omgifol
Omgifol manual
w.data['FOOF'] = Lump('Hello!')
Graphic lumps
-Omgifol manual
.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)
+
+ .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 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',