minden/source/credits.c
Juhani Krekelä 30fa58d241 License info
2026-10-25 01:27:33 +03:00

119 lines
3.7 KiB
C

#include "credits.h"
#include <nds.h>
static void wait_key(void) {
for (;;) {
swiWaitForVBlank();
scanKeys();
if (keysDown()) {
break;
}
}
}
struct screen {
const char *title;
const char *text;
};
struct screen credit_screens[] = {
{"MINDEN",
" (TN: minden is Hungarian for "
" 'everything')\n\n"
"This game was developed by "
"nortti at Everything Game Jam "
"2026 in Kajaani\n\n"
"It's free software. Get the "
"source at https://ahti.space/git/nortti/minden"
},
{"BlocksDS",
"Minden was built with BlocksDS "
"and the .nds ROM image includes "
"several third-party libraries.\n\n"
"Individual libraries' license "
"information and required notices"
"will follow."
},
{"libnds",
"libnds is under the zlib license"
"and consequently imposes no "
"specific notices.\n\n"
"It includes FatFs which likewise"
"imposes no notices."
},
{"Maxmod",
"Copyright (C) 2008-2009 Mukunda Johnson (mukunda@maxmod.org)\n"
"Copyright (C) 2021-2025 Antonio Niño Díaz\n"
"Copyright (C) 2023 Lorenzooone (lollo.lollo.rbiz@gmail.com)\n\n"
"Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies."
},
{"Maxmod (cont.)",
"THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."
},
{"crts",
"Crts is available under the MPL "
"2.0 license.\n\n"
"As a distributor of the code in "
"binary form, I must inform you "
"that the source code is under "
"MPL 2.0 and that you can get the"
"source code at https://codeberg.org/blocksds/sdk/src/branch/master/sys/crts"
},
{"ARM7 core",
"The arm7 core itself is under "
"the zlib license. It includes "
"Maxmod, whose notices are "
"included separately."
},
{"picolibc",
"Picolibc is under a whole mess "
"of licenses. Reportedly they are"
"all BSD-like (per the README): "
" a mixture of 2- and 3- clause "
" BSD itself and a variety of "
" other (mostly older) licenses "
" with similar terms.\n\n"
"You can see the gory details at "
"https://codeberg.org/WonderfulToolchain/wf-picolibc/src/commit/770d868896622d726129fa99168d5d20160d0f55/COPYING.picolibc\n"
"if you really want to.\n\n"
"I am, probably, in violation of "
"the license terms, but if so I "
"believe essentially everyone "
"else to be too, so sue me "
"(please don't sue me)."
},
{"libgcc",
"Libgcc is distributed under the "
"GPL 3.0 license with a runtime "
"library exception, which means "
"no specific notices are required"
"when using the standard BlocksDS"
"setup."
},
};
void credits(void) {
consoleDemoInit();
consoleEnhancedColorHandler(NULL);
int screens = sizeof(credit_screens) / sizeof(credit_screens[0]);
for (int i = 0; i < screens; i++) {
consoleClear();
printf("\x1b[0;%dH\x1b[97m%s\x1b[0m\n\n", (32 - strlen(credit_screens[i].title)) / 2, credit_screens[i].title);
printf("%s", credit_screens[i].text);
char pagination_message[32];
snprintf(pagination_message, sizeof(pagination_message), "%d/%d", i + 1, screens);
printf("\x1b[23;%dH%d\x1b[90m/\x1b[0m%d", 32 - strlen(pagination_message), i + 1, screens);
wait_key();
}
printf("\x1b[97m");
}