Created
July 17, 2010 00:00
-
-
Save rchowe/479083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#ifdef WIN32 | |
#include <windows.h> | |
#else | |
// Unix Stuff | |
#endif | |
void pause( int time ) | |
{ | |
#ifdef WIN32 | |
Sleep( time * 1000 ); | |
#else | |
sleep( time ); | |
#endif | |
} | |
void clear_screen() | |
{ | |
#ifdef WIN32 | |
system("cls"); | |
#else | |
system("clear"); | |
#endif | |
} | |
//Function Definitions: | |
void info_intro( char *play_name, size_t len ); //Information Intro Function | |
int main( void ) | |
{ | |
int x = 0; | |
// Player Profile Variables | |
char player_name[15]; | |
/* Zodiac choice variable | |
// Methrion's Heart information variable | |
// Race choice variable | |
// Class choice variable | |
// 1st topics of interest variable | |
// 2nd topics of interest variable | |
// 3rd topics of interest variable | |
// 4th topics of interest variable | |
// 5th topics of interest variable | |
// End Player Profile Variables | |
// Display Intro: | |
// call info_intro | |
*/ | |
info_intro( player_name, 15 ); | |
clear_screen(); | |
// call choice_zodiac | |
// call choice_methheart | |
// call choice_race | |
// Display Poem of the Hollowworld | |
pause(2); | |
printf( "%s", player_name ); | |
return 0; | |
} | |
static void name_prompt( char *buffer, size_t len ) | |
{ | |
int i = 0; | |
while ( i < len ) | |
{ | |
char c = getchar(); | |
if ( c == '\n' || c == EOF ) | |
break; | |
buffer[i] = c; | |
i++; | |
} | |
} | |
void info_intro(char *play_name, size_t len ) | |
{ | |
int x = 0; | |
int sml = 3; | |
int mid = 4; | |
int big = 7; | |
pause(sml); | |
printf("\nYou know so much... \n"); | |
pause(mid); | |
printf("Yet you cannot believe that you know so little... \n"); | |
pause(mid); | |
printf("You take solace in that you even know your own \nname: "); | |
// Ask for name, record in Player name string. | |
name_prompt( play_name, 15 ); | |
printf("You feel trapped within this shell of a world.\n"); | |
pause(mid); | |
printf("A world forged by the impossible and by the Gods.\n"); | |
pause(mid); | |
printf("Gods caught up in their own petty mortal conflicts.\n"); | |
pause(mid); | |
printf("They are all manipulated.\n"); | |
pause(mid); | |
printf("They are all prisoners.\n"); | |
pause(mid); | |
printf("They are all trapped.\n"); | |
pause(mid); | |
printf("%s, how can they be these things if they are gods?\n", play_name); | |
pause(mid); | |
printf("He knows how"); | |
for( x = 1; x <= 10; x++) | |
{ | |
pause(1); | |
printf("."); | |
} | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment