/** Displays text on the center of the screen for a short time. */ static void COM_CEcho_f(void) { size_t i; char cechotext[1024] = ""; for (i = 1; i < COM_Argc(); i++) { strncat(cechotext, COM_Argv(i), sizeof(cechotext)-1); strncat(cechotext, " ", sizeof(cechotext)-1); } cechotext[sizeof(cechotext) - 1] = '\0'; HU_DoCEcho(cechotext); }
boolean cht_Responder(event_t *ev) { static player_t *plyr; if (ev->type == ev_keydown && 0x00 <= ev->data1 && ev->data1 <= 0xFF) // SRB2CBTODO: && 0x00 <= ev->data1 && ev->data1 <= 0xFF? { plyr = &players[consoleplayer]; // devmode cheat if (cht_CheckCheat(&cheat_bulmer, (char)ev->data1)) { sfxenum_t sfxid; const char *emoticon; byte mrandom; /* Shows a picture of David Bulmer with one the following messages: "*B^C", "*B^D", "*B^I", "*B^J", "*B^L", "*B^O", "*B^P", "*B^S", "*B^X" Accompany each emoticon with sound clip. */ M_StartControlPanel(); M_SetupNextMenu(&ReadDef2); mrandom = M_Random(); if (mrandom < 64) { emoticon = "*B^O"; sfxid = sfx_beeoh; } else if (mrandom < 128) { emoticon = "*B^L"; sfxid = sfx_beeel; } else if (mrandom < 192) { emoticon = "*B^J"; sfxid = sfx_beejay; } else { emoticon = "*B^D"; sfxid = sfx_beedee; } HU_DoCEcho(emoticon); COM_BufExecute(); S_StartSound(0, sfxid); } else if (cht_CheckCheat(&cheat_poksoc, (char)ev->data1)) { sfxenum_t sfxid; byte mrandom = M_Random(); /* Plays one of these sounds: "You cheating, lying GIT!" "Hey... are you my Grandma?" "PIIIKKAAA!" "You little bugger!" "Oxy-pad, Oxy-pad, Oxy-pad, Ox--eeaygggh!" "(Eggman's Japanese) That's not fair, now two of your players have to die!" */ if (mrandom < 48) sfxid = sfx_poksoc1; else if (mrandom < 96) sfxid = sfx_poksoc2; else if (mrandom < 144) sfxid = sfx_poksoc3; else if (mrandom < 192) sfxid = sfx_poksoc4; else if (mrandom < 240) sfxid = sfx_poksoc5; else sfxid = sfx_poksoc6; S_StartSound(0, sfxid); } else if (cht_CheckCheat(&cheat_apl, (char)ev->data1)) { sfxenum_t sfxid; byte mrandom = M_Random(); /* Plays one of these sounds: "You do realize those are prohibited on planes, right?" "IT'S A HUNKY DUNKY SUPER SIZE BIG FAT REALLY REALLY BIG BOMB!" "Let's order a pizza!" "Tails, you made the engines quit! "Buggery! What happened out here?!" "Oh no! A GigaDoomBot!" */ if (mrandom < 48) sfxid = sfx_apl1; else if (mrandom < 96) sfxid = sfx_apl2; else if (mrandom < 144) sfxid = sfx_apl3; else if (mrandom < 192) sfxid = sfx_apl4; else if (mrandom < 240) sfxid = sfx_apl5; else sfxid = sfx_apl6; S_StartSound(0, sfxid); } else if (cht_CheckCheat(&cheat_ultimate, (char)ev->data1)) // SRB2CBTODO: USE THIS FOR OTHER COOL STUFF! { // Plays the ring sound effect, then begins a single player game at ultimate difficulty. S_StartSound(0, sfx_itemup); ultmode = true; startmap = spstage_start; M_SetupNextMenu(&PlayerDef); } } return false; }