-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstory.c
105 lines (86 loc) · 2.09 KB
/
story.c
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
#include <raylib.h>
#include <stdio.h>
#include <stdlib.h>
#include "story.h"
#include "game.h"
storyPhase currentStoryPhase = NONE;
int bookmark = 0;
float dialogueT = 0.000f;
void SyStoryPhaseSwitch(storyPhase (*currentStoryPhase),int playerDistance)
{
if((playerDistance>200)&&(playerDistance< 50000))
{
(*currentStoryPhase)= PROLOGUE;
} else
{
(*currentStoryPhase)= NONE;
}
}
void SyPrintDialogue(storyPhase *currentStoryPhase, char dialogueData[PHASE][VERSE_NR][VERS_MAX_LENGTH])
{
switch((*currentStoryPhase))
{
case NONE:
break;
case PROLOGUE:
// sizeof(dialogueData[0])/sizeof(dialogueData[0][0])
if (bookmark == 3)
{
currentStoryPhase = NONE;
break;
}
DrawText(TextFormat("%s", dialogueData[1][bookmark]),(GetMonitorWidth(0))/2-((MeasureText(TextFormat("%s", dialogueData[1][bookmark]),24))/2), GetMonitorHeight(0)-116, 24, WHITE);
if((dialogueT) < (*(dialogueTime[1][bookmark])))
{
(dialogueT) += GetFrameTime();
} else
{
++bookmark;
dialogueT = 0;
}
break;
default:
}
}
char dialogueData[PHASE][VERSE_NR][VERS_MAX_LENGTH] =
{
{
},
{
{
"|Ship AI|: I confirm completion of the descent procedure into exploitation space. Shall I activate assisted manual control mode?"
},
{
"|Joseph|: Yes, Activate manual control with 10% assistance. Also, activate accelerated turnaround system."
},
{
"|Ship AI|: Warning, operating in exploitation space carries a higher collision probability. Increasing energy to the frontal shield."
}
},
{
{
"test"
}
}
};
int dialogueTime[PHASE][VERSE_NR][1] =
{
{
},
{
{
8
},
{
6
},
{
8
}
},
{
{
5
}
}
};