How ctrdecomp/librarymessagestudio works
LibMessageStudio is a small C library for parsing Nintendo MessageStudio binary formats and retrieving message text and project metadata. The main workflow is to provide binary data, initialize a message or project view, then query its blocks and contents; callers configure the memory callbacks used for allocations. The README also identifies MSBF message-flow binaries, but the sampled source does not show a flow-file API, so that capability is not mapped. Edges reflect sampled calls; project features are summarized at their implementation path.
Main entry points: msgfile.c Message API · commonbin.c Binary analyzer · projfile.c Project API · libms.c Memory callbacks
Components 12
Binary parsing
- Binary structures
include/LMS/commonbin.h - Binary analyzer
src/commonbin.c - Label hashing
src/commonbin.c - Shared types
include/LMS/types.h
Message access
- Message API
src/msgfile.c - Message view
include/LMS/msgfile.h
Project metadata
- Project API
src/projfile.c - Project view
include/LMS/projfile.h
Memory utilities
- Memory callbacks
src/libms.c - Memory interface
include/LMS/libms.h
Other components
- Library caller
- Binary data
Connections 23
- Library caller → Message API: initializes
- Library caller → Project API: initializes
- Library caller → Binary data: provides
- Library caller → Memory callbacks: sets callbacks
- Message API → Binary data: reads
- Project API → Binary data: reads
- Message API → Binary analyzer: analyzes binary
- Project API → Binary analyzer: analyzes binary
- Message API → Binary analyzer: searches blocks
- Project API → Binary analyzer: searches blocks
- Binary analyzer → Memory callbacks: allocates blocks
- Binary analyzer → Memory callbacks: compares names
- Message API → Label hashing: hashes labels
- Message API → Binary analyzer: compares labels
- Message API → Memory callbacks: allocates and frees
- Project API → Memory callbacks: allocates and frees
- Message API → Message view: uses view
- Project API → Project view: uses view
- Binary analyzer → Binary structures: populates structures
- Message API → Binary structures: reads blocks
- Project API → Binary structures: reads blocks
- Memory callbacks → Memory interface: implements
- Binary structures → Shared types: uses types