add dialog

This commit is contained in:
2025-11-09 20:01:20 -05:00
parent d8c8a2d27c
commit 179124963e
3 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
// SPDX-License-Identifer: MIT
/* dialog.odin
*
* Contents for dialog of characters
*
* Written by vx-clutch
*/
package dialog
guy := [?]string{
"So? Looking to enter this casino, eh?",
"bitch",
"That casino is pretty fishy",
"Why do I have a fishy taste in my mouth",
"Who shitted my pants? The fish?",
}
blackjack := [?]string{
"Hows everyone swimming tonight?",
"Caught any luck yet?",
"Welcome aboard!",
"Good to see you back!",
"Feeling fintastic tonight?",
}
slots := [?]string{
"Yeah im a talking slot machine, so what?",
"Eyes up here asshole",
"Blub blub, im a fish!",
"Jackpot! oh wait nevermind.",
}
videopoker := [?]string{
"Yeah im a talking video poker machine, so what?",
"You video, i'll poker, lets video poker",
"You're playing a fish themed casino game instead of doing that thing you are putting off, arn't you?",
}
poker := [?]string{
"Looks like the big fish are hungry tonight.",
"Hope you can swim, kid.",
"Smells like someones bleeding in the water.",
"Dont flop now, the sharks are watchin.",
"Keep your fins steady, its about to get deep.",
}

View File

@@ -0,0 +1,44 @@
// SPDX-License-Identifer: MIT
/* dialog_handle.odin
*
* Routines for handling dialog related features
*
* Written by vx-clutch
*/
package dialog
import "core:math/rand"
import "../log"
/*
Type represeting all the characters
*/
Characters :: enum {
GUY,
BLACKJACK,
SLOTS,
VIDEOPOKER,
POKER,
}
/*
Get random dialog string based on character
*/
get_random :: proc(character: Characters) -> string {
msg := ""
switch character {
case .GUY:
msg = rand.choice(guy[:])
case .BLACKJACK:
msg = rand.choice(blackjack[:])
case .SLOTS:
msg = rand.choice(slots[:])
case .VIDEOPOKER:
msg = rand.choice(videopoker[:])
case .POKER:
msg = rand.choice(poker[:])
}
log.printl(msg)
return msg
}