Fix for initialization of scalos preferences library. Library is now loaded only...
[AROS-Contrib.git] / Games / lbreakout2 / client / game.h
blobfae7d5b089d553cc067c0b1c037343e3645f3607
1 /***************************************************************************
2 local_game.h - description
3 -------------------
4 begin : Thu Sep 6 2001
5 copyright : (C) 2001 by Michael Speck
6 email : kulkanie@gmx.net
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 /* in game client states */
19 enum {
20 CS_NONE = 0,
21 CS_RECV_LEVEL, /* wait for level data from server */
22 CS_SCORE_TABLE, /* score table in local game */
23 CS_FINAL_TABLE, /* final score table in local game */
24 CS_FINAL_PLAYER_INFO, /* info that player cleared all levels */
25 CS_RECV_STATS, /* wait for server to send stats */
26 CS_FINAL_STATS, /* looking at final network player stats */
27 CS_GET_READY, /* await click from user */
28 CS_PLAY, /* render frame */
29 CS_NEXT_PLAYER, /* cycle to next player in local game */
30 CS_NEXT_LEVEL, /* init next level for player in local game */
31 CS_RESTART_LEVEL, /* player begins at reset level next time */
32 CS_LOOSE_LIFE, /* take a snapshot and decrease lives */
33 CS_ROUND_RESULT,/* await click and start level receive after it */
34 CS_GAME_OVER, /* all levels are played */
35 CS_CONFIRM_WARP,
36 CS_CONFIRM_QUIT,
37 CS_CONFIRM_RESTART,
38 CS_CONFIRM_CONTINUE,
39 CS_FATAL_ERROR, /* display error and quit game after it */
40 CS_PAUSE,
41 CS_BONUS_LEVEL_SCORE, /* show score gained in bonus level */
42 CS_GET_READY_FOR_NEXT_LEVEL /* wait for click when showing score of bonus level */
45 /* create various resources like shrapnells */
46 void client_game_create();
47 void client_game_delete();
49 /* create network/local game context and initiate game state:
50 * network needs to receive the level data and a local game
51 * has to load the next level */
52 int client_game_init_local( const char *setname );
53 int client_game_init_network( char *opponent_name, int diff );
55 /* create local game context and initiate game state
56 * as given from slot 'slot_id'. */
57 int client_game_resume_local( int slot_id );
59 /* finalize a game and free anything allocated by init process */
60 void client_game_finalize();
62 /* run the state driven loop until game is broken up or finished */
63 void client_game_run( void );
65 /* test a level until all balls got lost */
66 void client_game_test_level( Level *level );