Skip to content

Commit

Permalink
Write world brushes flagged as CONTENTS_LADDER as func_ladder
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
ata4 committed Jan 15, 2015
1 parent 6df9443 commit 95ceceb
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 146 deletions.
1 change: 1 addition & 0 deletions src/info/ata4/bspsrc/BspSourceConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public final class BspSourceConfig implements Serializable {
public boolean writeStaticProps = true;
public boolean writeVisgroups = true;
public boolean writeWorldBrushes = true;
public boolean writeLadders = true;

private boolean debug = false;
private Set<BspFileEntry> files = new HashSet<>();
Expand Down
4 changes: 3 additions & 1 deletion src/info/ata4/bspsrc/cli/BspSourceCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public BspSourceConfig getConfig(String[] args) {
.create('l'));

// entity options
Option nbentsOpt, npentsOpt, npropsOpt, noverlOpt, ncubemOpt, ndetailsOpt, nareapOpt, nocclOpt, nrotfixOpt;
Option nbentsOpt, npentsOpt, npropsOpt, noverlOpt, ncubemOpt, ndetailsOpt, nareapOpt, nocclOpt, nladderOpt, nrotfixOpt;
optsEntity.addOption(npentsOpt = new Option("no_point_ents", "Don't write any point entities."));
optsEntity.addOption(nbentsOpt = new Option("no_brush_ents", "Don't write any brush entities."));
optsEntity.addOption(npropsOpt = new Option("no_sprp", "Don't write prop_static entities."));
Expand All @@ -140,6 +140,7 @@ public BspSourceConfig getConfig(String[] args) {
optsEntity.addOption(ndetailsOpt = new Option("no_details", "Don't write func_detail entities."));
optsEntity.addOption(nareapOpt = new Option("no_areaportals", "Don't write func_areaportal(_window) entities."));
optsEntity.addOption(nocclOpt = new Option("no_occluders", "Don't write func_occluder entities."));
optsEntity.addOption(nladderOpt = new Option("no_ladders", "Don't write func_ladder entities."));
optsEntity.addOption(nrotfixOpt = new Option("no_rotfix", "Don't fix instance entity brush rotations for Hammer."));

// world brush options
Expand Down Expand Up @@ -274,6 +275,7 @@ public BspSourceConfig getConfig(String[] args) {
config.writeOccluders = !cl.hasOption(nocclOpt.getOpt());
config.writeCubemaps = !cl.hasOption(ncubemOpt.getOpt());
config.writeDetails = !cl.hasOption(ndetailsOpt.getOpt());
config.writeLadders = !cl.hasOption(nladderOpt.getOpt());

// world options
config.writeWorldBrushes = !cl.hasOption(nbrushOpt.getOpt());
Expand Down
23 changes: 17 additions & 6 deletions src/info/ata4/bspsrc/gui/BspSourceFrame.form
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="scrollFiles" pref="139" max="32767" attributes="0"/>
<Component id="scrollFiles" pref="158" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="buttonAdd" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
Expand Down Expand Up @@ -198,7 +198,7 @@
<Component id="checkBoxDisp" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="panelBrushMode" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="22" max="32767" attributes="0"/>
<EmptySpace pref="41" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -386,7 +386,7 @@
<Component id="checkBoxCubemap" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkBoxOverlay" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="34" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -437,6 +437,7 @@
<Component id="checkBoxAreaportal" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="checkBoxOccluder" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="checkBoxFixRotation" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="checkBoxLadder" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
Expand All @@ -452,8 +453,10 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="checkBoxOccluder" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkBoxLadder" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkBoxFixRotation" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="11" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -492,6 +495,14 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkBoxFixRotationActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="checkBoxLadder">
<Properties>
<Property name="text" type="java.lang.String" value="func_ladder"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkBoxLadderActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JCheckBox" name="checkBoxEnableEntities">
Expand Down Expand Up @@ -554,7 +565,7 @@
<Component id="checkBoxFixCubemapTex" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkBoxFixToolTex" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="71" max="32767" attributes="0"/>
<EmptySpace pref="90" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -681,7 +692,7 @@
<Component id="labelSourceFormat" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboBoxSourceFormat" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="57" max="32767" attributes="0"/>
<EmptySpace pref="76" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down
Loading

0 comments on commit 95ceceb

Please sign in to comment.