Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New development at openc2e/openc2e #5

Open
wants to merge 143 commits into
base: master
Choose a base branch
from
Open

Conversation

ligfx
Copy link

@ligfx ligfx commented Apr 22, 2020

Openc2e-logo2008

After chatting with fuzzie, bdonlan, nornagon, and diagonalfish, it seems there's no longer any way to access this repository.

I've created a new GitHub Organization and repository at openc2e/openc2e for new development.

At the time of writing, changes include:

  • Making it build on modern systems, with SDL2, Qt5, Python instead of Perl, and no more Boost
  • Simple builds on Windows (just open in Visual Studio!)
  • New dev tools (praybuilder, etc) built on file format code
  • Other updates

If you're interested in contributing or running openc2e, please join me there!

ligfx and others added 30 commits April 4, 2020 18:14
Python is installed or easy to install on every platform, and more
people now are likely to know Python than to know Perl.
Needs to be in global namespace, as the functions are looked up via ADL
Better semantics than string slicing, and fixes the case where dirp
ends in a trailing slash (legal, and happens when using ghc_filesystem).
std::filesystem (and polyfills) treat concatenating absolute paths
differently than Boost.Filesystem: they ignore the left side of the
operation. Since this is not what we want, ensure we only concatenate
relative paths
Standalone it's useful for parsing and other tools (e.g. caos2pray)
Boost is _gone_ for the most common build type!
ligfx added 27 commits April 25, 2020 17:14
e.g. Sea Monkeys has: ARRAY "Navigable CA Indices" 0"
Fixes an issue introduced when copying image data into the bmpImage structure,
where we were deleting the srcdata pointer after incrementing it.
The original Creatures engines use the CP-1252 encoding (you can
see this in e.g. WhiteOnTransparentChars.s16, which maps over
perfectly).

Modern practices, however, are to store files and operate on
strings in UTF-8. So, in this commit we do a couple things:

1) When parsing Pray or CAOS2Pray sources, convert them to UTF-8
   if they're not already
2) When reading Pray files, convert strings to UTF-8, if they're
   not already
3) When writing Pray files, convert strings to CP-1252, if they're
   not already

This follows the Robustness Principle of "be conservative in what
you do, be liberal in what you accept."
Still needs to be hooked up in World, but the logic works
Ubuntu complains about std::domain_error and strlen, Windows complains
about std::domain_error and ssize_t
It's much faster!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants