Giter Site home page Giter Site logo

suryaxanden / libgamecommon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malvineous/libgamecommon

0.0 1.0 0.0 454 KB

Utility functions for working with binary files

Home Page: http://www.shikadi.net/camoto/

License: GNU General Public License v3.0

Makefile 0.96% Shell 0.06% M4 8.97% C++ 90.01%

libgamecommon's Introduction

Camoto: Classic-game Modding Tools

Copyright 2010-2017 Adam Nielsen <[email protected]>
http://www.shikadi.net/camoto/
Linux/OSX: Build Status (Linux/OSX) Windows: Build Status (Windows)

Camoto is a collection of utilities for editing (modding) "classic" PC games - those running under MS-DOS from the 1980s and 1990s.

This is libgamecommon, the lowest-level component of the Camoto suite. It contains shared code and routines used by most of the other Camoto libraries.

It is most likely of little use to anyone other than Camoto developers, although of course it is a prerequisite to installing the rest of the Camoto suite!

The library currently contains the following elements:

  • stream: Replacement for C++ iostream, all other stream elements implement this interface. Also includes stream_file and stream_string.

  • stream_sub: Access a subsection of another stream, transparently to the user of the class instance.

  • stream_seg: A stream allowing data to be inserted and removed at arbitrary positions within the stream, and the resulting on-disk data shuffling only happening once, at flush().

  • stream_filtered: Transparently filter data read from and written to the stream. Filters can compress/decompress, encrypt/decrypt, etc.

  • lzss: Generic implementation of the LZSS compression algorithm, implemented in the form of a filter (suitable for use with stream_filtered.)

  • lzw: Generic implementation of the LZW compression algorithm, again implemented as a stream filter.

  • bitstream: Stream-like interface allowing reading and writing of individual bits. Used by the LZW algorithm which initially reads data in units of 9-bits.

  • iostream_helpers: Helper classes to simplify reading and writing data in a platform neutral manner. stream << u32le(123) will write the number 123 as a 32-bit unsigned little-endian integer regardless of the endian-ness of the host platform, and likewise uint16_t i; stream >> u16be(i); will read a 16-bit big-endian integer from the stream.

Each element contains a number of tests to confirm it is working as expected, and these are run in the usual manner: make check

The library is compiled and installed in the usual way:

./autogen.sh          # Only if compiling from git
./configure && make
make check            # Optional, compile and run tests (requires Boost)
sudo make install
sudo ldconfig

If you haven't got any libraries installed in /usr/local/lib yet, then don't forget to add /usr/local/lib to /etc/ld.so.conf and rerun ldconfig, so that this directory will be searched for libraries. You might also want to add /usr/local/bin to your $PATH at the same time, if you intend to run the command-line tools in the other Camoto libraries.

This library is released under the GPLv3 license.

libgamecommon's People

Contributors

drmccoy avatar malvineous avatar

Watchers

 avatar

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.