update credits, fix stuff

This commit is contained in:
Andrei Alexeyev 2017-10-23 13:48:30 +03:00
parent 4bdfe5f408
commit bd910c3444
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
7 changed files with 39 additions and 14 deletions

View file

@ -51,7 +51,8 @@ int cli_args(int argc, char **argv, CLIAction *a) {
{{"dumpstages", no_argument, 0, 'u'}, "Print a list of all stages in the game", 0},
{{"vfs-tree", required_argument, 0, 't'}, "Print the virtual filesystem tree starting from %s", "PATH"},
#endif
{{"help", no_argument, 0, 'h'}, "Display this help."},
{{"credits", no_argument, 0, 'c'}, "Show the credits scene and exit"},
{{"help", no_argument, 0, 'h'}, "Display this help"},
{{0,0,0,0},0,0}
};
@ -151,6 +152,9 @@ int cli_args(int argc, char **argv, CLIAction *a) {
a->type = CLI_DumpVFSTree,
a->filename = strdup(optarg ? optarg : "");
break;
case 'c':
a->type = CLI_Credits;
break;
default:
log_fatal("Unknown option (this shouldnt happen)");
}

View file

@ -17,6 +17,7 @@ typedef enum {
CLI_DumpStages,
CLI_DumpVFSTree,
CLI_Quit,
CLI_Credits,
} CLIActionType;
typedef struct CLIAction CLIAction;

View file

@ -27,18 +27,25 @@ static struct {
} credits;
void credits_fill(void) {
// In case the shortened URLs break,
// Tuck V's YouTube: https://www.youtube.com/channel/UCaw73cuHLnFCSpjOtt_9pyg
// Lalasa's YouTube: https://www.youtube.com/channel/UCc6ePuGLYnKTkdDqxP3OB4Q
// vnutriya's bandcamp: https://vnutriya.bandcamp.com/
credits_add("Taisei Project\nbrought to you by…", 200);
credits_add("laochailan\nLukas Weber\nlaochailan@web.de", 300);
credits_add("Akari\nAndrei Alexeyev\nakari@alienslab.net", 300);
credits_add("Tuck V\nDiscord @Tuck#1679\nMusic", 300);
credits_add("lachs0r\nMartin Herkt\nlachs0r@hong-mailing.de", 300);
credits_add("makise-homura\nIgor Molchanov\nElbrus compatible™", 300);
credits_add("aiju\nJulius Schmidt\nhttp://aiju.de", 300);
credits_add("laochailan\nLukas Weber\nlaochailan@web.de\n\nProgramming, game design,\ngraphics", 300);
credits_add("Akari\nAndrei Alexeyev\nakari@alienslab.net\n\nProgramming, game design", 300);
credits_add("Tuck V\nDiscord: @Tuck#1679\nYouTube: https://is.gd/exafez\n\nOriginal soundtrack", 300);
credits_add("vnutria\nMikhail Novik\nBandcamp: https://is.gd/owojix\n\nSound effects", 300);
credits_add("Lalasa\nOla Kruzel\nokruzel@comcast.net\nYouTube: https://is.gd/ohihef\n\nWriting, playtesting", 300);
credits_add("lachs0r\nMartin Herkt\nlachs0r@hong-mailing.de\n\nHosting, packaging,\nspiritual guidance", 300);
credits_add("makise-homura\nIgor Molchanov\nakemi_homura@kurisa.ch\n\nCode contributions\nElbrus compatible™", 300);
credits_add("aiju\nJulius Schmidt\nhttp://aiju.de/\n\nI don't remember what this guy did", 300);
credits_add("Special Thanks", 300);
credits_add("ZUN\nfor Tōhō Project\nhttp://www16.big.or.jp/~zun/", 300);
credits_add("Mochizuki Ado\nfor a nice yukkuri image", 300);
credits_add("…and You!\nfor playing", 300);
credits_add("Visit Us\nhttp://taisei-project.org\n \nAnd join our IRC channel\n#taisei-project at irc.freenode.net", 500);
credits_add("Visit Us\nhttps://taisei-project.org/\n\nAnd join our IRC channel\n#taisei-project at irc.freenode.net\n\nOr our Discord server\nhttps://discord.gg/JEHCMzW", 500);
credits_add("*", 150);
}
@ -269,7 +276,7 @@ static bool credits_frame(void *arg) {
credits_draw();
global.frames++;
SDL_GL_SwapWindow(video.window);
return !credits.end;
return credits.end;
}
void credits_loop(void) {

View file

@ -128,6 +128,11 @@ static bool ending_frame(void *arg) {
Ending *e = arg;
events_poll(NULL, 0);
if(e->pos >= e->count - 1) {
return false;
}
ending_draw(e);
global.frames++;
SDL_GL_SwapWindow(video.window);
@ -140,7 +145,7 @@ static bool ending_frame(void *arg) {
set_transition(TransFadeWhite, ENDING_FADE_OUT, ENDING_FADE_OUT);
}
return e->pos < e->count;
return true;
}
void ending_loop(void) {

View file

@ -21,6 +21,7 @@
#include "cli.h"
#include "vfs/setup.h"
#include "version.h"
#include "credits.h"
static void taisei_shutdown(void) {
log_info("Shutting down");
@ -207,6 +208,11 @@ int main(int argc, char **argv) {
return 0;
}
if(a.type == CLI_Credits) {
credits_loop();
return 0;
}
#ifdef DEBUG
log_warn("Compiled with DEBUG flag!");

View file

@ -512,11 +512,7 @@ typedef struct StageFrameState {
} StageFrameState;
static bool stage_fpslimit_condition(void *arg) {
#ifdef DEBUG
return !gamekeypressed(KEY_FPSLIMIT_OFF) && (global.replaymode != REPLAY_PLAY || !gamekeypressed(KEY_SKIP)) && !global.frameskip;
#else
return (global.replaymode != REPLAY_PLAY || !gamekeypressed(KEY_SKIP)) && !global.frameskip;
#endif
}
static bool stage_frame(void *arg) {

View file

@ -356,6 +356,12 @@ magic:
return;
}
#ifdef DEBUG
if(gamekeypressed(KEY_FPSLIMIT_OFF)) {
continue;
}
#endif
if(!limiter_cond_func || limiter_cond_func(arg)) {
next_frame_time = real_time + target_frame_time;