Skip to content

C++ library for loading and processing Supercell 2D (.sc) assets

License

Notifications You must be signed in to change notification settings

Yuhuns/SupercellFlash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SupercellFlash

Supercell Flash is a C++ library that allows you to quickly read, modify and save .sc files

Example

#include <SupercellFlash.h>
#include <iostream>

using namespace std;
using namespace sc;

int main(int argc, char* argv[]) {
    if (argc != 1) {
        cout << "Failed to get filename";
    }

    SupercellSWF swf;

    try {
        swf.load(argv[0]);
    }
    catch (const std::exception& err) {
        cout << "Failed to load file. Error: " << err.what() << endl;
    }

    cout << "File has: " << endl;
    cout << swf.exports.size() << " export names" << endl;
    cout << swf.textures.size() << " textures" << endl;
    cout << swf.textFields.size() << " textfields" << endl;
    cout << swf.shapes.size() << " shapes" << endl;
    cout << swf.movieClips.size() << " movieclips" << endl;

    return 0;
}

Building

Before starting, install all necessary submodules

git update --remote

CMake build system is used. Make sure you have but installed and you can use it. Then just run cmake command from project root directory with specified generator type and output directory. Example for Visual Studio 2019 for Windows (also you can use 2022 version):

cmake -G "Visual Studio 16 2019" -B ./build

About

C++ library for loading and processing Supercell 2D (.sc) assets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.3%
  • CMake 2.3%
  • C 0.4%