and a bunch more cast fixes

This commit is contained in:
Bill Currie 2002-11-01 01:39:36 +00:00
parent 868201e509
commit ca95033c4f
5 changed files with 14 additions and 14 deletions

View file

@ -31,7 +31,7 @@ string [6] dot_name = {
void (integer x, integer y) spinner = void (integer x, integer y) spinner =
{ {
local integer i = integer(time * 10) % 6; local integer i = (integer) (time * 10) % 6;
local qpic_t p = Draw_CachePic (dot_name[i], 1); local qpic_t p = Draw_CachePic (dot_name[i], 1);
Draw_Pic (x, y, p); Draw_Pic (x, y, p);
@ -138,7 +138,7 @@ integer () load_draw =
Draw_CenterPic (160, 4, Draw_CachePic ("gfx/p_load.lmp", 1)); Draw_CenterPic (160, 4, Draw_CachePic ("gfx/p_load.lmp", 1));
for (i=0 ; i< MAX_SAVEGAMES; i++) for (i=0 ; i< MAX_SAVEGAMES; i++)
Draw_String (16, 32 + 8 * i, filenames[i]); Draw_String (16, 32 + 8 * i, filenames[i]);
Draw_Character (8, 32 + load_cursor * 8, 12 + (integer (time * 4) & 1)); Draw_Character (8, 32 + load_cursor * 8, 12 + (integer) (time * 4) & 1);
return 1; return 1;
}; };
@ -149,7 +149,7 @@ integer () save_draw =
Draw_CenterPic (160, 4, Draw_CachePic ("gfx/p_save.lmp", 1)); Draw_CenterPic (160, 4, Draw_CachePic ("gfx/p_save.lmp", 1));
for (i=0 ; i< MAX_SAVEGAMES; i++) for (i=0 ; i< MAX_SAVEGAMES; i++)
Draw_String (16, 32 + 8 * i, filenames[i]); Draw_String (16, 32 + 8 * i, filenames[i]);
Draw_Character (8, 32 + save_cursor * 8, 12 + (integer (time * 4) & 1)); Draw_Character (8, 32 + save_cursor * 8, 12 + (integer) (time * 4) & 1);
return 1; return 1;
}; };
@ -224,7 +224,7 @@ void () save_menu =
integer () quit = integer () quit =
{ {
Menu_SelectMenu ("quit"); Menu_SelectMenu ("quit");
quit_index = integer (random () * 8); quit_index = (integer) (random () * 8);
quit_index &= 7; quit_index &= 7;
return 0; return 0;
}; };
@ -347,7 +347,7 @@ integer () lanconfig_draw =
} }
if (!input_active) if (!input_active)
Draw_Character (basex - 8, lanConfig_cursor_table[lanConfig_cursor], Draw_Character (basex - 8, lanConfig_cursor_table[lanConfig_cursor],
12 + (integer (time * 4) & 1)); 12 + (integer) (time * 4) & 1);
return 0; return 0;
}; };
@ -477,9 +477,9 @@ void () main_menu =
void () menu_init = void () menu_init =
{ {
id (lanConfig_port_il) = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:126 :lanConfig_cursor_table[0] :8 :4] promptCharacter:' ']; lanConfig_port_il = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:126 :lanConfig_cursor_table[0] :8 :4] promptCharacter:' '];
[lanConfig_port_il setWidth:10]; [lanConfig_port_il setWidth:10];
id (lanConfig_join_il) = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:70 :lanConfig_cursor_table[2] :24 :4] promptCharacter:' ']; lanConfig_join_il = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:70 :lanConfig_cursor_table[2] :24 :4] promptCharacter:' '];
[lanConfig_join_il setWidth:26]; [lanConfig_join_il setWidth:26];
switch (gametype ()) { switch (gametype ()) {
case "netquake": case "netquake":

View file

@ -621,9 +621,9 @@ CB_ME_player_options =
void () void ()
MENU_player_options = MENU_player_options =
{ {
id (player_config_plname_il) = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:120 :PLAYER_CONF_Y_PAD + 8 :18 :4] promptCharacter:' ']; player_config_plname_il = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:120 :PLAYER_CONF_Y_PAD + 8 :18 :4] promptCharacter:' '];
[player_config_plname_il setWidth:18]; [player_config_plname_il setWidth:18];
id (player_config_tname_il) = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:120 :PLAYER_CONF_Y_PAD + 8 + 20 :7 :4] promptCharacter:' ']; player_config_tname_il = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:120 :PLAYER_CONF_Y_PAD + 8 + 20 :7 :4] promptCharacter:' '];
[player_config_tname_il setWidth:7]; [player_config_tname_il setWidth:7];
player_config_iactive = NIL; player_config_iactive = NIL;
@ -759,7 +759,7 @@ CB_ME_network_options =
void () void ()
MENU_network_options = MENU_network_options =
{ {
id (network_config_rate_il) = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents: 120 :NETWORK_CONF_Y_PAD + 8 :9 :4] promptCharacter:' ']; network_config_rate_il = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents: 120 :NETWORK_CONF_Y_PAD + 8 :9 :4] promptCharacter:' '];
[network_config_rate_il setWidth:9]; [network_config_rate_il setWidth:9];
Menu_Begin (54, 90, "Network"); Menu_Begin (54, 90, "Network");

View file

@ -38,7 +38,7 @@ void (integer x, integer y)
opt_cursor = opt_cursor =
{ {
// use time becaus we want a nice rotaing cursor // use time becaus we want a nice rotaing cursor
Draw_Character (x, y, 12 + (integer (time * 4) & 1)); Draw_Character (x, y, 12 + (integer) (time * 4) & 1);
}; };

View file

@ -94,7 +94,7 @@ void () servlist_filter_menu =
void () server_list_menu = void () server_list_menu =
{ {
id (serv_maxping) = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:206 :40 :8 :4] promptCharacter:' ']; serv_maxping = [[InputLine alloc] initWithBounds:[[Rect alloc] initWithComponents:206 :40 :8 :4] promptCharacter:' '];
[serv_maxping setWidth:5]; [serv_maxping setWidth:5];
Menu_Begin (54, 52, ""); Menu_Begin (54, 52, "");

View file

@ -22,13 +22,13 @@ integer deathmatch;
- (id) init - (id) init
{ {
local integer i; local integer i;
id (self) = [super init]; self = [super init];
self.head = NIL; self.head = NIL;
for (i = 0; i < MAX_BODIES; i++) { for (i = 0; i < MAX_BODIES; i++) {
local GameEntity ent = NIL; local GameEntity ent = NIL;
id(ent) = [[GameEntity alloc] init]; ent = [[GameEntity alloc] init];
self.bodies[i] = ent.ent; self.bodies[i] = ent.ent;
} }
} }