Merge remote-tracking branch 'bb/master'

This commit is contained in:
nemo 2025-07-23 21:43:25 +02:00
commit 491c71d741
5 changed files with 373 additions and 43 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -48,7 +48,7 @@ typedef struct Branche {
int next[NB_REPONSE_MAX]; int next[NB_REPONSE_MAX];
} Branche; } Branche;
#define NB_BRANCHE 10 #define NB_BRANCHE 18
typedef struct Histoire { typedef struct Histoire {
int nb_branche; int nb_branche;
Branche branches[NB_BRANCHE]; Branche branches[NB_BRANCHE];
@ -67,21 +67,65 @@ Histoire histoire = {
.nb_branche = 3, .nb_branche = 3,
.branches = { .branches = {
[0] = {
.personne = VIOLA,
.nb_conversation = 2,
.conversations = {
[0] = { [0] = {
1.0f, 2.0f, "Salut bg!", 2, { .personne = VIOLA,
"Salut, tu est qui ?", .nb_conversation = 9,
"Salut, on ce connait ?", .conversations = {
} // transition : 2870, you arrive at New Mountain, in the bar 'L'Atout' and meet Viola Fowler, drinking a glass.
{
1.0f, 2.0f, "Do we know each other?", 2, {
"We met at L'Atout earlier",
"We shared a drink",
},
}, },
[1] = { {
2.0f, 1.0f, "Bah c'est moi, Viola", 2, { 2.0f, 1.0f, "Oh yes, I remember", 0, {},
"Aaah, Viola. connait pas", },
"Mais oui viola, comment ça va ?", {
} 2.0f, 1.0f, "The guy with the whiskey, right?", 2, {
"That's right!",
"Exactly",
},
},
{
2.0f, 1.0f, "Perfect", 1, {
"We started talking after your friend fell off his chair"
},
},
{
2.0f, 1.0f, "That's Ed, he doesn't handle alcohol very well", 0, {}
},
{
2.0f, 1.0f, "It was quite funny to watch", 0, {}
},
{
2.0f, 1.0f, "Well, he's a great person", 2, {
"I'm sure of it",
"Just like you",
},
},
{
2.0f, 1.0f, "See! Even you noticed!", 0, {}
},
{
2.0f, 1.0f, "Well, sorry to cut this short, but I have to go meet some friends. You can message me around 10 PM, I'll be back", 2, {
"No problem",
"Alright, see you later",
},
},
{
2.0f, 1.0f, "See you tonight", 2, {
// set time to 10 PM
"(Say nothing)",
"I'm here!"
},
}, },
}, },
.next = {1, 2} .next = {1, 2}
@ -89,48 +133,334 @@ Histoire histoire = {
[1] = { [1] = {
.personne = VIOLA, .personne = VIOLA,
.nb_conversation = 1, .nb_conversation = 4,
.conversations = { .conversations = {
// set time to 10:17 PM
{ {
3.0f, 0.5f, "Ration + banane", 0, {}, 2.0f, 1.0f, "Are you there?", 2, {
} "I had work",
"I was busy"
},
},
{
2.0f, 1.0f, "So you're a serious person?", 0, {}
},
{
2.0f, 1.0f, "What do you do for work?", 3, {
"I'm in tech",
"I'm in sales",
"I'm still a student",
},
},
{
2.0f, 1.0f, "Oh, that's great!", 0, {}
},
}, },
.next = {0} .next = {3}
}, },
[2] = { [2] = {
.personne = ARCHIE, .personne = VIOLA,
.nb_conversation = 4, .nb_conversation = 4,
.conversations = { .conversations = {
{ {
0.0f, 1.0f, "Eh, toi, parle pas a ma meuf!", 3, { 2.0f, 1.0f, "You're very punctual!", 1, {
"PTDR T KI ?", "You have to be",
"on se connait ?", },
"jparle a qui je veut en faite",
}
}, },
{ {
2.0f, 0.5f, "SI TU PARLE ENCORE UNE FOIS A ELLE JE TE RETOURNE ET...", 3, { 2.0f, 1.0f, "Sometimes you have to take your time", 0, {}
"C'est vrai ça ?",
"Ptit coquin",
"Grrrr...",
}
}, },
{ {
1.5f, 1.0f, "Euuuh, comment ça mon reuf ?", 2, { 2.0f, 1.0f, "Did you have a good evening?", 2, {
"Bah quoi tu veut pas ?", "Awful",
"Désabille toi grabuge", "Meh, and you?",
} },
}, },
{ {
1.0f, 1.5f, "vasi on bz", 2, { 2.0f, 1.0f, "Let's hope we cheer up by talking then", 0, {}
"OUI!", },
"OUI! je ramène la sauce piquante", },
} .next = {3}
},
[3] = {
.personne = VIOLA,
.nb_conversation = 4,
.conversations = {
{
2.0f, 1.0f, "My evening was quite eventful, we went to mess with the police", 0, {}
},
{
2.0f, 1.0f, "I'm part of the Purple Sky", 2, {
"The terrorists?",
"The revolutionary group?",
},
},
{
2.0f, 1.0f, "I prefer to say 'activist group' but yes, that's us", 0, {}
},
{
2.0f, 1.0f, "We fight for freedom", 0, {}
},
},
.next = {4}
},
[4] = {
.personne = VIOLA,
.nb_conversation = 3,
.conversations = {
// transition : One week later, you continued talking with Viola.
// set time to 4:00 PM
{
2.0f, 1.0f, "Midnight wants to meet you, if you're okay with that", 2, {
"Midnight? Who is that?",
"Is he a friend of yours?",
},
},
{
2.0f, 1.0f, "He's the leader of the Purple Sky", 1, {
"Why does he want to see me?",
},
},
{
2.0f, 1.0f, "He's been interested in you since the night at L'Atout", 2, {
"Alright, when does he want to meet?",
"No, I refuse to meet him",
},
},
},
.next = {5,6}
},
[5] = {
.personne = VIOLA,
.nb_conversation = 1,
.conversations = {
{
2.0f, 1.0f, "Meet me behind the bar L'Atout at 11pm tonight", 2, {
"I'll be there",
"OK, see you tonight",
},
},
},
.next = {7}
},
[6] = {
.personne = VIOLA,
.nb_conversation = 3,
.conversations = {
{
2.0f, 1.0f, "Okay, it's your choice", 0, {},
},
{
2.0f, 1.0f, "I'll have to delete this discussion then", 0, {},
},
{
2.0f, 1.0f, "Farewell", 0, {}
}, },
}, },
.next = {0} .next = {0}
}, },
[7] = {
.personne = MINUIT,
.nb_conversation = 4,
.conversations = {
{
// transition: You are behind the Atout bar
// set time to 11pm
2.0f, 1.0f, "Are you the new guy?", 2, {
"I'm Viola's friend",
"Yes, I am."
},
},
{
2.0f, 1.0f, "I'm Midnight, I'm the leader of the Purple Sky", 0, {},
},
{
2.0f, 1.0f, "And Viola's ex too", 2, {
"Right."
"Speaking of Viola, she's running late"
},
},
{
2.0f, 1.0f, "I hear police sirens, what's going on?", 0, {},
},
{
2.0f, 1.0f, "Shit! It's too close, follow me", 2, {
"Let's go, it could be Viola",
"Uh ... are you sure we should go?"
},
},
},
.next = {8, 9}
}, },
};
[8] = {
.personne = MINUIT,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "That's her, I recognize her", 2, {
"No, not that",
"We've got to get her out of there",
},
},
{
2.0f, 1.0f, "Don't move, I'll try to go and see", 2, {
"No, it's too dangerous. The Purple Sky can't lose their leader",
"Okay, be careful",
},
},
},
.next = {10, 11}
},
[9] = {
.personne = MINUIT,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "And what else do you want to do? If it's Viola I won't forgive you, I'm going alone", 0, {},
},
{
2.0f, 1.0f, "Act like a coward if you want, but I'm going", 0, {},
},
},
.next = {11}
},
[10] = {
.personne = MINUIT,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "You may be right, but I can't lose Viola", 0, {},
},
{
2.0f, 1.0f, "Act like a coward if you want, but I'm going", 0, {},
},
},
.next = {11}
},
[11] = {
.personne = ARCHIE,
.nb_conversation = 3,
.conversations = {
{
2.0f, 1.0f, "Don't be too upset with him, he really cares about her", 0, {},
},
{
2.0f, 1.0f, "By the way, I'm Archie", 0, {},
},
{
2.0f, 1.0f, "I'm Midnight's friend, and therefore a member of Purple Sky", 2, {
"Er... Nice to meet you, I guess."
"Where'd you come from? You scared me."
},
},
},
.next = {12, 13}
},
[12] = {
.personne = ARCHIE,
.nb_conversation = 1,
.conversations = {
{
2.0f, 1.0f, "Nice to meet you", 0, {},
},
},
.next = {14}
},
[13] = {
.personne = ARCHIE,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "I'm Midnight's bodyguard", 0, {},
},
{
2.0f, 1.0f, "So I follow him wherever he goes", 0, {},
},
},
.next = {14}
},
[14] = {
.personne = ARCHIE,
.nb_conversation = 3,
.conversations = {
{
2.0f, 1.0f, "By the way, it looks like the sirens have calmed down", 0, {},
},
{
2.0f, 1.0f, "Here comes Midnight again", 0, {},
},
{
2.0f, 1.0f, "I'm off, good luck, he looks angry", 0, {},
},
},
.next = {15}
},
[15] = {
.personne = MINUIT,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "C'ETAIT VIOLA !!!", 0, {},
},
{
2.0f, 1.0f, "THIS IS ALL YOUR FAULT! YOU CALLED THEM!", 2, {
"WHAT?! Of course not",
"Calm down, it's just bad luck"
},
},
},
.next = {16, 17}
},
[16] = {
.personne = MINUIT,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "IF! I didn't trust you and I was right", 0, {},
},
{
2.0f, 1.0f, "If you're here to cause trouble, get the hell out", 0, {},
},
// transition: You leave, leaving Midnight and Archie to decide how to free Viola. Thanks for playing this demo
},
.next = {0}
},
[17] = {
.personne = MINUIT,
.nb_conversation = 2,
.conversations = {
{
2.0f, 1.0f, "BAD LUCK, HUH?! SHE CALLS THE COPS 'BAD LUCK'??", 0, {},
},
{
2.0f, 1.0f, "*pulls out a laser gun* YOU'RE GOING TO JOIN HER IN HELL, SCUM", 0, {},
},
// transition: Midnight shoots, killing you instantly. Thank you for playing this demo.
},
.next = {0}
}
}
};

10
main.c
View File

@ -332,7 +332,7 @@ int main()
DrawRectangleRec(choix_titre_box, BLACK); DrawRectangleRec(choix_titre_box, BLACK);
DrawText( DrawText(
"Que voulez vous répondre ?", "What's your answer ?",
choix_titre_box.x + 12, choix_titre_box.x + 12,
choix_titre_box.y + choix_titre_box.height*(1-0.69)/2, choix_titre_box.y + choix_titre_box.height*(1-0.69)/2,
choix_titre_box.height * 0.69, choix_titre_box.height * 0.69,
@ -347,10 +347,10 @@ int main()
int r = 0; int r = 0;
switch (s) { switch (s) {
case 0: r = draw_1_choix(choix_box, "choix 1"); break; case 0: r = draw_1_choix(choix_box, "1st choice"); break;
case 1: r = draw_2_choix(choix_box, "choix 1", "choix 2"); break; case 1: r = draw_2_choix(choix_box, "1st choice", "2nd choice"); break;
case 2: r = draw_3_choix(choix_box, "choix 1", "choix 2", "choix 3"); break; case 2: r = draw_3_choix(choix_box, "1st choice", "2nd choice", "3rd choice"); break;
case 3: r = draw_4_choix(choix_box, "choix 1", "choix 2", "choix 3", "choix 4"); break; case 3: r = draw_4_choix(choix_box, "1st choice", "2nd choice", "3rd choice", "4th choice"); break;
} }
if (r) printf("%d\n", r); if (r) printf("%d\n", r);