-
Notifications
You must be signed in to change notification settings - Fork 0
/
tbyConfig.gml
113 lines (96 loc) · 4.31 KB
/
tbyConfig.gml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#region Common config options you may want to modifiy
/**** Appearance ****/
// Options concerning sprites,
// dimensions, animation speed and
// fonts
#macro tbyTextboxSprite sprTbySkinA // Sprite needs to be square
#macro tbyTileSize 8 // Same as width/height of textboxSprite
#macro tbyDrawPauseSprite true
#macro tbyPauseSprite sprTbySkinPauseA // Origin is the bottom edge of the textbox
#macro tbyPauseSpriteSpeed 0.04 // Only applicable for pause sprites with multiple frames
#macro tbyDrawBubbleSprite true // Whether to draw the "speech indicator" at the bottom
#macro tbyBubbleSprite sprTbySkinBubbleA
#macro tbyDefaultFont fontTbyDefault
/**** Technical ****/
// Options concerning functionality
// of technical features
#macro tbyDefaultMaxWidth 200
#macro tbyDefaultLineAmount 4
#macro tbyWaitAfterEachChar 4 // (In steps) Usual amount to wait after each character is drawn
#macro tbyWaitPerWaitChar (room_speed/4) // How many steps to wait per . character
#macro tbyBoxBottomMargin 2 // (In pixels) Space between origin and bottom edge of the textbox
// If this expression is true, it counts as having advanced the message
#macro tbyPressedConfirm (keyboard_check_pressed(vk_space) || keyboard_check_pressed(vk_enter))
// Callbacks
#macro tbyCbOnMessageStart tbyOnMessageStart
#macro tbyCbOnMessageEnd tbyOnMessageEnd
#macro tbyCbOnQueueBegin tbyOnQueueBegin
#macro tbyCbOnQueueFinish tbyOnQueueFinish
/**** Audio ****/
// Options concerning audio
#macro tbyPlaySpeechSound true
#macro tbyDefaultSpeechSound sndSpeechDefault
#macro tbySpeechPitchChange random_range(0.8, 1.2) // (Number 0.0-1.0) Pitch modifier to apply to sound
#macro tbySpeechIteration 3 // Play sound every x characters
#macro tbyPlayConfirmSound true
#macro tbyConfirmSound sndMsgConfirm
#endregion
#region Not so common options, only change if you know what you are doing
#macro tbyManagerObject tbyTextboxManager
#macro tbyTextObject tbyText
// Change this if you have a dedicated layer for manager objects
#macro tbyCreateManagerSnippet instance_create_depth(0, 0, -10000, tbyTextboxManager)
#macro tbyCreateTextSnippet instance_create_depth(0, 0, -10001, tbyText) // Needs to be on a higher up (lower depth)
// The format for the defaults is [control_code/additional_data], e.g. [c/red]
// These should all be one character only
#macro tbyControlCodeOpening "["
#macro tbyControlCodeClosing "]"
#macro tbyControlCodeDelimiter "/"
/* Action scripts */
// These usually change a property of
// the textbox manager, affecting all
// messages that follow
enum TbyAction {
SetSpeaker = tbyActionSetSpeaker,
SetMaxWidth = tbyActionSetMaxWidth,
SetMaxLines = tbyActionSetMaxLines,
SetOrigin = tbyActionSetOrigin,
SetPosition = tbyActionSetPosition,
ShowString = tbyActionShowString,
SetSpeed = tbyActionSetSpeed,
SetPause = tbyActionSetPause,
SetFont = tbyActionSetFont,
SetSound = tbyActionSetSound
}
/*
Every string is split up into characters
and stored in a ds_grid.
Every character has data regarding every
control code.
They take the following form:
+----------+---+---+---+---+---+---+---+
|++++++++++| T | e | s | t | i | n | g |
+----------+---+---+---+---+---+---+---+
|Color | 1 | 1 | 1 | 1 | 2 | 2 | 2 |
+----------+---+---+---+---+---+---+---+
|WaitFrames| 4 | 4 | 4 | 4 | 9 | 4 | 4 |
+----------+---+---+---+---+---+---+---+
|Jittery? | f | f | t | t | t | t | t |
+----------+---+---+---+---+---+---+---+
|... | | | | | | | |
+----------+---+---+---+---+---+---+---+
*/
// Control codes
enum TbyCode {
Reset, // Resets needs to be on position 0
Color,
Wait,
Jittery,
Skip,
_SIZE // This needs to be last
}
#macro tbyDefaultColor c_black
#macro tbyColorNames [ "black", c_black, "white", c_white, "red", c_red, "orange", c_orange, "yellow", c_yellow, "green", c_green, "aqua", c_aqua, "blue", c_blue, "purple", c_purple]
// They keys should all be ony character only
#macro tbyControlIdentifiers ["r", TbyCode.Reset, "c", TbyCode.Color, ".", TbyCode.Wait, "j", TbyCode.Jittery, "^", TbyCode.Skip]
#endregion