Subversion Repositories Games.Carmageddon

Rev

Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 21
Line 4271... Line 4271...
4271
 
4271
 
4272
    strcpy(s, pPrefix);
4272
    strcpy(s, pPrefix);
4273
    if (pActor->identifier != NULL) {
4273
    if (pActor->identifier != NULL) {
4274
        strcat(s, pActor->identifier);
4274
        strcat(s, pActor->identifier);
4275
    }
4275
    }
4276
    NewTextHeadupSlot(4, 0, 2000, -2, s);
4276
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, s);
4277
}
4277
}
4278
 
4278
 
4279
// IDA: br_uint_32 __cdecl CalcHighestNonAmID(br_actor *pActor, int *pHighest)
4279
// IDA: br_uint_32 __cdecl CalcHighestNonAmID(br_actor *pActor, int *pHighest)
4280
br_uint_32 CalcHighestNonAmID(br_actor* pActor, int* pHighest) {
4280
br_uint_32 CalcHighestNonAmID(br_actor* pActor, int* pHighest) {
4281
    char s[256];
4281
    char s[256];
Line 4784... Line 4784...
4784
    LOG_TRACE("()");
4784
    LOG_TRACE("()");
4785
 
4785
 
4786
    gCurrent_rotate_mode = (gCurrent_rotate_mode == eRotate_mode_z) ? eRotate_mode_x : (gCurrent_rotate_mode + 1);
4786
    gCurrent_rotate_mode = (gCurrent_rotate_mode == eRotate_mode_z) ? eRotate_mode_x : (gCurrent_rotate_mode + 1);
4787
    switch (gCurrent_rotate_mode) {
4787
    switch (gCurrent_rotate_mode) {
4788
    case eRotate_mode_x:
4788
    case eRotate_mode_x:
4789
        NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: X");
4789
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: X");
4790
        break;
4790
        break;
4791
    case eRotate_mode_y:
4791
    case eRotate_mode_y:
4792
        NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: Y");
4792
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: Y");
4793
        break;
4793
        break;
4794
    case eRotate_mode_z:
4794
    case eRotate_mode_z:
4795
        NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: Z");
4795
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: Z");
4796
        break;
4796
        break;
4797
    }
4797
    }
4798
}
4798
}
4799
 
4799
 
4800
// IDA: void __cdecl CycleAccScale()
4800
// IDA: void __cdecl CycleAccScale()
Line 4802... Line 4802...
4802
    LOG_TRACE("()");
4802
    LOG_TRACE("()");
4803
 
4803
 
4804
    gCurrent_scale_mode = (gCurrent_scale_mode == eScale_mode_z) ? eScale_mode_all : (gCurrent_scale_mode + 1);
4804
    gCurrent_scale_mode = (gCurrent_scale_mode == eScale_mode_z) ? eScale_mode_all : (gCurrent_scale_mode + 1);
4805
    switch (gCurrent_scale_mode) {
4805
    switch (gCurrent_scale_mode) {
4806
    case eScale_mode_all:
4806
    case eScale_mode_all:
4807
        NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: ALL");
4807
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: ALL");
4808
        break;
4808
        break;
4809
    case eScale_mode_x:
4809
    case eScale_mode_x:
4810
        NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: X");
4810
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: X");
4811
        break;
4811
        break;
4812
    case eScale_mode_y:
4812
    case eScale_mode_y:
4813
        NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: Y");
4813
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: Y");
4814
        break;
4814
        break;
4815
    case eScale_mode_z:
4815
    case eScale_mode_z:
4816
        NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: Z");
4816
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: Z");
4817
        break;
4817
        break;
4818
    }
4818
    }
4819
}
4819
}
4820
 
4820
 
4821
// IDA: void __cdecl ScaleAccUp2()
4821
// IDA: void __cdecl ScaleAccUp2()
Line 5158... Line 5158...
5158
    gProgram_state.special_volumes = new_specs;
5158
    gProgram_state.special_volumes = new_specs;
5159
    BuildSpecVolModel(&spec, gProgram_state.special_volume_count - 1, GetInternalMat(), GetExternalMat());
5159
    BuildSpecVolModel(&spec, gProgram_state.special_volume_count - 1, GetInternalMat(), GetExternalMat());
5160
    gLast_actor = gSpec_vol_actors[gProgram_state.special_volume_count - 1];
5160
    gLast_actor = gSpec_vol_actors[gProgram_state.special_volume_count - 1];
5161
    UpdateSpecVol();
5161
    UpdateSpecVol();
5162
    sprintf(s, "Shat out special volume #%d (type %d)", gProgram_state.special_volume_count - 1, pIndex);
5162
    sprintf(s, "Shat out special volume #%d (type %d)", gProgram_state.special_volume_count - 1, pIndex);
5163
    NewTextHeadupSlot(4, 0, 2000, -2, s);
5163
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, s);
5164
    SaveSpecialVolumes();
5164
    SaveSpecialVolumes();
5165
    fclose(f);
5165
    fclose(f);
5166
}
5166
}
5167
 
5167
 
5168
// IDA: void __cdecl DropSpecVol0()
5168
// IDA: void __cdecl DropSpecVol0()
Line 5255... Line 5255...
5255
            min_d = d;
5255
            min_d = d;
5256
        }
5256
        }
5257
    }
5257
    }
5258
    if (min_index < 0) {
5258
    if (min_index < 0) {
5259
        gLast_actor = NULL;
5259
        gLast_actor = NULL;
5260
        NewTextHeadupSlot(4, 0, 2000, -2, "No special volumes to lock onto");
5260
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "No special volumes to lock onto");
5261
    } else {
5261
    } else {
5262
        sprintf(s, "Locked onto Special Volume #%d", min_index);
5262
        sprintf(s, "Locked onto Special Volume #%d", min_index);
5263
        NewTextHeadupSlot(4, 0, 2000, -2, s);
5263
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, s);
5264
        gLast_actor = gSpec_vol_actors[min_index];
5264
        gLast_actor = gSpec_vol_actors[min_index];
5265
    }
5265
    }
5266
}
5266
}
5267
 
5267
 
5268
// IDA: void __usercall DelSpecVolumeGraph(int pIndex@<EAX>)
5268
// IDA: void __usercall DelSpecVolumeGraph(int pIndex@<EAX>)
Line 5303... Line 5303...
5303
    }
5303
    }
5304
    DelSpecVolumeGraph(index);
5304
    DelSpecVolumeGraph(index);
5305
    memmove(&gProgram_state.special_volumes[index], &gProgram_state.special_volumes[index + 1], (gProgram_state.special_volume_count - index - 1) * sizeof(tSpecial_volume));
5305
    memmove(&gProgram_state.special_volumes[index], &gProgram_state.special_volumes[index + 1], (gProgram_state.special_volume_count - index - 1) * sizeof(tSpecial_volume));
5306
    memmove(&gSpec_vol_actors[index], &gSpec_vol_actors[index + 1], (gProgram_state.special_volume_count - index - 1) * sizeof(br_actor*));
5306
    memmove(&gSpec_vol_actors[index], &gSpec_vol_actors[index + 1], (gProgram_state.special_volume_count - index - 1) * sizeof(br_actor*));
5307
    gProgram_state.special_volume_count--;
5307
    gProgram_state.special_volume_count--;
5308
    NewTextHeadupSlot(4, 0, 2000, -2, "There's been a special volumes MURDER!!");
5308
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "There's been a special volumes MURDER!!");
5309
    gLast_actor = NULL;
5309
    gLast_actor = NULL;
5310
    if (&gProgram_state.special_volumes[index] < gDefault_water_spec_vol) {
5310
    if (&gProgram_state.special_volumes[index] < gDefault_water_spec_vol) {
5311
        gDefault_water_spec_vol--;
5311
        gDefault_water_spec_vol--;
5312
    }
5312
    }
5313
    SaveSpecialVolumes();
5313
    SaveSpecialVolumes();