Skip to content

Commit

Permalink
Preliminary code for 2d Trees switchable tweaks
Browse files Browse the repository at this point in the history
DECORATE, DEFS, LIBRARIES & MAPS
:new: Added a special tweak for trees needed by low-end machines, you
may notice improvements here: https://imgur.com/a/OHKDKcV
🆕 Also made sure that 2d trees take in consideration roll & pitch
🆕 Now all 3d trees inherit the TreeBase actor
🆕 Since it was pretty pointless on my end, I have augmented the base
value for MU with effects, so not 256 but 1024 (this way players doesn't
have to decrease or increase sliders too much while changing them)
🆕 Updated TEST_ACT map zone with trees, just run it and test with
the new tweak
⚠️ Sprite used for 2d Tree is Doom 2 placeholder
📓 The switch requires forcibly a map restart, and per default
is Off
  • Loading branch information
Ozymandias81 committed May 24, 2018
1 parent 32876ad commit 01f78c9
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 67 deletions.
Binary file modified acs/boalib.o
Binary file not shown.
89 changes: 26 additions & 63 deletions actors/props/trees.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
ACTOR Tree1
ACTOR TreeBase
{
+FLATSPRITE
+ROLLSPRITE
States
{
Spawn:
MDLA A 0 NODELAY A_JumpIf(CallACS("BidiSwitch")==1,"BidiSpawn")
TridiSpawn:
MDLA A -1
Stop
BidiSpawn:
TRE2 A -1 A_SetPitch(270+pitch) //fix the pitch
Stop
}
}

ACTOR Tree1 : TreeBase
{
//$Category Props (Wolf3D)/Trees
//$Title Tree (snow)
Expand All @@ -9,12 +26,6 @@ ACTOR Tree1
+RELATIVETOFLOOR
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR Tree2 : Tree1
Expand All @@ -37,7 +48,7 @@ ACTOR Tree4 : Tree1
DistanceCheck "treeslod"
}

ACTOR Palm1
ACTOR Palm1 : TreeBase
{
//$Category Props (Wolf3D)/Trees
//$Title Palm (center)
Expand All @@ -47,12 +58,6 @@ ACTOR Palm1
+NOGRAVITY
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR Palm2 : Palm1
Expand All @@ -67,7 +72,7 @@ ACTOR Palm3 : Palm1
DistanceCheck "treeslod"
}

ACTOR JungleTree1
ACTOR JungleTree1 : TreeBase
{
//$Category Props (Wolf3D)/Trees
//$Title Jungle Tree 1
Expand All @@ -76,12 +81,6 @@ ACTOR JungleTree1
Radius 16
Height 128
+SOLID
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR JungleTree2 : JungleTree1
Expand All @@ -97,17 +96,11 @@ ACTOR JungleTree3 : JungleTree1
DistanceCheck "treeslod"
}

ACTOR WinterA
ACTOR WinterA : TreeBase
{
Height 115
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR WinterB : WinterA
Expand All @@ -123,17 +116,11 @@ ACTOR WinterC : WinterA
DistanceCheck "treeslod"
}

ACTOR WinterD
ACTOR WinterD : TreeBase
{
Height 60
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR WinterE : WinterA
Expand Down Expand Up @@ -171,7 +158,7 @@ ACTOR WinterI : WinterA
DistanceCheck "treeslod"
}

ACTOR SmallTree1
ACTOR SmallTree1 : TreeBase
{
//$Category Props (Wolf3D)/Trees
//$Title Tree 4 (middle)
Expand All @@ -182,12 +169,6 @@ ACTOR SmallTree1
+RELATIVETOFLOOR
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR SmallTree2 : SmallTree1
Expand All @@ -198,7 +179,7 @@ ACTOR SmallTree2 : SmallTree1
}

//Burnt variants - Ozymandias81
ACTOR Tree2_Burnt
ACTOR Tree2_Burnt : TreeBase
{
//$Category Props (Wolf3D)/Trees/Burnt
//$Title Tree (burnt, large)
Expand All @@ -207,12 +188,6 @@ ACTOR Tree2_Burnt
Height 192
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR Tree3_Burnt : Tree2_Burnt
Expand All @@ -230,7 +205,7 @@ ACTOR Tree4_Burnt : Tree2_Burnt
DistanceCheck "treeslod"
}

ACTOR JungleTree1_Burnt
ACTOR JungleTree1_Burnt : TreeBase
{
//$Category Props (Wolf3D)/Trees/Burnt
//$Title Jungle Tree 1 (Burnt)
Expand All @@ -239,12 +214,6 @@ ACTOR JungleTree1_Burnt
Height 128
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

ACTOR JungleTree2_Burnt : JungleTree1_Burnt
Expand All @@ -255,7 +224,7 @@ ACTOR JungleTree2_Burnt : JungleTree1_Burnt
DistanceCheck "treeslod"
}

ACTOR SmallTree1_Burnt
ACTOR SmallTree1_Burnt : TreeBase
{
//$Category Props (Wolf3D)/Trees/Burnt
//$Title Tree 4 (burnt, middle)
Expand All @@ -264,12 +233,6 @@ ACTOR SmallTree1_Burnt
Height 96
+SOLID
DistanceCheck "treeslod"
States
{
Spawn:
MDLA A -1
Stop
}
}

//2d actors
Expand Down
1 change: 1 addition & 0 deletions cvarinfo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
server bool bidiswitch = false;
server bool bubbleswitch = true;
server bool cinderswitch = true;
server bool cloudswitch = true;
Expand Down
Binary file modified maps/TEST_ACT.wad
Binary file not shown.
7 changes: 4 additions & 3 deletions menudef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,14 @@ OptionMenu "RenderOptions"
Title "Rendering Options"

Slider "FOV", "fov", 80, 110, 2
Option "2d Trees","bidiswitch","OnOff"
StaticText ""
StaticText "Distance is applied in map units"
StaticText "Decrease following values to improve in-game performance"
Slider "Grass","grasslod",256,16384,256
Slider "Scenery","scenelod",256,16384,256
Slider "Grass","grasslod",1024,16384,1024
Slider "Scenery","scenelod",1024,16384,1024
Slider "Special Effects","sfxlod",1024,16384,1024
Slider "Trees","treeslod",256,16384,256
Slider "Trees","treeslod",1024,16384,1024
}

OptionMenu "BoACTRLOptions"
Expand Down
5 changes: 4 additions & 1 deletion source/boptions.acs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Script "SFXLOD" (void)
{
SetResultValue(GetCVar("sfxlod"));
}

Script "CinderSwitch"(void)
{
SetResultValue(GetCVar("cinderswitch"));
Expand Down Expand Up @@ -90,6 +89,10 @@ Script "LeavesSwitch"(void)
{
SetResultValue(GetCVar("leavesswitch"));
}
Script "BidiSwitch"(void)
{
SetResultValue(GetCVar("bidiswitch"));
}

//Cheats
Script "SprintSwitch"(void)
Expand Down

0 comments on commit 01f78c9

Please sign in to comment.