It can be done...but you will need to structure it all differently.
Prolly the simplest way is to use "messageing"...basicly create a message board (useing a bank, array, or even types)that the seperate functions can "post" and "retrieve" messages to/from...
Update_controls() finds the player presses the fire button and a "user fire" message is posted on the board.
Update_player() finds a "user fire" message, sets up the correct animation, etc..and posts a "create bullet AA, 256,72,north" message.
Update_bullets() find the "create bullet AA, 256,72,north" message...and creates a bullet of type AA, places it at 256,72 faceing north.
Obviously this would require something of a seperate messageing library that each function would need to call upon...additionaly a seperate "header" file could be used to store the messages themselves (this way the actual functions can simply pass array index numbers to the messageing function, and the messageing function can pass generic numbers back...while the actual interaction being set up and directed by the "messageing header file"
actualy sounds more complex then it really is...but it can be quite powerfull if implamented correctly, for example:
You can send a message to Update_controls() telling it to "sleep"...in which case the function does nothing except return (unless it finds the user has hit the 'esc' key...then which it posts a meassage to the Update_game() function that the user has done so)...in this manner another seperate function can be called, say Update_demo() which in turn reads from a game demo file stored on the hardrive or in a bank, and posts the appropriate messages to the Update_Player() function...which has no idea, nor cares, that it is running from a demo and not real time player input...
Course this isn't going to be the optimal way performance wise either.
Prolly the simplest way is to use "messageing"...basicly create a message board (useing a bank, array, or even types)that the seperate functions can "post" and "retrieve" messages to/from...
Update_controls() finds the player presses the fire button and a "user fire" message is posted on the board.
Update_player() finds a "user fire" message, sets up the correct animation, etc..and posts a "create bullet AA, 256,72,north" message.
Update_bullets() find the "create bullet AA, 256,72,north" message...and creates a bullet of type AA, places it at 256,72 faceing north.
Obviously this would require something of a seperate messageing library that each function would need to call upon...additionaly a seperate "header" file could be used to store the messages themselves (this way the actual functions can simply pass array index numbers to the messageing function, and the messageing function can pass generic numbers back...while the actual interaction being set up and directed by the "messageing header file"
actualy sounds more complex then it really is...but it can be quite powerfull if implamented correctly, for example:
You can send a message to Update_controls() telling it to "sleep"...in which case the function does nothing except return (unless it finds the user has hit the 'esc' key...then which it posts a meassage to the Update_game() function that the user has done so)...in this manner another seperate function can be called, say Update_demo() which in turn reads from a game demo file stored on the hardrive or in a bank, and posts the appropriate messages to the Update_Player() function...which has no idea, nor cares, that it is running from a demo and not real time player input...
Course this isn't going to be the optimal way performance wise either.