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 694... Line 694...
694
 
694
 
695
    if (gProgram_state.current_depth_effect.start > 3) {
695
    if (gProgram_state.current_depth_effect.start > 3) {
696
        gProgram_state.current_depth_effect.start--;
696
        gProgram_state.current_depth_effect.start--;
697
    }
697
    }
698
    sprintf(s, "Depth start reduced to %d", gProgram_state.current_depth_effect.start);
698
    sprintf(s, "Depth start reduced to %d", gProgram_state.current_depth_effect.start);
699
    NewTextHeadupSlot(4, 0, 500, -1, s);
699
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
700
    gProgram_state.default_depth_effect.start = gProgram_state.current_depth_effect.start;
700
    gProgram_state.default_depth_effect.start = gProgram_state.current_depth_effect.start;
701
}
701
}
702
 
702
 
703
// IDA: void __cdecl MoreDepthFactor()
703
// IDA: void __cdecl MoreDepthFactor()
704
void MoreDepthFactor(void) {
704
void MoreDepthFactor(void) {
Line 707... Line 707...
707
 
707
 
708
    if (gProgram_state.current_depth_effect.start < 14) {
708
    if (gProgram_state.current_depth_effect.start < 14) {
709
        gProgram_state.current_depth_effect.start++;
709
        gProgram_state.current_depth_effect.start++;
710
    }
710
    }
711
    sprintf(s, "Depth start increased to %d", gProgram_state.current_depth_effect.start);
711
    sprintf(s, "Depth start increased to %d", gProgram_state.current_depth_effect.start);
712
    NewTextHeadupSlot(4, 0, 500, -1, s);
712
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
713
    gProgram_state.default_depth_effect.start = gProgram_state.current_depth_effect.start;
713
    gProgram_state.default_depth_effect.start = gProgram_state.current_depth_effect.start;
714
}
714
}
715
 
715
 
716
// IDA: void __cdecl LessDepthFactor2()
716
// IDA: void __cdecl LessDepthFactor2()
717
void LessDepthFactor2(void) {
717
void LessDepthFactor2(void) {
Line 720... Line 720...
720
 
720
 
721
    if (gProgram_state.current_depth_effect.end < 14) {
721
    if (gProgram_state.current_depth_effect.end < 14) {
722
        gProgram_state.current_depth_effect.end++;
722
        gProgram_state.current_depth_effect.end++;
723
    }
723
    }
724
    sprintf(s, "Depth end reduced to %d", gProgram_state.current_depth_effect.end);
724
    sprintf(s, "Depth end reduced to %d", gProgram_state.current_depth_effect.end);
725
    NewTextHeadupSlot(4, 0, 500, -1, s);
725
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
726
    gProgram_state.default_depth_effect.end = gProgram_state.current_depth_effect.end;
726
    gProgram_state.default_depth_effect.end = gProgram_state.current_depth_effect.end;
727
}
727
}
728
 
728
 
729
// IDA: void __cdecl MoreDepthFactor2()
729
// IDA: void __cdecl MoreDepthFactor2()
730
void MoreDepthFactor2(void) {
730
void MoreDepthFactor2(void) {
Line 733... Line 733...
733
 
733
 
734
    if (gProgram_state.current_depth_effect.end > 0) {
734
    if (gProgram_state.current_depth_effect.end > 0) {
735
        gProgram_state.current_depth_effect.end--;
735
        gProgram_state.current_depth_effect.end--;
736
    }
736
    }
737
    sprintf(s, "Depth end increased to %d", gProgram_state.current_depth_effect.end);
737
    sprintf(s, "Depth end increased to %d", gProgram_state.current_depth_effect.end);
738
    NewTextHeadupSlot(4, 0, 500, -1, s);
738
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
739
    gProgram_state.default_depth_effect.end = gProgram_state.current_depth_effect.end;
739
    gProgram_state.default_depth_effect.end = gProgram_state.current_depth_effect.end;
740
}
740
}
741
 
741
 
742
// IDA: void __cdecl AssertYons()
742
// IDA: void __cdecl AssertYons()
743
void AssertYons(void) {
743
void AssertYons(void) {
Line 761... Line 761...
761
    gCamera_yon = gCamera_yon + 5.f;
761
    gCamera_yon = gCamera_yon + 5.f;
762
    AssertYons();
762
    AssertYons();
763
    camera_ptr = gCamera_list[1]->type_data;
763
    camera_ptr = gCamera_list[1]->type_data;
764
    i = (int)camera_ptr->yon_z;
764
    i = (int)camera_ptr->yon_z;
765
    sprintf(s, GetMiscString(kMiscString_YonIncreasedTo_D), i);
765
    sprintf(s, GetMiscString(kMiscString_YonIncreasedTo_D), i);
766
    NewTextHeadupSlot(4, 0, 2000, -4, s);
766
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, s);
767
}
767
}
768
 
768
 
769
// IDA: void __cdecl DecreaseYon()
769
// IDA: void __cdecl DecreaseYon()
770
void DecreaseYon(void) {
770
void DecreaseYon(void) {
771
    br_camera* camera_ptr;
771
    br_camera* camera_ptr;
Line 779... Line 779...
779
    }
779
    }
780
    AssertYons();
780
    AssertYons();
781
    camera_ptr = gCamera_list[1]->type_data;
781
    camera_ptr = gCamera_list[1]->type_data;
782
    i = (int)camera_ptr->yon_z;
782
    i = (int)camera_ptr->yon_z;
783
    sprintf(s, GetMiscString(kMiscString_YonDecreasedTo_D), i);
783
    sprintf(s, GetMiscString(kMiscString_YonDecreasedTo_D), i);
784
    NewTextHeadupSlot(4, 0, 2000, -4, s);
784
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, s);
785
}
785
}
786
 
786
 
787
// IDA: void __cdecl SetYon(br_scalar pYon)
787
// IDA: void __cdecl SetYon(br_scalar pYon)
788
void SetYon(br_scalar pYon) {
788
void SetYon(br_scalar pYon) {
789
    int i;
789
    int i;
Line 826... Line 826...
826
#ifdef DETHRACE_FIX_BUGS
826
#ifdef DETHRACE_FIX_BUGS
827
        sprintf(s, "Camera angle increased to %f", (float)BrAngleToDegrees(camera_ptr->field_of_view));
827
        sprintf(s, "Camera angle increased to %f", (float)BrAngleToDegrees(camera_ptr->field_of_view));
828
#else
828
#else
829
        sprintf(s, "Camera angle increased to %d", gProgram_state.current_depth_effect.end);
829
        sprintf(s, "Camera angle increased to %d", gProgram_state.current_depth_effect.end);
830
#endif
830
#endif
831
        NewTextHeadupSlot(4, 0, 500, -1, s);
831
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
832
    }
832
    }
833
}
833
}
834
 
834
 
835
// IDA: void __cdecl DecreaseAngle()
835
// IDA: void __cdecl DecreaseAngle()
836
void DecreaseAngle(void) {
836
void DecreaseAngle(void) {
Line 848... Line 848...
848
#ifdef DETHRACE_FIX_BUGS
848
#ifdef DETHRACE_FIX_BUGS
849
        sprintf(s, "Camera angle decreased to %f", (float)BrAngleToDegrees(camera_ptr->field_of_view));
849
        sprintf(s, "Camera angle decreased to %f", (float)BrAngleToDegrees(camera_ptr->field_of_view));
850
#else
850
#else
851
        sprintf(s, "Camera angle decreased to %d", gProgram_state.current_depth_effect.end);
851
        sprintf(s, "Camera angle decreased to %d", gProgram_state.current_depth_effect.end);
852
#endif
852
#endif
853
        NewTextHeadupSlot(4, 0, 500, -1, s);
853
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
854
    }
854
    }
855
}
855
}
856
 
856
 
857
// IDA: void __cdecl ToggleDepthMode()
857
// IDA: void __cdecl ToggleDepthMode()
858
void ToggleDepthMode(void) {
858
void ToggleDepthMode(void) {
859
    LOG_TRACE("()");
859
    LOG_TRACE("()");
860
 
860
 
861
    switch (gProgram_state.current_depth_effect.type) {
861
    switch (gProgram_state.current_depth_effect.type) {
862
    case eDepth_effect_none:
862
    case eDepth_effect_none:
863
        InstantDepthChange(eDepth_effect_darkness, gProgram_state.current_depth_effect.sky_texture, 8, 0);
863
        InstantDepthChange(eDepth_effect_darkness, gProgram_state.current_depth_effect.sky_texture, 8, 0);
864
        NewTextHeadupSlot(4, 0, 500, -1, "Darkness mode");
864
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Darkness mode");
865
        break;
865
        break;
866
    case eDepth_effect_darkness:
866
    case eDepth_effect_darkness:
867
        InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0);
867
        InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0);
868
        InstantDepthChange(eDepth_effect_fog, gProgram_state.current_depth_effect.sky_texture, 10, 0);
868
        InstantDepthChange(eDepth_effect_fog, gProgram_state.current_depth_effect.sky_texture, 10, 0);
869
        NewTextHeadupSlot(4, 0, 500, -1, "Fog mode");
869
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Fog mode");
870
        break;
870
        break;
871
    case eDepth_effect_fog:
871
    case eDepth_effect_fog:
872
        InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0);
872
        InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0);
873
        NewTextHeadupSlot(4, 0, 500, -1, "Depth effects disabled");
873
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Depth effects disabled");
874
        break;
874
        break;
875
    }
875
    }
876
    gProgram_state.default_depth_effect.type = gProgram_state.current_depth_effect.type;
876
    gProgram_state.default_depth_effect.type = gProgram_state.current_depth_effect.type;
877
}
877
}
878
 
878