- Home
- Inform7 Modules
- multimedia
- Chapter 1: Starting Up
- Multimedia Module
Setting up the use of this module.
§1. This section simoly sets up the module in ways expected by foundation
, and
contains no code of interest. The following constant exists only in tools
which use this module:
define MULTIMEDIA_MODULE TRUE
§2. To begin with, this module needs to allocate memory:
enum blorb_figure_MT enum blorb_sound_MT enum external_file_MT
ALLOCATE_INDIVIDUALLY(blorb_figure) ALLOCATE_INDIVIDUALLY(blorb_sound) ALLOCATE_INDIVIDUALLY(external_file)
§3. Like all modules, this one must define a start
and end
function:
void MultimediaModule::start(void) { <Register this module's memory allocation reasons 3.1>; <Register this module's stream writers 3.2>; <Register this module's debugging log aspects 3.3>; <Register this module's debugging log writers 3.4>; } void MultimediaModule::end(void) { }
§3.1.
<Register this module's memory allocation reasons 3.1> =
;
This code is used in §3.
§3.2.
<Register this module's stream writers 3.2> =
;
This code is used in §3.
§3.3.
<Register this module's debugging log aspects 3.3> =
;
This code is used in §3.
§3.4.
<Register this module's debugging log writers 3.4> =
;
This code is used in §3.