Main Page   Data Structures   File List   Globals  

output_button.c

Go to the documentation of this file.
00001 #include "white_interface.h"
00002 #include "e:\AndrewWorkspace\Stratego\input.h"
00003 
00028 int player_no;
00029 
00030 /* Init Function */
00031 void poin_entry_Init()
00032 {
00033 }
00034 
00035 /* Run Function */
00036 void poin_entry_Run()
00037 {
00038   int input;
00039   button output;
00040 
00041   /*  As soon as the player number is received, pass it on to the
00042       Core module in the form of a "button 0" message. */
00043 
00044   if (player_Enabled())
00045   {
00046     player_no = player_Value();
00047     output.player = player_no;
00048     output.button_no = 0;
00049     out_Post(&output);
00050   }
00051 
00052   /* When a button number is received from the process_input
00053      block, send a button message (which incorporates the
00054      player number) to the Core module. */
00055 
00056   if (in_Enabled())
00057   {
00058     input = in_Value();
00059 
00060     output.player = player_no;
00061     output.button_no = input;
00062     out_Post(&output);
00063   }
00064 }
00065 

Copyright © 2002 Andrew Bates
Last Updated 03/04/02