Category : A Collection of Games for DOS and Windows
Archive   : OGRE.ZIP
Filename : MAIN.C

 
Output of file : MAIN.C contained in archive : OGRE.ZIP
/*
OGRE: a tactical ground combat game set in 2085.

Adapted from the Metagaming Microgame by Steve Jackson.

This version was written for a Vax 11/780 under Unix
by Michael Caplinger, Rice University, February-March 1982.

Paper game (c) 1977 by Steve Jackson
This implementation (c) 1982, 1984 by Michael Caplinger
*/

#include

#define MAIN
#include "ext.h"

main(argc, argv)
char **argv;
{

if(argc > 1){
if ((argv[1][0]-'0'>=0)&&(argv[1][0]-'0' < 9))
mark = argv[1][0] - '0';
}
else mark = 3;

set_term();
srand(time(0));
init_units(mark);
init_ogre(mark);
disp_ogre_status(TRUE);

while(1) {

init_round();

/* The Ogre fires. */
assign_fire_ogre();
check_over();

/* Player moves, and fires. */
move_def();
attack_def();

/* Let the GEVs move their extra 3 turns. */
init_gev2();
move_def();

/* The Ogre moves. */
move_ogre();
check_over();

}

}

/*
Get a character. If it's a ^L, redraw the screen.
*/

readchar() {
int c ;

while ((c = inkey()) == REDRAW) redraw_screen() ;
return (islower(c) ? toupper(c) : c) ;
}

/*
See if the game is over, and die if it is.
*/
check_over()
{
char *message;
int over;

over = FALSE;

if(unit[0].status == DESTROYED) {
message = "The Ogre wins!!";
over = TRUE;
}
if(ogre.movement == 0) {
message = "You win!!";
over = TRUE;
}

if(over) {
clear_screen();
reset_term();
printf("%s\n", message);
exit(0);
}

}


  3 Responses to “Category : A Collection of Games for DOS and Windows
Archive   : OGRE.ZIP
Filename : MAIN.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/