GithubHelp home page GithubHelp logo

bregma / liberal-crime-squad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kamal-sadek/liberal-crime-squad

3.0 3.0 1.0 248.76 MB

My personal sandbox version of Liberal Crime Squad -- where is Antifa? For the real game, go to the website.

Home Page: http://lcs.wikidot.com/

License: GNU General Public License v2.0

Makefile 0.18% M4 0.31% Shell 2.11% HTML 0.07% C++ 30.56% C 61.79% Perl 0.13% CMake 0.94% Java 0.48% Batchfile 0.01% PowerShell 0.08% Roff 0.04% Objective-C 2.82% Python 0.35% JavaScript 0.11% Objective-C++ 0.04%
curses politically-incorrect

liberal-crime-squad's People

Contributors

bregma avatar danieloaks avatar jaksd avatar kamal-sadek avatar kremius avatar rardiol avatar ruxi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

alien-av

liberal-crime-squad's Issues

Add a deploy stanza to .travis.yml to enable release uploads.

Automated release uploads to GitHub can be enabled through the Travel-ci builds from master when tags are pushed. This should be done to make built binaries available for all and sundry.

Ideally this should be done after some kind of installer/packager mechanic is set up.

Refactor CreatureType to replace use of CMarkup library

This is a roll-up issue for putting infrastructure in place for further work replacing CMarkup and moving more data into loaded files for improved modding support.

The following tasks must be completed to resolve this issue.

  • Replace the global creaturetypes array with a suitable CreatureType cache object
  • replace the use of CMarkup with TinyXML2 for reading the CreatureType definitions file(s)
  • add unit tests for CreatureType

Re-add SDL_mixer

The SDL mixer library was removed as part of the effort to embed the PDCurses library, which necessitated embedding libSDL2.

It needs to be embedded and reintegrated.

Make creature names moddable

Creature (ie. people) names are generated from a hard-coded list in the C++ code. These should be loadable from external files. That way, they can be set from US Census Bureau data, associated with relative weights, localized for different regions, and updated with new releases. Also, they can be localized to non-US locales by modders.

core dump when checking Status of Liberal Agenda

Stack dump follows.

(gdb) bt
#0  0x00000000004bd1fc in liberalagenda (won=won@entry=0 '\000') at ../../lcs/src/basemode/liberalagenda.cpp:173
#1  0x000000000042de22 in mode_base () at ../../lcs/src/basemode/basemode.cpp:542
#2  0x000000000041fcc8 in mode_title () at ../../lcs/src/title/titlescreen.cpp:701
#3  0x0000000000405221 in main (argc=<optimized out>, argv=<optimized out>) at ../../lcs/src/game.cpp:453
(gdb) 

Replace CMarkup because of license incompatibilities

The LCS code has an embedded copy of Cmarkup, a product of FirstObject. That software is licensed under terms incompatible with the GPLv2+ license the rest of the project is distributed under because of the requirement for "commercial" users to obtain written permission from the copyright owners and to pay a fee. The GPLv2 does not prohibit fee payment, but it does prohibit adding additional restrictions to its terms.

The end result of continuing to use the CMarkup code is that no one would be able to sell or bundle for sale the LCS software in any way without obtaining written permission and a "commercial" license from FirstObject. That is a violation of Freedom 0 granted by the GPL. Hence, license incompatibility.

The license-incompatible code needs to be stripped from the project and replaced with sompething using a GPLv2+ compatible license.

The following files need to have their usage of CMarkup replaced.

  • daily/shopsnstuff.cpp
  • sitemode/shop.cpp
  • title/saveload.cpp
  • vehicle/vehicletype.cpp
  • vehicle/vehicle.cpp
  • game.cpp
  • creature/augmenttype.cpp
  • creature/creature.cpp
  • creature/creaturetype.h creature/creaturetype.cpp #21
  • creature/augmentation.cpp
  • items/loot.cpp
  • items/loottype.cpp
  • items/itemtype.cpp
  • items/cliptype.cpp
  • items/armor.cpp
  • items/weapon.cpp
  • items/item.h
  • items/armortype.cpp
  • items/weapontype.cpp
  • items/item.cpp
  • items/money.cpp
  • items/clip.cpp

Convert to UTF-8

Many of the strings in LCS assume Microsoft Codepage 437. For data files that's OK (who here isn't used to seeing garbage caharacters all over their screen when playing ASCII games?) but when embedded in C++ source files it upsets certain compilers that want to stick to the ISO standard (clang).

We're almost two decades in to the twenty first century, the smart money is converging on Unicode. Let's converge the LCS code on UTF-8.

A few steps are required to complete this task.

  • embed sdl2_ttf so pdcurses can pick up the full range of unicode characters for display
  • modify the sources to use UTF-8 instead of CP-437

Need a statically-built curses library.

Both ncurses 6.0 and pdcurses 4.0 can be built for both winXX and Linux, and both have liberal enough licensing that they can be embedded in the project and linked statically.

src/common.h:35:22: fatal error: langinfo.h: No such file or directory

make[2]: Entering directory '/home/stephenw/projects/lcs/build-win64/src'
  CXX      crimesquad-game.o
In file included from ../../lcs/src/includes.h:85:0,
                 from ../../lcs/src/game.cpp:68:
../../lcs/src/common.h:35:22: fatal error: langinfo.h: No such file or directory
compilation terminated.

The header langinfo.h is a POSIX header file and shouldn't be needed for a Windows compilation.

Note that the use of langinfo.h is wrapped in #ifdef HAVE_CONFIG_H, which is
obviously not correct.

Make location types moddable

Locations are currently defined and created only in code. They should be refactored to allow location type definitions to be loaded from external config files just like creature types,vehicles, and items are.

This change should include the following.

  • Add a LocationType class from which actual locations can be created
  • Add a LocationType XML file definition, and move existing Locations out of the code and into the XML fil.
  • Modify the locations code to use the new type
  • modify the encounters code to use rules defined for the location type

Add platform-specific installer packaging.

We're a couple of decades into the twenty first century, no one expects to have to compile from source just to enjoy a decadent and depraved game of polarized politics. Binaries should be available as Windows Installer or Debian Packages to enable complete democratization and equality of access.

To fix this bug, complete the following.

  • add some kind of Windows Installer package generation
  • add some kind of Linux package generation (Deb packaging for Ubuntu is best)
  • make both of the above scriptable so they can be automated from Travis-CI

Make window resizable

The game window is currently fixed at "80 columns by 25 rows of text" which on today's modern hardware is pretty teeny tiny. With the switch away from using curses-on-console to exclusively using PDCurses on libSDL2, dynamic window sizing can be supported.

Two high-level goals need to be met to accomplish this change.

  • Explicitly set up the SDL surface before initializing curses, so the SDL_Surface is under game control
  • Modify almost every line of output code to reference the dynamic window size instead of using an implicitly hard-coded 80x25 value.

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.