Coder Social home page Coder Social logo

wmt's Introduction

Warzone Map Tool

Build status Version

Tool for viewing and generating previews of maps for Warzone2100.

  • Read old formats of Warzone2100 maps.
  • Read FlaME comments in file headers.
  • Read https://wz2100.euphobos.ru map database comments.
  • Make preview images.
  • Tweak colors of cliffs, terrain, water tiles.
  • Analyze map by structure count.
  • Print useful info to console.
  • Provide easy wrapper to Warzone 2100 map format.
  • Windows support. (see below)
  • CMake build system.
  • Read 3.3+ map format. (JSON)

How to build

With make

  1. Install deps. That can be done with $ sudo apt-get install g++ libstdc++-6-dev lib32gcc-7-dev libc6-dev make git
  2. Clone this repo $ git clone https://github.com/maxsupermanhd/WMT.git
  3. Go to directory $ cd WMT
  4. Make $ make
  5. To build shared library consider rebuilding completely with make clean; make lib

With CMake

  1. Install CMake(3.10+). Also get dependencies from make method.
  2. Create build directory. ex: mkdir build
  3. Navigate to build directory. ex: cd build
  4. Run CMake over project directory with any flags you want. ex: cmake -G"Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel ..
  5. Build with CMake. ex: cmake --build .
  6. Grab shared library from ./lib/
  7. Grab demo preview generator from ./bin/

How to use

  1. Find a Warzone 2100 map.
  2. Run WMT with supplied map file. (including path)
  3. Open the generated image with any png viewer/editor.
  4. For more info/tweaks see --help argument.

How to run on Windows based OS

Just use .exe file from releases. (use cmd to run) If you want to build this from source, you better stop right here and go to the releases page.

Issues recommended template

  • OS (Linux/Windows) (include kernel/lib versions).
  • Type: crash(segfault/abort), infinite loop, opening or saving error. (or any other error)
  • Logfile generated with piping WMT output with -v999 to file.
  • The map file that was used.

Warning! I will not respond to any windows-only issues. I don't have a windows PC. If you want help with your problem on your Windows based system you should ask someone else.

Explanation

Any zip file that WMT opens is stored in dynamically allocated memory and opens it with the fmemopen function. In Windows there is no true alternative for this, so I decided to make a temp-files crutch solution to Windows builds. If you want to help in making Windows releases please contact me.

License

GNU GPL-2.0

For more details see LICENSE file.

Contact me

You can contact me and ask any interesting questions:

wmt's People

Contributors

k3ack3r avatar maxsupermanhd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

k3ack3r

wmt's Issues

build error

Commit dcc8fef introduces this error:

src/main.c: In function ‘int main(int, char**)’:
src/main.c:323:8: error: ‘outname’ was not declared in this scope
  323 |   free(outname);
      |        ^~~~~~~
make: *** [Makefile:16: WMT] Error 1

Failed to open addon.lev file!

The name of the archive may be random.
If the name of the card and the archive do not match, it gives an error
Failed to open addon.lev file!
I believe that the utility should in the info issue exactly the name of the card from addon.lev

Assert bug

Trying to use WMT on the Winteragony map (since commit 43ddc56) produces this error:

WMT: malloc.c:2392: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted (core dumped)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.