Pokergame commit

This commit is contained in:
2023-02-17 22:55:48 -08:00
parent a7cc75b512
commit 3b3b97294c
9 changed files with 228 additions and 141 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,93 +1,93 @@
Copyright 2011 The Alice Project Authors (https://github.com/cyrealtype/Alice)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-mincho)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -30,7 +30,10 @@
</text>
<!-- Stabbing sounds -->
<text character="player" emotion="unset">
<string lang="en">No... this can't be happening... I think-I think I was stabbed! N-No... I-I'm going cold now</string>
<string lang="en">
No... this can't be happening... Was I stabbed?
N-No... I-I'm going cold now.
</string>
</text>
<!-- Thud noise -->
<text character="player" emotion="unset">
@ -230,9 +233,94 @@
<string lang="en">Huh? Nami suddenly stopped. She seems to just be standing there staring off in to the distance.</string>
</text>
<text character="nami" emotion="surprised">
<string lang="en">Hmm… Actually, you may be able to help me.</string>
<string lang="en">Hmm... Actually, you may be able to help me.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">Her eyes are focusing on me now, I don't like that grin she has. I have a feeling this isn't going to be good for me.</string>
</text>
<text character="nami" emotion="surprised">
<string lang="en">Call it a quid pro quo if you will.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">How could I help?</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">Are you willing to bet it all on one more hand? I may have just the game for you to play.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">What is she talking about?</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">There are certain rules here that I have to follow. For example I cannot send you back to your world, that is out of my control. However, there are no rules about you being sent to another world.</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">So let's say I send you to this medieval world where all of these lost souls are coming from and you find the cause of their deaths.</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">This way you will be able to continue living in the other world and have another chance at your life. You'll be able to experience a new adventure and you'll be helping me out as well.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">This sounds like one of those deal with the devil things, I am not sure I should be dealing with death herself to be honest... It also sounds like a terrible plan over all.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">So, Nami, you want me to go to a world I don't know, with people I don't know, and that has monsters and lots of death, stuck in the medieval times?</string>
</text>
<text character="player" emotion="unset">
<string lang="en">Not to mention I won't understand their language, won't know their culture, or have any idea what to do when I get there?</string>
</text>
<text character="player" emotion="unset">
<string lang="en">I'll put it bluntly Nami, it sounds like I would be signing up for a short, miserable, lonely life, and just to have a chance to help you out. Not even the most novice player in the world would call on this hand.</string>
</text>
<text character="nami" emotion="surprised">
<string lang="en">But you are not a novice, you have a chance to bet big and bluff where you need to go.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">These puns are terrible, I am not even sure she understands how to play Poker.</string>
</text>
<text character="nami" emotion="surprised">
<string lang="en">So, will you stand or will you hit?</string>
</text>
<pause duration="5.0" />
<text character="player" emotion="unset">
<string lang="en">That's blackjack, not poker.</string>
</text>
<pause duration="2.0" />
<text character="player" emotion="unset">
<string lang="en">But given my current circumstances I suppose I can risk going for another deal.</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">Oh! Thank you, thank you! I can promise that you will be placed in a location where you can make a positive impact. The decision has already been made, and I assure you, it will be the right one.</string>
</text>
<text character="player" emotion="unset">
<string lang="en">I have a real bad feeling about this, but it has to be better than where I'd end up if I got on that boat.</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">Now, I'm afraid time is a luxury I we do not have currently I'll send you to the other world, and you can begin your search for the cause of the deaths there. I'll be in touch to guide you and check in on your progress. Are you ready?</string>
</text>
<text character="player" emotion="unset">
<string lang="en">Is it too late to fold?</string>
</text>
<text character="nami" emotion="happy">
<string lang="en">Unfortunately you're all-in now. Now stand still and relax, I will do what I must</string>
</text>
<text character="narrator" emotion="unset">
<string lang="en">
As you close your eyes you take a deep breath. You begin to feel the air around you going cold, first it's bearable but it is rapidly becoming freezing cold.</string>
</string>
</text>
<!-- Play Audio, Fade out screen -->
<text character="narrator" emotion="unset">
<string lang="en">
You hear a ringing in your ears gradually getting louder and louder, it sounds of loud metallic bangs like two large pieces of steel colliding. After you focus your sense you begin to smell smoke, starting weak but getting stronger.</string>
</string>
</text>
<text character="narrator" emotion="unset">
<string>
Your eyes begin to ache, there is something bright shining in them, so bright you can't help but look away.
</string>
</text>
<!-- End Scene -->
<!--
<scene-transition scene="vnscene_2" />

View File

@ -37,7 +37,7 @@ float_t TrueTypeFont::getScale(float_t scale) {
float_t TrueTypeFont::getSpaceSize(float_t fontSize) {
assertTrue(fontSize > 0);
return this->getScale(fontSize) * 18;
return this->getScale(fontSize) * 48;
}
float_t TrueTypeFont::getInitialLineHeight(float_t fontSize) {
@ -47,7 +47,7 @@ float_t TrueTypeFont::getInitialLineHeight(float_t fontSize) {
float_t TrueTypeFont::getLineHeight(float_t fontSize) {
assertTrue(fontSize > 0);
return 96.0f * this->getScale(fontSize);
return 128.0f * this->getScale(fontSize);
}
void TrueTypeFont::buffer(

View File

@ -32,6 +32,6 @@ tool_texture(texture_test texture_test.png)
tool_language(locale_poker ${DIR_GAME_ASSETS}/locale/locale.xml)
tool_tileset(tileset_death texture_death ${DIR_GAME_ASSETS}/characters/death/sheet.png 1 3)
tool_tileset(tileset_penny texture_penny ${DIR_GAME_ASSETS}/characters/penny/sheet.png 1 3)
tool_truetype(truetype_alice ${DIR_GAME_ASSETS}/font/Alice-Regular.ttf truetype_alice 2048 2048 120)
tool_truetype(truetype_bizudp ${DIR_GAME_ASSETS}/font/BIZUDPGothic-Regular.ttf truetype_bizudp 2048 2048 120)
tool_audio(audio_test borrowed/sample_short.wav)
tool_vnscene(Scene_1 ${DIR_GAME_ASSETS}/vn/Scene_1.xml)

View File

@ -1,43 +1,43 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "prefabs/ui/UIBorderPrefab.hpp"
#include "visualnovel/ui/VisualNovelTextbox.hpp"
namespace Dawn {
class VisualNovelTextboxPrefab :
public UIPrefab<VisualNovelTextbox, VisualNovelTextboxPrefab>
{
public:
static std::vector<Asset*> prefabAssets(AssetManager *man) {
std::vector<Asset*> assets;
assets.push_back(man->get<TrueTypeAsset>("truetype_alice"));
vectorAppend(&assets, UIBorderPrefab::getRequiredAssets(man));
return assets;
}
static void prefabApply(AssetManager *man, VisualNovelTextbox *textbox) {
auto assetFont = man->get<TrueTypeAsset>("truetype_alice");
UIBorderPrefab::apply(&textbox->border);
textbox->setFont(&assetFont->font);
textbox->setFontSize(48.0f);
textbox->setLabelPadding(glm::vec2(2, 2));
textbox->label.textColor = COLOR_WHITE;
textbox->setTransform(
UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_END,
glm::vec4(
0,
(assetFont->font.getLineHeight(textbox->getFontSize()) * 4) +
(textbox->border.getBorderSize().y * 2.0f) +
(textbox->getLabelPadding().y * 2.0f),
0, 0
),
0.0f
);
}
};
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "prefabs/ui/UIBorderPrefab.hpp"
#include "visualnovel/ui/VisualNovelTextbox.hpp"
namespace Dawn {
class VisualNovelTextboxPrefab :
public UIPrefab<VisualNovelTextbox, VisualNovelTextboxPrefab>
{
public:
static std::vector<Asset*> prefabAssets(AssetManager *man) {
std::vector<Asset*> assets;
assets.push_back(man->get<TrueTypeAsset>("truetype_bizudp"));
vectorAppend(&assets, UIBorderPrefab::getRequiredAssets(man));
return assets;
}
static void prefabApply(AssetManager *man, VisualNovelTextbox *textbox) {
auto assetFont = man->get<TrueTypeAsset>("truetype_bizudp");
UIBorderPrefab::apply(&textbox->border);
textbox->setFont(&assetFont->font);
textbox->setFontSize(36.0f);
textbox->setLabelPadding(glm::vec2(2, 2));
textbox->label.textColor = COLOR_WHITE;
textbox->setTransform(
UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_END,
glm::vec4(
0,
(assetFont->font.getLineHeight(textbox->getFontSize()) * 4) +
(textbox->border.getBorderSize().y * 2.0f) +
(textbox->getLabelPadding().y * 2.0f),
0, 0
),
0.0f
);
}
};
}

View File

@ -92,7 +92,6 @@ int32_t GeneratedLanguages::start() {
std::cout << "Language " << itLang->first << " is missing key " << key << std::endl;
return 1;
}
std::cout << "bruh " << exist->second << std::endl;
bufferOut += exist->first + "|" + exist->second + "|";
++itKeys;
}