Skip to content

Squirrel 2 bindings for language and VM version used in Kaleido ADV Workshop visual novel engine

Notifications You must be signed in to change notification settings

nikvoid/squirrel2-kaleido-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

squirrel2-kaleido-rs

Bindings for Squirrel language and VM variant used in games built on Kaleido ADV engine

Known supported games:

  • Konosuba: Kono Yokubukai Game ni Shinpan o!

Changes to VM

// squirrel.h
typedef
+ #ifdef _MSC_VER
+ __declspec(align(8)) 
+ #endif
struct tagSQObject 
{
    SQObjectType _type;
    + SQInteger _junk;
    SQObjectValue _unVal;
    + SQInteger _zeroes;
} 
+ #ifdef __GNUC__
+  __attribute__((aligned(8)))
+ #endif
SQObject;

// sqvm.h
struct SQVM {
    ...
    SQInteger _stackbase;
    SQObjectPtr _roottable;
    SQObjectPtr _lasterror;
    SQObjectPtr _errorhandler;
    SQObjectPtr _debughook;
    
    SQObjectPtr temp_reg;
    + SQObjectPtr unknown_closure;
    
    CallInfo* _callsstack;
    SQInteger _callsstacksize;
    ...
};

// sqstate.h
struct SQSharedState {
    ...
    SQCOMPILERERROR _compilererrorhandler;
    SQPRINTFUNCTION _printfunc; 

    + void* _unk_code_ptr;

    bool _debuginfo;
    bool _notifyallexceptions;
private:
    SQChar *_scratchpad;
    SQInteger _scratchpadsize;
};

// sqfuncproto.h
struct alignas(8) SQLocalVarInfo {...};
       ^^^^^^^^^^

About

Squirrel 2 bindings for language and VM version used in Kaleido ADV Workshop visual novel engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published