aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Williams2026-02-01 12:07:18 +0000
committerEmil Williams2026-02-01 12:07:18 +0000
commita5209153cf8df1cd58c2f70f9eabb0bf5dd071f8 (patch)
tree1926b2f597868e371b6c2369c9445df1fdc49cfc
parentf7973d58b2eb298bffe0ad3f88897e02e0497de8 (diff)
downloadEUROPAXI-a5209153cf8df1cd58c2f70f9eabb0bf5dd071f8.tar.xz
EUROPAXI-a5209153cf8df1cd58c2f70f9eabb0bf5dd071f8.tar.zst
-rw-r--r--fonts/Atkinson/info.txt68
-rw-r--r--fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Bold.otfbin0 -> 33148 bytes
-rw-r--r--fonts/Atkinson/mono/AtkinsonHyperlegibleMono-BoldItalic.otfbin0 -> 33688 bytes
-rw-r--r--fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Regular.otfbin0 -> 31624 bytes
-rw-r--r--fonts/Atkinson/mono/AtkinsonHyperlegibleMono-RegularItalic.otfbin0 -> 32840 bytes
-rw-r--r--fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Bold.otfbin0 -> 45384 bytes
-rw-r--r--fonts/Atkinson/regular/AtkinsonHyperlegibleNext-BoldItalic.otfbin0 -> 48796 bytes
-rw-r--r--fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Regular.otfbin0 -> 42916 bytes
-rw-r--r--fonts/Atkinson/regular/AtkinsonHyperlegibleNext-RegularItalic.otfbin0 -> 47304 bytes
-rw-r--r--fonts/TypeLightSans/TypeLightSans.otfbin0 -> 19636 bytes
-rw-r--r--fonts/TypeLightSans/info.txt2
-rw-r--r--fonts/UnitBlock/Unitblock.ttfbin0 -> 76092 bytes
-rw-r--r--fonts/UnitBlock/info.txt2
-rw-r--r--source/all.h2
-rw-r--r--source/main.c8
-rw-r--r--source/render.c4
16 files changed, 82 insertions, 4 deletions
diff --git a/fonts/Atkinson/info.txt b/fonts/Atkinson/info.txt
new file mode 100644
index 0000000..2d696c3
--- /dev/null
+++ b/fonts/Atkinson/info.txt
@@ -0,0 +1,68 @@
+https://www.brailleinstitute.org/freefont
+
+Copyright 2020, Braille Institute of America, Inc. (https://www.brailleinstitute.org/), with
+Reserved Font Names: “ATKINSON” and “HYPERLEGIBLE”.
+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: https://openfontlicense.org
+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 under this
+license and clearly marked as such. This may include source files, build scripts and
+documentation.
+"Reserved Font Names" refers to any names specified as such after the copyright
+statement.
+"Original Version" refers to the collection of Font Software components as distributed by
+the Copyright Holder.
+"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
+VP/#68933639.2
+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 Names unless
+explicit written permission is granted by the Copyright Holder. This restriction only
+applies to the primary font name as presented to the users.
+4) The name of the Copyright Holder or the Author(s) of the Font Software shall not be
+used to promote, endorse or advertise any Modified Version, except to acknowledge the
+contributions of the Copyright Holder 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.
+VP/#68933639.2
diff --git a/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Bold.otf b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Bold.otf
new file mode 100644
index 0000000..e092ce8
--- /dev/null
+++ b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Bold.otf
Binary files differ
diff --git a/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-BoldItalic.otf b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-BoldItalic.otf
new file mode 100644
index 0000000..ac99b71
--- /dev/null
+++ b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-BoldItalic.otf
Binary files differ
diff --git a/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Regular.otf b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Regular.otf
new file mode 100644
index 0000000..36c0a22
--- /dev/null
+++ b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Regular.otf
Binary files differ
diff --git a/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-RegularItalic.otf b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-RegularItalic.otf
new file mode 100644
index 0000000..567aa1f
--- /dev/null
+++ b/fonts/Atkinson/mono/AtkinsonHyperlegibleMono-RegularItalic.otf
Binary files differ
diff --git a/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Bold.otf b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Bold.otf
new file mode 100644
index 0000000..2d10468
--- /dev/null
+++ b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Bold.otf
Binary files differ
diff --git a/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-BoldItalic.otf b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-BoldItalic.otf
new file mode 100644
index 0000000..6de50d5
--- /dev/null
+++ b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-BoldItalic.otf
Binary files differ
diff --git a/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Regular.otf b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Regular.otf
new file mode 100644
index 0000000..ba345b5
--- /dev/null
+++ b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-Regular.otf
Binary files differ
diff --git a/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-RegularItalic.otf b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-RegularItalic.otf
new file mode 100644
index 0000000..49c0897
--- /dev/null
+++ b/fonts/Atkinson/regular/AtkinsonHyperlegibleNext-RegularItalic.otf
Binary files differ
diff --git a/fonts/TypeLightSans/TypeLightSans.otf b/fonts/TypeLightSans/TypeLightSans.otf
new file mode 100644
index 0000000..670e3b7
--- /dev/null
+++ b/fonts/TypeLightSans/TypeLightSans.otf
Binary files differ
diff --git a/fonts/TypeLightSans/info.txt b/fonts/TypeLightSans/info.txt
new file mode 100644
index 0000000..116e91d
--- /dev/null
+++ b/fonts/TypeLightSans/info.txt
@@ -0,0 +1,2 @@
+license: Public Domain
+link: https://www.fontspace.com/type-light-sans-font-f135100 \ No newline at end of file
diff --git a/fonts/UnitBlock/Unitblock.ttf b/fonts/UnitBlock/Unitblock.ttf
new file mode 100644
index 0000000..be3872e
--- /dev/null
+++ b/fonts/UnitBlock/Unitblock.ttf
Binary files differ
diff --git a/fonts/UnitBlock/info.txt b/fonts/UnitBlock/info.txt
new file mode 100644
index 0000000..22e3606
--- /dev/null
+++ b/fonts/UnitBlock/info.txt
@@ -0,0 +1,2 @@
+license: Public Domain
+link: https://www.fontspace.com/unitblock-font-f104834 \ No newline at end of file
diff --git a/source/all.h b/source/all.h
index b8f13bd..9d97653 100644
--- a/source/all.h
+++ b/source/all.h
@@ -9,6 +9,8 @@
#define TEXT_BUFFER_LIMIT (1<<12)
#define FRAME_LIMIT (1<<4)
+#define MIN(a,b) (a)<(b)?(a):(b)
+
typedef struct {
Font font;
float frame_x[FRAME_LIMIT];
diff --git a/source/main.c b/source/main.c
index 1cf3c55..c775851 100644
--- a/source/main.c
+++ b/source/main.c
@@ -29,7 +29,8 @@ int main (int count, char ** arguments)
InitAudioDevice();
SetWindowPosition(0, 0);
}
- game->font = GetFontDefault();
+ game->font = LoadFont("fonts/Atkinson/mono/AtkinsonHyperlegibleMono-Bold.otf");
+ if (!IsFontValid(game->font)) { game->font = GetFontDefault(); }
/* :todo ping me I'll update this to a u/f seperated game loop */
{ /* loop to end all loops */
@@ -41,6 +42,8 @@ int main (int count, char ** arguments)
clock_gettime(CLOCK_MONOTONIC, &start);
ClearWindowState(FLAG_WINDOW_HIDDEN);
+ int test[200*200] = {0};
+ for (int i = 0; i < 200*200; i++) { test[i] = i;}
while (1) {
if (delta > wait) {
clock_gettime(CLOCK_MONOTONIC, &start);
@@ -62,7 +65,7 @@ int main (int count, char ** arguments)
{ /* draw */
BeginDrawing();
ClearBackground(BLACK);
- draw_square_grid(game, 0, 50, NULL, (int[]) {1,2,3, 4,5,6, 7,8,9}, 9);
+ draw_square_grid(game, 0, MIN(game->vertical/20, game->horizontal/25), NULL, test, 200);
draw_centered_text(game, 1, 20, WHITE, "Snails are now preparing!");
draw_centered_text(game, 2, 20, WHITE, "Gambling here");
rlDrawRenderBatchActive();
@@ -79,6 +82,7 @@ int main (int count, char ** arguments)
}
stop:
SetWindowState(FLAG_WINDOW_HIDDEN);
+ UnloadFont(game->font);
CloseAudioDevice();
CloseWindow();
return 0;
diff --git a/source/render.c b/source/render.c
index 3271b99..ef7280e 100644
--- a/source/render.c
+++ b/source/render.c
@@ -2,10 +2,10 @@
void draw_square_grid(game_t * game, size_t frame, int size, Texture * texture, int * array, size_t length) {
(void)texture;
+ float x = game->frame_x[frame], y = game->frame_y[frame];
float square_length = size;
size_t square = floor(sqrt(length));
size_t j, i;
- float x = game->frame_x[frame], y = game->frame_y[frame];
for (i = 0; i < square; ++i) {
for (j = 0; j < square; ++j) {
DrawRectangleV((Vector2){x+i*square_length, y+j*square_length},
@@ -20,11 +20,11 @@ void draw_square_grid(game_t * game, size_t frame, int size, Texture * texture,
void draw_centered_text(game_t * game, size_t frame, int font_size, Color color, char * format, ...) {
char buffer[TEXT_BUFFER_LIMIT];
+ float x = game->frame_x[frame], y = game->frame_y[frame];
va_list ap;
va_start(ap, format);
vsnprintf(buffer, TEXT_BUFFER_LIMIT, format, ap);
va_end(ap);
Vector2 v = MeasureTextEx(game->font, buffer, font_size, 1);
- float x = game->frame_x[frame], y = game->frame_y[frame];
DrawTextEx(game->font, buffer, (Vector2){x-v.x/2, y-v.y/2}, font_size, 1, color);
}