loads in and sets these triggers
| 628 | |
| 629 | // loads in and sets these triggers |
| 630 | int LGSTriggers(CFILE *fp) { |
| 631 | int16_t i, n_trigs = 0; |
| 632 | |
| 633 | gs_ReadShort(fp, n_trigs); |
| 634 | if (n_trigs != (int16_t)Num_triggers) { |
| 635 | Int3(); |
| 636 | return LGS_CORRUPTLEVEL; |
| 637 | } |
| 638 | |
| 639 | for (i = 0; i < n_trigs; i++) { |
| 640 | |
| 641 | // must free current trigger script if there's one allocated. |
| 642 | FreeTriggerScript(&Triggers[i]); |
| 643 | |
| 644 | gs_ReadShort(fp, Triggers[i].flags); |
| 645 | gs_ReadShort(fp, Triggers[i].activator); |
| 646 | |
| 647 | // read script info |
| 648 | //@@ script_info script; |
| 649 | //@@ |
| 650 | //@@ scrmem = LGSScript(fp, &script, &is_scripted, &scrmemsize); |
| 651 | //@@ if (is_scripted) { |
| 652 | //@@ ReinitTriggerScripts(&Triggers[i], &script, scrmemsize, scrmem); |
| 653 | //@@ } |
| 654 | //@@ if (scrmem) |
| 655 | //@@ delete[] scrmem; |
| 656 | //@@ script.set_name(NULL); |
| 657 | //@@ script.set_parms(0, NULL); |
| 658 | } |
| 659 | |
| 660 | return LGS_OK; |
| 661 | } |
| 662 | |
| 663 | struct old_vis_attach_info { |
| 664 | int obj_handle, dest_objhandle; |
no test coverage detected