Lines Matching refs:play

194 struct player_info play;  variable
227 play.mouse = 0; in clear_talk()
845 int type = play.spmap[*pmap].type[i]; in fix_dead_sprites()
850 if ((thisTickCount > (play.spmap[*pmap].last_time + 300000)) in fix_dead_sprites()
851 || (thisTickCount + 400000 < play.spmap[*pmap].last_time + 300000)) in fix_dead_sprites()
854 play.spmap[*pmap].type[i] = 0; in fix_dead_sprites()
861 if (thisTickCount > (play.spmap[*pmap].last_time + 180000)) in fix_dead_sprites()
864 play.spmap[*pmap].type[i] = 0; in fix_dead_sprites()
871 if (thisTickCount > (play.spmap[*pmap].last_time + 60000)) in fix_dead_sprites()
874 play.spmap[*pmap].type[i] = 0; in fix_dead_sprites()
1225 play.minutes = read_lsb_int(f); in load_game()
1247 play.mitem[i].active = fgetc(f); in load_game()
1248 fread(play.mitem[i].name, 11, 1, f); in load_game()
1250 play.mitem[i].name[11-1] = '\0'; // safety in load_game()
1251 play.mitem[i].seq = read_lsb_int(f); in load_game()
1252 play.mitem[i].frame = read_lsb_int(f); in load_game()
1258 play.item[i].active = fgetc(f); in load_game()
1259 fread(play.item[i].name, 11, 1, f); in load_game()
1260 play.item[i].name[11-1] = '\0'; // safety in load_game()
1261 play.item[i].seq = read_lsb_int(f); in load_game()
1262 play.item[i].frame = read_lsb_int(f); in load_game()
1266 play.curitem = read_lsb_int(f) - 1; in load_game()
1277 fread(play.spmap[i].type, 100, 1, f); in load_game()
1279 play.spmap[i].seq[j] = read_lsb_short(f); in load_game()
1280 fread(play.spmap[i].frame, 100, 1, f); in load_game()
1281 play.spmap[i].last_time = read_lsb_int(f); in load_game()
1298 play.var[i].var = read_lsb_int(f); in load_game()
1299 fread(play.var[i].name, 20, 1, f); in load_game()
1300 play.var[i].name[20-1] = '\0'; // safety in load_game()
1301 play.var[i].scope = read_lsb_int(f); in load_game()
1302 play.var[i].active = fgetc(f); in load_game()
1306 play.push_active = fgetc(f); in load_game()
1308 play.push_dir = read_lsb_int(f); in load_game()
1310 play.push_timer = read_lsb_int(f); in load_game()
1312 play.last_talk = read_lsb_int(f); in load_game()
1313 play.mouse = read_lsb_int(f); in load_game()
1314 play.item_magic = fgetc(f); in load_game()
1316 play.last_map = read_lsb_int(f); in load_game()
1326 fread(play.mapdat, 50, 1, f); in load_game()
1327 fread(play.dinkdat, 50, 1, f); in load_game()
1328 fread(play.palette, 50, 1, f); in load_game()
1332 fread(play.tile[i].file, 50, 1, f); in load_game()
1333 play.tile[i].file[50-1] = '\0'; // safety in load_game()
1337 fread(play.func[i].file, 10, 1, f); in load_game()
1338 play.func[i].file[10-1] = '\0'; // safety in load_game()
1339 fread(play.func[i].func, 20, 1, f); in load_game()
1340 play.func[i].func[20-1] = '\0'; // safety in load_game()
1351 if (strlen (play.mapdat) > 0 && strlen (play.dinkdat) > 0) in load_game()
1353 strcpy (current_map, play.mapdat); in load_game()
1354 strcpy (current_dat, play.dinkdat); in load_game()
1359 if (strlen(play.palette) > 0) in load_game()
1361 if (gfx_palette_set_from_bmp(play.palette) < 0) in load_game()
1362 log_error("Couldn't load palette from '%s': %s", play.palette, SDL_GetError()); in load_game()
1371 if (strlen(play.tile[i].file) > 0) in load_game()
1372 tiles_load_slot(play.tile[i].file, i); in load_game()
1394 if (play.item[*pcur_weapon - 1].active == 0) in load_game()
1402 weapon_script = load_script(play.item[*pcur_weapon - 1].name, 1000, /*false*/0); in load_game()
1405 weapon_script = load_script(play.item[*pcur_weapon - 1].name, 1000, /*false*/0); in load_game()
1412 if (play.item[*pcur_magic - 1].active == /*false*/0) in load_game()
1421 magic_script = load_script(play.mitem[*pcur_magic - 1].name, 1000, /*false*/0); in load_game()
1424 magic_script = load_script(play.mitem[*pcur_magic - 1].name, 1000, /*false*/0); in load_game()
1490 play.minutes += (int) (difftime(ct,time_start) / 60); in save_game()
1496 strncpy (play.mapdat, current_map, 50); in save_game()
1497 strncpy (play.dinkdat, current_dat, 50); in save_game()
1519 write_lsb_int(play.minutes, f); in save_game()
1541 fputc(play.mitem[i].active, f); in save_game()
1542 fwrite(play.mitem[i].name, 11, 1, f); in save_game()
1543 write_lsb_int(play.mitem[i].seq, f); in save_game()
1544 write_lsb_int(play.mitem[i].frame, f); in save_game()
1550 fputc(play.item[i].active, f); in save_game()
1551 fwrite(play.item[i].name, 11, 1, f); in save_game()
1552 write_lsb_int(play.item[i].seq, f); in save_game()
1553 write_lsb_int(play.item[i].frame, f); in save_game()
1557 write_lsb_int(play.curitem + 1, f); in save_game()
1567 fwrite(play.spmap[i].type, 100, 1, f); in save_game()
1569 write_lsb_short(play.spmap[i].seq[j], f); in save_game()
1570 fwrite(play.spmap[i].frame, 100, 1, f); in save_game()
1571 write_lsb_int(play.spmap[i].last_time, f); in save_game()
1588 write_lsb_int(play.var[i].var, f); in save_game()
1589 fwrite(play.var[i].name, 20, 1, f); in save_game()
1590 write_lsb_int(play.var[i].scope, f); in save_game()
1591 fputc(play.var[i].active, f); in save_game()
1595 fputc(play.push_active, f); in save_game()
1597 write_lsb_int(play.push_dir, f); in save_game()
1599 write_lsb_int(play.push_timer, f); in save_game()
1601 write_lsb_int(play.last_talk, f); in save_game()
1602 write_lsb_int(play.mouse, f); in save_game()
1603 fputc(play.item_magic, f); in save_game()
1605 write_lsb_int(play.last_map, f); in save_game()
1614 fwrite(play.mapdat, 50, 1, f); in save_game()
1615 fwrite(play.dinkdat, 50, 1, f); in save_game()
1616 fwrite(play.palette, 50, 1, f); in save_game()
1619 fwrite(play.tile[i].file, 50, 1, f); in save_game()
1622 fwrite(play.func[i].file, 10, 1, f); in save_game()
1623 fwrite(play.func[i].func, 20, 1, f); in save_game()
1634 memset(&play, 0, sizeof(play)); in kill_all_vars()
1641 if (play.item[*pcur_weapon - 1].active == 1) in kill_cur_item()
1645 weapon_script = load_script(play.item[*pcur_weapon - 1].name, 0, /*false*/0); in kill_cur_item()
1646 play.item[*pcur_weapon - 1].active = 0; in kill_cur_item()
1668 if (play.item[i].active) in kill_item_script()
1669 if (compare(play.item[i].name, name)) in kill_item_script()
1691 int script = load_script(play.item[select].name, 0, /*false*/0); in kill_item_script()
1692 play.item[select].active = /*false*/0; in kill_item_script()
1708 if (play.mitem[i].active) in kill_mitem_script()
1709 if (compare(play.mitem[i].name, name)) in kill_mitem_script()
1733 int script = load_script(play.mitem[select].name, 0, /*false*/0); in kill_mitem_script()
1734 play.mitem[select].active = 0; in kill_mitem_script()
1747 if (play.mitem[*pcur_magic - 1].active == 1) in kill_cur_magic()
1751 magic_script = load_script(play.mitem[*pcur_magic - 1].name, 0, /*false*/0); in kill_cur_magic()
1752 play.mitem[*pcur_magic - 1].active = /*false*/0; in kill_cur_magic()
1777 play.spmap[*pmap].last_time = thisTickCount; in update_screen_time()
2453 if (*pcur_weapon >= 1 && *pcur_weapon <= NB_ITEMS && play.item[*pcur_weapon - 1].active) in draw_icons()
2456 check_seq_status(play.item[*pcur_weapon - 1].seq); in draw_icons()
2458 …SDL_BlitSurface(GFX_k[seq[play.item[*pcur_weapon - 1].seq].frame[play.item[*pcur_weapon - 1].frame… in draw_icons()
2462 if (*pcur_magic >= 1 && *pcur_magic <= NB_MITEMS && play.mitem[*pcur_magic - 1].active) in draw_icons()
2465 check_seq_status(play.mitem[*pcur_magic - 1].seq); in draw_icons()
2467 …SDL_BlitSurface(GFX_k[seq[play.mitem[*pcur_magic - 1].seq].frame[play.mitem[*pcur_magic - 1].frame… in draw_icons()
3562 if (play.spmap[*pmap].type[j] != 0) in update_play_changes()
3565 if (play.spmap[*pmap].type[j] == 1) in update_play_changes()
3571 if (play.spmap[*pmap].type[j] == 2) in update_play_changes()
3576 if (play.spmap[*pmap].type[j] == 3) in update_play_changes()
3585 if (play.spmap[*pmap].type[j] == 4) in update_play_changes()
3591 if (play.spmap[*pmap].type[j] == 5) in update_play_changes()
3597 if (play.spmap[*pmap].type[j] == 6) in update_play_changes()
3602 if (play.spmap[*pmap].type[j] == 7) in update_play_changes()
3607 if (play.spmap[*pmap].type[j] == 8) in update_play_changes()
3613 pam.sprite[j].seq = play.spmap[*pmap].seq[j]; in update_play_changes()
3614 pam.sprite[j].frame = play.spmap[*pmap].frame[j]; in update_play_changes()
3946 if (play.item[i].active == 0) in add_item()
3949 play.item[i].seq = mseq; in add_item()
3950 play.item[i].frame = mframe; in add_item()
3951 strncpy(play.item[i].name, name, sizeof(play.item[i].name)); in add_item()
3952 play.item[i].name[sizeof(play.item[i].name)-1] = '\0'; in add_item()
3953 play.item[i].active = 1; in add_item()
3955 int crap1 = load_script(play.item[i].name, 1000, /*false*/0); in add_item()
3969 if (play.mitem[i].active == 0) in add_item()
3972 play.mitem[i].seq = mseq; in add_item()
3973 play.mitem[i].frame = mframe; in add_item()
3974 strncpy(play.mitem[i].name, name, sizeof(play.mitem[i].name)); in add_item()
3975 play.mitem[i].name[sizeof(play.mitem[i].name)-1] = '\0'; in add_item()
3976 play.mitem[i].active = 1; in add_item()
3978 int crap = load_script(play.mitem[i].name, 1000, /*false*/0); in add_item()