Commit graph

7 commits

Author SHA1 Message Date
Major Cooke
7c4c0163a3 Added A_OverlayPivotAlign and A_OverlayVertexOffset.
A_OverlayPivotAlign(int layer, int halign, int valign)
- Aligns the pivot point origin to a corner of the PSprite before applying offsets.
- - halign: Horizontal. Applicable constants are PSPA_<LEFT/CENTER/RIGHT>.
- - valign: Vertical. Applicable constants are PSPA_<TOP/CENTER/BOTTOM>.
- - Default is top left.

A_OverlayVertexOffset(int layer, int index, double x, double y, int flags)
- Allows offsetting the corners of the psprite, granting modders the ability to skew weapon sprites as they see fit.
- - index: The index of the vertice. Valid ranges are between [0,3].
- - x/y: Offsets of vertices.
- - flags: Takes WOF_ flags.

Other changes:
- Removed pivot point interpolation since it's pointless.
- Removed PSPF_PIVOTSCREEN due to complications with it having relativity. This will be revisited either later or in another submission.
- Added ResetPSprite() to be called with BringUpWeapon(), A_Lower(), and morph weapon raising to reset all the new properties to 0.

Nearly ready now. Just some final testing needed.
2020-10-25 15:42:11 +01:00
Christoph Oelckers
4fb6b7c7d4 - block off the Substitute function by making it private to the 3 classes that really need it. 2020-04-19 21:08:24 +02:00
Christoph Oelckers
a638cfbd6e - fixed: player_t::GetPSprite cannot guarantee success
As a consequence it must return null in the failure case instead of asserting and all calls to this function must check for the failure case.
2020-03-11 00:56:29 +01:00
Major Cooke
70f9b649aa Changed Pre/Post(Un)Morph to take the other actor and a boolean indicating direction.
- 'current' is true for the actor that is the new body, false for the old body.
2020-03-08 15:29:09 +01:00
Major Cooke
33b343ef31 Added Pre(Un)Morph and Post(Un)Morph functions.
- cls: The other class's cast type which the actor is transitioning from/to.
2020-03-08 15:29:09 +01:00
Christoph Oelckers
0febe20a08 - fixed: Unmorphing a monster did not clear its UNMORPHED flag. 2019-03-02 13:15:38 +01:00
Christoph Oelckers
b542d1371d - reorganized the ZScript content in gzdoom.pk3 and changed the files' extensions to something unique for easier syntax highlighting. 2019-02-23 12:08:27 +01:00
Renamed from wadsrc/static/zscript/shared/morph.txt (Browse further)