List of known modules - AtomCrafty/MajiroTools Wiki

List of known modules

Modules is the term used to describe blocks of system calls found within the Majiro engine's assembly. There are many interesting aspects to these modules that have made it infinitely easier to determine functionality and names.

Standard Library module

A large set of general-use and I/O functions. This includes functions for: math, string handling, array creation, RNG, file I/O, clipboard (clipbord) I/O, dialog boxes, window focus, drag/drop, system locale, windows registry I/O, etc.

Many functions in this module are defined similarly to many C standard library functions (especially for string handling).

Execution module

A small collection of functions that handle everything revolving around running script-defined functions, event callback registration and firing, etc.

Is Auto/Fast Mode module

A small module of just 2 function definitions: bool $is_auto_mode() and bool $is_fast_mode().

Threading module

A large collection of system functions that handle aspects like thread creation, timing/waiting, VN fast/skip mode, screen mode, UI loops, exiting, etc.

Console module

Note: In Majiro, the term "Console" refers to the VN message window.

ADV (and NVL?) visual novel message window handling. This includes handling of all related functionalities, text speed configurations, auto mode, message history, voice replay, and the console menu items.

Graphics module

Base graphics events.

Keyboard Events module

Keyboard and joystick input events.

Loadsave module

Handling of game loading and saving. Create save points, get/set save info and flags, and create thumbnails.

Mouse Events module

UI mouse input events.

Checker module

Potentially part of the Config module. This contains a standalone function that runs the program checker.exe. It's possible this could be handling the CHECK/CHK keywords encountered in many of the .cfg configuration files, making a definite part of the Config module.

Config module

Get or set persistent configuration settings from variables or from the Windows registry.

Audio module

Play, pause, loop, resume, and all handling for music/sound/voice playback.

Sprite module

Known dependencies: Graphics module

More advanced graphics functions that handle sprites, with animations, movements, etc.

Inline-Only module

The remaining functions in this "module" potentially have no real module. These are only defined inline in the Syscall handler switch.


Mahjong modules

The Majiro engine was originally created for the Mahjong visual novel (it even sounds similar to the engine name). This is why many Mahjong logic system calls are still found baked right in to the engine.

Mahjong (Small) module

A small module of only 3 functions, possibly because the last one is monolithic in size: int $get_game_speed();, int $get_nanido(); and int $269bda78(); mahjong_ai_move?()

Mahjong (Large) module

A large block of Mahjong logic handling functions, none of which have had their names unhashed.

Mahjong (Exclusive) module

Two system call functions that are exclusive to the original Mahjong game. These syscalls no longer appear in later engines for other games.