patchBos Wars - Patches: patch #7096, Correct z-order and randomize...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7096: Correct z-order and randomize positions of morels and trees within their tiles

Submitter:  Kalle Olavi Niemitalo <kon>
Submitted:  Sat 20 Feb 2010 06:05:29 PM UTC
   
 
Open/Closed:  Open Status:  None
Assigned to:  None

Jump to the original submission

Sun 25 Apr 2010 03:17:09 PM UTC, comment #8: 

Some of the remaining three patches no longer applied cleanly to trunk r9802.  Here are the updated versions (PATCHv6).

(file #20329, file #20330, file #20331)

Kalle Olavi Niemitalo <kon>
Group Member
Sun 18 Apr 2010 04:03:06 PM UTC, comment #7: 

PATCHv5 3/8, PATCHv5 4/8 and PATCHv5 5/8 have been applied too.

François Beerten <feb>
Group administrator
Sun 18 Apr 2010 11:31:46 AM UTC, comment #6: 

First 2 patches have been applied and will get in 2.6.1.

François Beerten <feb>
Group administrator
Sun 18 Apr 2010 10:42:56 AM UTC, comment #5: 

Version 5 of the patch series.  This is for trunk r9745.

  • file #20269: [PATCHv5 1/8] Correct DrawLevel of some unit types
  • file #20270: [PATCHv5 2/8] DrawLevelCompare: Use if...return instead of ?:
  • file #20271: [PATCHv5 3/8] DrawLevelCompare: Compare center tile, not bottom of sprite
  • file #20272: [PATCHv5 4/8] Move morel graphics higher
  • file #20273: [PATCHv5 5/8] Update comments for CUnit::IX, CUnit::IY
  • file #20274: [PATCHv5 6/8] Add RandomPosition property of unit types
  • file #20275: [PATCHv5 7/8] Add NudgeUnitUnderCursor in the map editor
  • file #20276: [PATCHv5 8/8] Randomize positions of trees and morels


The previous version [PATCHv4 1/6] conflicted with trunk r9739 ("Fixed some warnings found by Visual Studio's code analysis").  I fixed that and added [PATCHv5 2/8].  I also split [PATCHv4 1/6] into [PATCHv5 1/8] and [PATCHv5 3/8].

The first five patches in this series could be applied to boswars-1.6.  The last three however will cause sync errors in network games with 1.6, so those should go in trunk only.

Kalle Olavi Niemitalo <kon>
Group Member
Sat 06 Mar 2010 06:12:28 PM UTC, comment #4: 

Version 4 of the patch series.  This is for trunk r9671.

  • file #19862 [PATCHv4 1/6] Adjust what gets drawn in front of what
  • file #19863 [PATCHv4 2/6] Move morel graphics higher
  • file #19864 [PATCHv4 3/6] Update comments for CUnit::IX, CUnit::IY
  • file #19865 [PATCHv4 4/6] Add RandomPosition property of unit types
  • file #19866 [PATCHv4 5/6] Add NudgeUnitUnderCursor in the map editor
  • file #19867 [PATCHv4 6/6] Randomize positions of trees and morels


This has at least these changes since v3:

  • Added a comment about CUnit::IY in sea and air units.
  • NudgeUnitUnderCursor saturates IX and IY to signed char.
  • NudgeUnitUnderCursor uses sprintf_s, so the message can be translated as a whole.
  • Removed some trailing whitespace.


Kalle Olavi Niemitalo <kon>
Group Member
Mon 01 Mar 2010 11:27:15 PM UTC, comment #3: 

There were a few bugs in file #19833 [PATCHv2 4/6] Add RandomPosition property of unit types.

Corrected version (v3) attached.


(file #19837)

Kalle Olavi Niemitalo <kon>
Group Member
Mon 01 Mar 2010 11:14:08 PM UTC, comment #2: 

Version 2 of the patch series.




File #19830
[PATCHv2 1/6] Adjust what gets drawn in front of what

Make DrawLevelCompare ignore the sprite size and consider only the tiles.  An engineer standing in front of an artil now gets properly drawn in the front, rather than lying below.

The engineer had DrawLevel = 25 specified twice.  Remove the duplicate.

Move morels and rocks from DrawLevel = 2 to DrawLevel = 25 so that people who should be walking behind them don't get drawn in the front.




File #19831
[PATCHv2 2/6] Move morel graphics higher

Move the morel graphics up by 16-24 pixels so that the fungi appear to be rooted in the tiles where they are placed, and the position of "unit-destroyed-1x1-place" corpse will match.




File #19832
[PATCHv2 3/6] Update comments for CUnit::IX, CUnit::IY

The values can be negative, too.




File #19833
[PATCHv2 4/6] Add RandomPosition property of unit types

Make it possible to slightly randomize the positions of individual trees in forests.  The amount of randomness is controlled separately for each unit type, and it defaults to zero.

When a unit dies, preserve CUnit::IX and CUnit::IX for the corpse.




File #19834
[PATCHv2 5/6] Add NudgeUnitUnderCursor in the map editor

Shift + arrow keys move the unit under the cursor one pixel at a time.  This is a way to try out coordinates for RandomPosition.




File #19835
[PATCHv2 6/6] Randomize positions of trees and morels

RandomPosition = {-6, -6, 6, 6} for trees seems a good balance between making forests look natural and letting the player see which tile each tree is blocking.




And finally, a screen shot of lava-river.map with randomly positioned trees.  It looks more natural than before, doesn't it?


Kalle Olavi Niemitalo <kon>
Group Member
Mon 01 Mar 2010 12:51:36 AM UTC, comment #1: 

Please don't apply these yet.  I have a nicer solution underway for the random positioning.

Kalle Olavi Niemitalo <kon>
Group Member
Sat 20 Feb 2010 06:05:29 PM UTC, original submission:  

A series of two patches.



0001-Move-morel-graphics-higher.patch
[PATCH 1/2] Move morel graphics higher

Move the morel graphics up by 12-29 pixels so that the fungi appear to be rooted in the tiles where they are placed.  Leave some variation so it doesn't look like someone has planted them in neat rows.



0002-Adjust-what-gets-drawn-in-front-of-what.patch
[PATCH 2/2] Adjust what gets drawn in front of what

Make DrawLevelCompare ignore the sprite size and consider only the tiles.  An engineer standing in front of an artil now gets properly drawn in the front, rather than lying below.

The engineer had DrawLevel = 25 specified twice.  Remove the
duplicate.

Move morels and rocks from DrawLevel = 2 to DrawLevel = 25 so that people who should be walking behind them don't get drawn in the front.



presentation.map
setup.sms

These form a map containing several morels so you can load it in the editor and see how Patch 1/2 changes the result.

Kalle Olavi Niemitalo <kon>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #20329:  0006-Add-RandomPosition-property-of-unit-types.patch added by kon (7KiB - text/x-patch - PATCHv6 6-8/8: rebased onto trunk r9802)
file #20330:  0007-Add-NudgeUnitUnderCursor-in-the-map-editor.patch added by kon (3KiB - text/x-patch - PATCHv6 6-8/8: rebased onto trunk r9802)
file #20331:  0008-Randomize-positions-of-trees-and-morels.patch added by kon (5KiB - text/x-patch - PATCHv6 6-8/8: rebased onto trunk r9802)
file #20277:  z-order-tree02-between-cannons.png added by kon (34KiB - image/png - demonstration of wrong z-order if instead of [PATCHv5 3/8] you compare the bottom tiles )
file #20276:  0008-Randomize-positions-of-trees-and-morels.patch added by kon (5KiB - text/x-patch - [PATCHv5 8/8] Randomize positions of trees and morels)
file #20275:  0007-Add-NudgeUnitUnderCursor-in-the-map-editor.patch added by kon (3KiB - text/x-patch - [PATCHv5 7/8] Add NudgeUnitUnderCursor in the map editor)
file #20274:  0006-Add-RandomPosition-property-of-unit-types.patch added by kon (7KiB - text/x-patch - [PATCHv5 6/8] Add RandomPosition property of unit types)
file #20273:  0005-Update-comments-for-CUnit-IX-CUnit-IY.patch added by kon (1KiB - text/x-patch - [PATCHv5 5/8] Update comments for CUnit::IX, CUnit::IY)
file #20272:  0004-Move-morel-graphics-higher.patch added by kon (3KiB - text/x-patch - [PATCHv5 4/8] Move morel graphics higher)
file #20271:  0003-DrawLevelCompare-Compare-center-tile-not-bottom-of-s.patch added by kon (1KiB - text/x-patch - [PATCHv5 3/8] DrawLevelCompare: Compare center tile, not bottom of sprite)
file #20270:  0002-DrawLevelCompare-Use-if.return-instead-of.patch added by kon (2KiB - text/x-patch - [PATCHv5 2/8] DrawLevelCompare: Use if...return instead of ?:)
file #20269:  0001-Correct-DrawLevel-of-some-unit-types.patch added by kon (5KiB - text/x-patch - [PATCHv5 1/8] Correct DrawLevel of some unit types)
file #19867:  0006-Randomize-positions-of-trees-and-morels.patch added by kon (5KiB - text/x-patch - [PATCHv4 6/6] Randomize positions of trees and morels)
file #19866:  0005-Add-NudgeUnitUnderCursor-in-the-map-editor.patch added by kon (3KiB - text/x-patch - [PATCHv4 5/6] Add NudgeUnitUnderCursor in the map editor)
file #19865:  0004-Add-RandomPosition-property-of-unit-types.patch added by kon (7KiB - text/x-patch - [PATCHv4 4/6] Add RandomPosition property of unit types)
file #19864:  0003-Update-comments-for-CUnit-IX-CUnit-IY.patch added by kon (1KiB - text/x-patch - [PATCHv4 3/6] Update comments for CUnit::IX, CUnit::IY)
file #19863:  0002-Move-morel-graphics-higher.patch added by kon (3KiB - text/x-patch - [PATCHv4 2/6] Move morel graphics higher)
file #19862:  0001-Adjust-what-gets-drawn-in-front-of-what.patch added by kon (6KiB - text/x-patch - [PATCHv4 1/6] Adjust what gets drawn in front of what)
file #19861:  screen02.png added by kon (295KiB - image/png - screen shot of lava-river.map with RandomPosition = {-12, -12, 12, 12} for trees)
file #19837:  0004-Add-RandomPosition-property-of-unit-types.patch added by kon (7KiB - text/x-patch - [PATCHv3 4/6] Add RandomPosition property of unit types)
file #19836:  screen01.png added by kon (287KiB - image/png - screen shot of lava-river.map with RandomPosition = {-6, -6, 6, 6} for trees)
file #19835:  0006-Randomize-positions-of-trees-and-morels.patch added by kon (5KiB - text/x-patch - [PATCHv2 6/6] Randomize positions of trees and morels)
file #19834:  0005-Add-NudgeUnitUnderCursor-in-the-map-editor.patch added by kon (3KiB - text/x-patch - [PATCHv2 5/6] Add NudgeUnitUnderCursor in the map editor)
file #19833:  0004-Add-RandomPosition-property-of-unit-types.patch added by kon (7KiB - text/x-patch - [PATCHv2 4/6] Add RandomPosition property of unit types)
file #19832:  0003-Update-comments-for-CUnit-IX-CUnit-IY.patch added by kon (886B - text/x-patch - [PATCHv2 3/6] Update comments for CUnit::IX, CUnit::IY)
file #19831:  0002-Move-morel-graphics-higher.patch added by kon (3KiB - text/x-patch - [PATCHv2 2/6] Move morel graphics higher)
file #19830:  0001-Adjust-what-gets-drawn-in-front-of-what.patch added by kon (6KiB - text/x-patch - [PATCHv2 1/6] Adjust what gets drawn in front of what)
file #19778:  presentation.smp added by kon (253B - application/octet-stream - demonstration of how this patchset changes the appearance of a map in the editor)
file #19779:  setup.sms added by kon (3KiB - application/octet-stream - demonstration of how this patchset changes the appearance of a map in the editor)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by feb (Posted a comment)
  • -email is unavailable- added by kon (Submitted the item)
  •  

    Follow 44 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-25 kon Attached File- Added 0006-Add-RandomPosition-property-of-unit-types.patch, #20329
        Attached File- Added 0007-Add-NudgeUnitUnderCursor-in-the-map-editor.patch, #20330
        Attached File- Added 0008-Randomize-positions-of-trees-and-morels.patch, #20331
    2010-04-18 kon Attached File- Added z-order-tree02-between-cannons.png, #20277
    2010-04-18 kon Attached File- Added 0008-Randomize-positions-of-trees-and-morels.patch, #20276
    2010-04-18 kon Attached File- Added 0007-Add-NudgeUnitUnderCursor-in-the-map-editor.patch, #20275
    2010-04-18 kon Attached File- Added 0006-Add-RandomPosition-property-of-unit-types.patch, #20274
    2010-04-18 kon Attached File- Added 0005-Update-comments-for-CUnit-IX-CUnit-IY.patch, #20273
    2010-04-18 kon Attached File- Added 0004-Move-morel-graphics-higher.patch, #20272
    2010-04-18 kon Attached File- Added 0003-DrawLevelCompare-Compare-center-tile-not-bottom-of-s.patch, #20271
    2010-04-18 kon Attached File- Added 0002-DrawLevelCompare-Use-if.return-instead-of.patch, #20270
    2010-04-18 kon Attached File- Added 0001-Correct-DrawLevel-of-some-unit-types.patch, #20269
    2010-03-06 kon Attached File- Added 0006-Randomize-positions-of-trees-and-morels.patch, #19867
    2010-03-06 kon Attached File- Added 0005-Add-NudgeUnitUnderCursor-in-the-map-editor.patch, #19866
    2010-03-06 kon Attached File- Added 0004-Add-RandomPosition-property-of-unit-types.patch, #19865
    2010-03-06 kon Attached File- Added 0003-Update-comments-for-CUnit-IX-CUnit-IY.patch, #19864
    2010-03-06 kon Attached File- Added 0002-Move-morel-graphics-higher.patch, #19863
    2010-03-06 kon Attached File- Added 0001-Adjust-what-gets-drawn-in-front-of-what.patch, #19862
    2010-03-06 kon Attached File- Added screen02.png, #19861
    2010-03-01 kon Attached File- Added 0004-Add-RandomPosition-property-of-unit-types.patch, #19837
    2010-03-01 kon Attached File- Added screen01.png, #19836
        StatusPostponed None
        SummaryMove morels higher and adjust Z-order Correct z-order and randomize positions of morels and trees within their tiles
    2010-03-01 kon Attached File- Added 0006-Randomize-positions-of-trees-and-morels.patch, #19835
    2010-03-01 kon Attached File- Added 0005-Add-NudgeUnitUnderCursor-in-the-map-editor.patch, #19834

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code