Subversion Repositories Kolibri OS

Rev

Rev 5243 | Rev 5298 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5243 Rev 5291
Line 7... Line 7...
7
#include "strings.h"
7
#include "strings.h"
Line 8... Line 8...
8
 
8
 
9
PRSFUNC0 menu_actions[] = {
9
PRSFUNC0 menu_actions[] = {
10
    /* a */ &menu_action_start,     
10
    /* a */ &menu_action_start,     
11
    /* b */ &menu_action_exit,
11
    /* b */ &menu_action_exit,
-
 
12
    /* c */ &menu_action_change_window_scale,
12
    /* c */ &menu_action_change_window_scale
13
//    /* d */ &menu_action_
Line 13... Line 14...
13
};
14
};
-
 
15
 
Line 14... Line 16...
14
 
16
char window_scale_str[] = "c< 2X >";
15
char window_scale_str[] = "c< 2X >";
17
char level_passed_score_str[] = " 000   ";
16
 
18
 
17
/*
19
/*
Line 43... Line 45...
43
 
45
 
44
char* menu_about_titles[] = {
46
char* menu_about_titles[] = {
45
    " "L_DEVELOPED_BY,
47
    " "L_DEVELOPED_BY,
46
    " "L_ROMAN_SHUVALOV,
48
    " "L_ROMAN_SHUVALOV,
47
    " ",
49
    " ",
-
 
50
    "0"L_BACK,
-
 
51
    0
-
 
52
};
-
 
53
 
-
 
54
char* menu_level_passed_titles[] = {
-
 
55
    " "L_LEVEL_PASSED,
-
 
56
    " "L_YOUR_SCORE,
-
 
57
    level_passed_score_str,
-
 
58
    " ",
-
 
59
    "0"L_BACK,
-
 
60
    0
-
 
61
};
-
 
62
 
-
 
63
char* menu_game_over_titles[] = {
-
 
64
    " "L_GAME_OVER,
-
 
65
    " ",
48
    "0"L_DONE,
66
    "0"L_BACK,
49
    0
67
    0
Line -... Line 68...
-
 
68
};
-
 
69
 
50
};
70
 
51
 
71
 
52
char **menu_titles[] = {
72
char **menu_titles[] = {
53
    /* 0 */ menu_main_titles,
73
    /* 0 */ menu_main_titles,
-
 
74
    /* 1 */ menu_settings_titles,
-
 
75
    /* 2 */ menu_about_titles,
54
    /* 1 */ menu_settings_titles,
76
    /* 3 */ menu_level_passed_titles,
55
    /* 2 */ menu_about_titles,
77
    /* 4 */ menu_game_over_titles,
Line 56... Line 78...
56
    0
78
    0
Line 118... Line 140...
118
};
140
};
Line 119... Line 141...
119
 
141
 
120
void menu_action_start() {
142
void menu_action_start() {
Line 121... Line 143...
121
    game.status = STATUS_PLAYING;
143
    game.status = STATUS_PLAYING;
122
    
144
    
-
 
145
    game.player_x = GAME_WIDTH/2 - 50;
-
 
146
    game.player_y = GAME_HEIGHT/2 - 10;
-
 
147
    
-
 
148
    game.stage = 0;
-
 
149
    game.stage_timer = 0;
-
 
150
    
-
 
151
    game.health = GAME_HEALTH_MAX;
-
 
152
    game.ammo = GAME_AMMO_MAX;
-
 
153
    
-
 
154
    game.shoot_delay = 0;
-
 
155
    game.shoot_keypressed = 0;
-
 
156
    game.shoot_restore_delay = 0;
-
 
157
    
-
 
158
    game.score = 0;
-
 
159
    game.flags = 0;
Line 123... Line 160...
123
    game.tx = GAME_WIDTH/2 - 50;
160
    
Line 124... Line 161...
124
    game.ty = GAME_HEIGHT/2 - 10;
161
    game.objs_count = 0;
125
    
162