Main Page   Data Structures   File List   Globals  

convert_to_string.c

Go to the documentation of this file.
00001 #include "white_interface.h"
00002 
00060 int sprintf(char *s, const char *cntrl_string, ...);
00061 
00062 
00067 /* Init Function */
00068 void poin_entry_Init()
00069 {
00070 }
00071 
00076 /* Run Function */
00077 void poin_entry_Run()
00078 {
00079   button b_input;
00080   move m_input;
00081   char str[30];
00082 
00083   /* when a button message arrives: */
00084   if (button_in_Enabled())
00085   {
00086     b_input = *button_in_Value();
00087 
00088     /* create a string from the button message and output it. */
00089     sprintf(str, "button,%d,%d", b_input.player, b_input.button_no);
00090     out_Post(str);
00091   }
00092 
00093   /* when a move message arrives: */
00094   if (move_in_Enabled())
00095   {
00096     m_input = *move_in_Value();
00097     /* create a string from the move message and output it. */
00098     sprintf(str, "move,%d,%d,%d,%d,%d", m_input.player, m_input.x1,
00099             m_input.y1, m_input.x2, m_input.y2);
00100     out_Post(str);
00101   }
00102 }
00103 
00104 

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