Skip to content

Commit

Permalink
Update README.md and LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
blizzard4591 committed Nov 10, 2020
1 parent ef35706 commit 225748b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 41 deletions.
43 changes: 2 additions & 41 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
zeusDebug utilities for tracking/logging game performance.
zeusSqm utilities for checking, modifying and generating (parts of) ARMA3 sqm files.

Copyright (C) 2020 by Philipp Berger

Expand All @@ -18,43 +18,4 @@ zeusDebug utilities for tracking/logging game performance.
This program incorporates work covered by the following copyright and
permission notices:

Contains parts copied/modified from ProcessHacker: https://github.com/processhacker/processhacker
Process Hacker is distributed under the GNU GPL version 3, with the
following exception:

Permission is granted to dynamically (but not statically) link this
program with independent modules, regardless of the license terms of
these independent modules, provided that this program is not modified
in any way. An independent module is a module which is not derived
from or based on this program. If you modify this program, this
additional permission no longer applies unless authorized by the
copyright holders.

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


Contains parts of the PresentMon tool: https://github.com/GameTechDev/PresentMon
Copyright 2017-2020 Intel Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Uses the libpbo library from https://github.com/StidOfficial/libpbo, covered under the GPL-3.0 License.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,45 @@ These utilities are governed by the GNU GPL v2.0 license, but includes works fro
- [CMake](https://cmake.org/)
- [Qt 5](https://www.qt.io/)

## What can this utility do?
- It can read and write both binarized and non-binarized SQM files as well as PBOs.
- Extracting a mission.sqm from a PBO to a non-binarized SQM: `zeusSqm input.pbo mission.sqm`
- Extracting a mission.sqm from a PBO to a binarized SQM: `zeusSqm --saveBinarized input.pbo mission.sqm`
- Converting a binarized SQM to a non-binarized SQM: `zeusSqm binarized.sqm non-binarized.sqm`
- Converting a non-binarized SQM to a binarized SQM: `zeusSqm --saveBinarized non-binarized.sqm binarized.sqm`

## Commandline options
- `--inplace`: Write output to input file. Use with care.
- `--extractFromPbo <name>`: Extract the mission.sqm from PBO file and save it to name, untouched. This is not the option you are looking for, if you just want the file, this is meant for debugging differences between the original input file and the internally produced output.
- `--stripComments`: Remove comments (lines starting in // and #define) from SQMs, even from the 'unchanged' extract from PBO.
- `--saveBinarized`: Sets the output SQM file to be binarized. Default is non-binarized.
- `--saveBinarizedIfBinarizedInput`: Sets the output SQM file to be binarized, if the input was binarized.

Say you want your NATO markers to always be on the center of the 100m grid, but doing this in the editor sucks. Well, you are in luck:
- `-m` or `--markers`: Check marker placements for grid alignment.
- `--markerMaxDistance`: Maximum distance of marker from grid center to be considered for correction (to leave deliberately placed markers where they are). Default: 25.
- `--markerAskConfirmation`: Will ask for each marker whether it should be moved. Default: no.
- `--markerGrid`: What grid the markers should snap to. Default: 100.

Did you forget to set the side relationships and OP is about to start?
- `--setBluforVsIndependent <new relation>`: Overwrite side relations between BLUFOR and independent. New relation can be either `war` or `peace`.
- `--setOpforVsIndependent <new relation>`: Overwrite side relations between OPFOR and independent. New relation can be either `war` or `peace`.

Did you ever want to translate a 2D picture into a structure in ARMA3?
![2D input for object generation](/tree.png?raw=true "Input picture for the object generation.")
![Generated structure in ARMA3](/treeInGame.jpg?raw=true "The generated structure in ARMA3.")
You have an nice picture like the one shown above and want a festive tree in your mission? No problem, `zeusSqm` got you covered:
- `--buildFromImage <image>`: Build a 2D structure from an image, where a non-transparent pixel is translated to a block and to air otherwise.
- `--buildMinAlpha <1 - 255>`: Minimal alpha channel value for a pixel not to be considered transparent.
- `--buildStartingPoint x,y,z`: Coordinates of where to start building the structure, e.g. `1000,1000,10`.


## How to build
1. Clone the repository `https://github.com/blizzard4591/sqmTools.git` to a folder of your choice, we will call this folder `D:\sqmTools`.
Be sure to include submodules: `git clone --recurse-submodules`!
2. (Optional) Fix the path to your Qt5 installation in `CMakeLists.txt` in the variable `CMAKE_PREFIX_PATH`.
3. Execute CMake on the sources, if possible, do an out-of-tree build.
On Window, in CMake, the source directory would be `D:\sqmTools` and `Where to build the binaries` would be `D:\sqmTools\build`. Then click `Configure` and `Generate`.
On Linux, create a build dir (`mkdir build` in a location of your choice) and call CMake accordingly: `cmake ../path/to/the/root/of/sqmTools.git`.
4. On Windows, open the created project file `ZeusDebug.sln` in Visual Studio. Build the solution in either `Debug` or `Release` configuration, depending on your needs (if unsure, choose Release).
On Linux, execute `make`.
Binary file added tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treeInGame.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 225748b

Please sign in to comment.