DFX BMS Values

talk and review codes here

Moderators: Q-dad~TAG, EXP STAFF, Moderator

DFX BMS Values

Postby DR.EVIL~TAG » 01-21-2006 01:32 PM

Few offsets in the DFX bms files .

88 = water = 1
88 = Fog Dist = 2
88 = Fog Color = 4
98 = Water Level = heght hex value
F6 = Water Color Red = color hex value
F7 = Water Color Green = color hex value
F8 = Water Color Blue = color hex value
F9 = Murk % =Hex value
9E = Fog Distance = Hex value
A0 = Fog Color Red = Color hex value
A1 = Fog Color Green = Color hex value
A2 = Fog Color Blue = Color hex value
8A = Night Mission = Hex Value 10
8A = Start night mission with NVG = Hex Value 50
88 = Weather = Hex value 08
88 = Rotate Map = Hex value 20
248 = Start time


My code



unit DFXBMSMOD;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, ExtCtrls,ComCtrls;

type
TForm1 = class(TForm)
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
MainMenu1: TMainMenu;
File1: TMenuItem;
Open1: TMenuItem;
Save1: TMenuItem;
FileName: TLabel;
GroupBox1: TGroupBox;
WaterLevelCheck: TCheckBox;
WaterLevelEdit: TEdit;
WaterColorLabel: TLabel;
WaterRedColorEdit: TEdit;
WaterColorGreenEdit: TEdit;
WaterColorBlueEdit: TEdit;
Label1: TLabel;
MercPercentageEdit: TEdit;
FogDistanceCheck: TCheckBox;
FogDistanceEdit: TEdit;
FogColorCheck: TCheckBox;
FogColorRedEdit: TEdit;
FogColorGreenEdit: TEdit;
FogColorBlueEdit: TEdit;
StartTimeLabel: TLabel;
StartTimeCombo: TComboBox;
MinsPerDayLabel: TLabel;
Edit1: TEdit;
NightVisionCheck: TCheckBox;
ClimateLabel: TLabel;
ClimateCombo: TComboBox;
WindSpeedLabel: TLabel;
WindSpeedEdit: TEdit;
WindDirLabel: TLabel;
WindDirEdit: TEdit;
WeatherCheck: TCheckBox;
WeatherCombo: TComboBox;
WaterHexLabel: TLabel;
WaterRedColorHex: TLabel;
WaterColorGreenHEx: TLabel;
WaterColorBlueHex: TLabel;
WaterShape: TShape;
Button1: TButton;
WaterDialog: TColorDialog;
FogDistanceHex: TLabel;
MercPercentageHEx: TLabel;
FogShape: TShape;
Button2: TButton;
FogDialog: TColorDialog;
FogRedHex: TLabel;
FogGreenHEx: TLabel;
FogBlueHex: TLabel;
StartTimeHExEdit: TEdit;
StartTimeHexEdit2: TEdit;
GroupBox2: TGroupBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
ComboBox3: TComboBox;
GroupBox3: TGroupBox;
ComboBox4: TComboBox;
ComboBox5: TComboBox;
ComboBox6: TComboBox;
ComboBox7: TComboBox;
ComboBox8: TComboBox;
ComboBox9: TComboBox;
ComboBox10: TComboBox;
ComboBox11: TComboBox;
ComboBox12: TComboBox;
ComboBox13: TComboBox;
ComboBox14: TComboBox;
ComboBox15: TComboBox;
ComboBox16: TComboBox;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Memo1: TMemo;
SaveMis1: TMenuItem;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
StartWNvgOnCheck: TCheckBox;
ClimateHexEdit: TEdit;
ClimateHexEdit2: TEdit;
CheckBoxsHexValueEdit: TEdit;
CheckBoxsHexValueEdit2: TEdit;
TrackBar3: TTrackBar;
WindHexLabel: TLabel;
WeatherHExEdit2: TEdit;
WeatherHExEdit: TEdit;
NightVisionHexEdit2: TEdit;
NightVisionHexEdit: TEdit;
procedure Open1Click(Sender: TObject);
procedure WaterLevelEditChange(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure WaterRedColorEditChange(Sender: TObject);
procedure WaterColorGreenEditChange(Sender: TObject);
procedure WaterColorBlueEditChange(Sender: TObject);
procedure FogDistanceEditChange(Sender: TObject);
procedure MercPercentageEditChange(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure StartTimeComboChange(Sender: TObject);
procedure FogColorRedEditChange(Sender: TObject);
procedure FogColorGreenEditChange(Sender: TObject);
procedure FogColorBlueEditChange(Sender: TObject);
procedure StartTimeHexEdit2Change(Sender: TObject);
procedure StartTimeHExEditChange(Sender: TObject);
procedure CheckBoxsHexValueEditChange(Sender: TObject);
procedure CheckBoxsHexValueEdit2Change(Sender: TObject);
procedure ClimateComboChange(Sender: TObject);
procedure ClimateHexEdit2Change(Sender: TObject);
procedure ClimateHexEditChange(Sender: TObject);
procedure WindSpeedEditChange(Sender: TObject);
procedure TrackBar3Change(Sender: TObject);
procedure WeatherComboChange(Sender: TObject);
procedure WeatherHExEditChange(Sender: TObject);
procedure WeatherHExEdit2Change(Sender: TObject);
procedure WaterLevelCheckClick(Sender: TObject);
procedure FogDistanceCheckClick(Sender: TObject);
procedure WeatherCheckClick(Sender: TObject);
procedure FogColorCheckClick(Sender: TObject);
procedure NightVisionHexEdit2Change(Sender: TObject);
procedure NightVisionHexEditChange(Sender: TObject);
procedure NightVisionCheckClick(Sender: TObject);
procedure StartWNvgOnCheckClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
FSettingCheckBoxes : boolean;
procedure CheckedBoxsHexValue;
procedure SetCheckBoxStates(b: byte);
procedure NightCheckedBoxsHexValue;
procedure NightSetCheckBoxStates(b: byte);
function GetCheckBoxByteValue: byte;
function NightGetCheckBoxByteValue: byte;
end;
//-------------------------------------------------
//DFX BMS File Info
//-------------------------------------------------
PBMSHeader5 = ^TBMSHeader5;
TBMSHeader5 = packed record
type_: array[0..2] of Char; //Longint; // 257117506
version: Byte;
name: array[0..31] of Char;
designer: array[0..31] of Char;
terrain: array[0..15] of Char;
cnvFile: array[0..15] of Char;
ttFile: array[0..15] of Char;
{} otherFile: array[0..15] of Char;
terrainColor: Longint;
attributes: Longint; // bitmask or game types
savedAttributes: Longint;
notVisibleIf: Longint;
arty: Longint;
waterLevel: Longint;
fogLevel: Longint;
fogColor: Longint;
loadouts: array[0..4] of array[0..4] of Byte; //3,1,2,4,5
unknown2: array[0..2] of Byte;
itemCount: Longint;
suffix: array[0..11] of Char;
eventCount: Longint;
weatherType: Longint;
goalsWin: array[0..3] of Byte; // 4 win conditions
goalsLose: array[0..3] of Byte; // 4 lose conditions
unknown3: array[0..15] of Byte;
environment: array[0..31] of Char;
wind: array[0..1] of Longint; // 2 vectors
teammates: array[0..1] of Byte; // 2 teammates?
unknown4: array[0..13] of Byte;
briefing: array[0..255] of Char;
end;
//-------------------------------------------------
//DFX BMS File Info End.
//-------------------------------------------------

var
Form1: TForm1;

implementation

{$R *.dfm}

function HexToInt(HexStr: String): Integer;
begin
result := StrToInt('$' + HexStr);
end;

function TForm1.GetCheckBoxByteValue: byte;
begin
result := 0;
if WeatherCheck.Checked then Inc(result, 8);
if FogColorCheck.Checked then Inc(result, 4 );
if FogDistanceCheck.Checked then Inc(result, 2 );
if WaterLevelCheck.Checked then Inc(result, 1 );
end;

function TForm1.NightGetCheckBoxByteValue: byte;
begin
result := 0;
if StartWNVGOnCheck.Checked then Inc(result, 64);
if NightVisionCheck.Checked then Inc(result, 16 );
//if FogDistanceCheck.Checked then Inc(result, 2 );
//if WaterLevelCheck.Checked then Inc(result, 1 );
end;

procedure TForm1.NightSetCheckBoxStates(b: byte);
begin
FSettingCheckBoxes := true;
try
StartWNVGOnCheck.Checked := b >= 64; if b >= 64 then Dec(b, 64);
NightVisionCheck.Checked := b >= 16 ;
finally
FSettingCheckBoxes := false;
end;
end;

procedure TForm1.NightCheckedBoxsHexValue;
var
I, C: Integer;
begin
C:= 0;
for I:= 0 to ComponentCOunt - 1 do
if Components[I] is TCheckBox then
if TCheckBox(Components[I]).Checked then
C:= C + TCheckBox(Components[I]).Tag;
NightVisionHexEdit.text:= inttostr(C);

end;

procedure TForm1.SetCheckBoxStates(b: byte);
begin
FSettingCheckBoxes := true;
try
WeatherCheck.Checked := b >= 8; if b >= 8 then Dec(b, 8);
FogColorCheck.Checked := b >= 4; if b >= 4 then Dec(b, 4);
FogDistanceCheck.Checked := b >= 2; if b >= 2 then Dec(b, 2);
WaterLevelCheck.Checked := b >= 1 ;
finally
FSettingCheckBoxes := false;
end;
end;
For your gaming textures and downloads. Now hosting over 5000 game textures and more uploaded every night. Click the sig.
Image
DR.EVIL~TAG
Mod Depot Staff
 
Posts: 427
Joined: 03-31-2004 03:31 PM

Postby DR.EVIL~TAG » 01-21-2006 01:35 PM

Continued :::


procedure TForm1.CheckedBoxsHexValue;
var
I, C: Integer;
begin
C:= 0;
for I:= 0 to ComponentCOunt - 1 do
if Components[I] is TCheckBox then
if TCheckBox(Components[I]).Checked then
C:= C + TCheckBox(Components[I]).Tag;
CheckBoxsHexValueEdit.text:= inttostr(C);

end;


procedure TForm1.Open1Click(Sender: TObject);
var
fs:TFileStream;
buffer:integer;

begin
if opendialog1.execute then
FileName.Caption := ExtractFileName(OpenDialog1.FileName);

//load values
FS:=TFileStream.create(opendialog1.filename,fmopenreadwrite or fmsharedenynone); begin
fs.position:=HexToInt('98'); //Water Level
fs.read(buffer,1);
WaterLevelEdit.text:=inttostr(buffer);
fs.position:=HexToInt('F6'); //Water Color Red
fs.read(buffer,1);
WaterRedColorEdit.text:=inttostr(buffer);
fs.position:=HexToInt('F7'); //Water Color Green
fs.read(buffer,1);
WaterColorGreenEdit.text:=inttostr(buffer);
fs.position:=HexToInt('F8'); //Water Color Blue
fs.read(buffer,1);
WaterColorBlueEdit.text:=inttostr(buffer);
fs.position:=HexToInt('F9'); //Murk Percentage
fs.read(buffer,1);
MercPercentageEdit.text:=inttostr(buffer);
fs.position:=HexToInt('9E'); //Fog Distance
fs.read(buffer,1);
FogDistanceEdit.text:=inttostr(buffer);
fs.position:=HexToInt('A0'); //Fog Color Red
fs.read(buffer,1);
FogColorRedEdit.text:=inttostr(buffer);
fs.position:=HexToInt('A1'); //Fog Color Green
fs.read(buffer,1);
FogColorGreenEdit.text:=inttostr(buffer);
fs.position:=HexToInt('A2'); //Fog Color Blue
fs.read(buffer,1);
FogColorBlueEdit.text:=inttostr(buffer);
fs.position:=HexToInt('248'); //Start Time
fs.read(buffer,1);
StartTimeHExEdit2.text:=inttostr(buffer);
fs.position:=HexToInt('88'); //All Check Boxs, Water,Fog,Weather,FogColor,
fs.read(buffer,1);
CheckBoxsHexValueEdit.text:=inttostr(buffer);
fs.position:=HexToInt('84'); //Climate
fs.read(buffer,1);
ClimateHexEdit2.text:=inttostr(buffer);
fs.position:=HexToInt('FC'); //Wind Speed
fs.read(buffer,1);
WindSpeedEdit.text:=inttostr(buffer);
fs.position:=HexToInt('B8'); //Weather
fs.read(buffer,1);
WeatherHexEdit2.text:=inttostr(buffer);
fs.position:=HexToInt('8A'); //Night Vision
fs.read(buffer,1);
NightVisionHexEdit.Text:=inttostr(buffer);
fs.free;
end;
End;

procedure TForm1.WaterLevelEditChange(Sender: TObject);
begin
Try
WaterHexLabel.Caption := IntToHex(StrToInt(WaterLevelEdit.text), 2);
Except
{Do Nothing}
End;
End;


procedure TForm1.Button1Click(Sender: TObject);
var
Water: LongWord;
Red, Green, Blue: Byte;

begin
if WaterDialog.Execute then
begin
WaterShape.Brush.Color := WaterDialog.Color;
Water := WaterDialog.Color;

Red := GetRValue(Water);
Green := GetGValue(Water);
Blue := GetBValue(Water);

WaterRedColorEdit.Text := IntToStr(Red);
WaterColorGreenEdit.Text := IntToStr(Green);
WaterColorBlueEdit.Text := IntToStr(Blue);
end;
end;

procedure TForm1.WaterRedColorEditChange(Sender: TObject);
var
red, green, blue: Integer;
begin
Try
WaterRedColorHex.Caption := IntToHex(StrToInt(WaterRedColorEdit.text), 2);
red := StrToInt(WaterRedColorEdit.text);
green := strtoint(WaterColorGreenEdit.text);
blue := strtoint(WaterColorBlueEdit.text);
WaterShape.brush.color := (blue*65536) + (green*256) + red;
Except
{Do Nothing}
End;
End;

procedure TForm1.WaterColorGreenEditChange(Sender: TObject);
var
red, green, blue: Integer;
begin
Try
WaterColorGreenHex.Caption := IntToHex(StrToInt(WaterColorGreenEdit.text), 2);
red := StrToInt(WaterRedColorEdit.text);
green := strtoint(WaterColorGreenEdit.text);
blue := strtoint(WaterColorBlueEdit.text);
WaterShape.brush.color := (blue*65536) + (green*256) + red;
Except
{Do Nothing}
End;
End;

procedure TForm1.WaterColorBlueEditChange(Sender: TObject);
var
red, green, blue: Integer;
begin
Try
WaterColorBlueHex.Caption := IntToHex(StrToInt(WaterColorBlueEdit.text), 2);
red := StrToInt(WaterRedColorEdit.text);
green := strtoint(WaterColorGreenEdit.text);
blue := strtoint(WaterColorBlueEdit.text);
WaterShape.brush.color := (blue*65536) + (green*256) + red;
Except
{Do Nothing}
End;
End;

procedure TForm1.FogDistanceEditChange(Sender: TObject);
begin
Try
FogDistanceHex.Caption := IntToHex(StrToInt(FogDistanceEdit.text), 2);
Except
{Do Nothing}
End;
End;

procedure TForm1.MercPercentageEditChange(Sender: TObject);
begin
Try
MercPercentageHex.Caption := IntToHex(StrToInt(MercPercentageEdit.text), 2);
Except
{Do Nothing}
End;
End;

procedure TForm1.Button2Click(Sender: TObject);
var
Fog: LongWord;
Red, Green, Blue: Byte;

begin
if FogDialog.Execute then
begin
FogShape.Brush.Color := FogDialog.Color;
Fog := FogDialog.Color;

Red := GetRValue(Fog);
Green := GetGValue(Fog);
Blue := GetBValue(Fog);

FogColorRedEdit.Text := IntToStr(Red);
FogColorGreenEdit.Text := IntToStr(Green);
FogColorBlueEdit.Text := IntToStr(Blue);
end;
end;

procedure TForm1.StartTimeComboChange(Sender: TObject);
begin
StartTimeHexEdit.text := Format('%.1d', [StartTimeCombo.ItemIndex + 0]);
if (StartTimeHexEdit.text = '0') then
StartTimeHexEdit2.Text := '0';
if (StartTimeHexEdit.text = '1') then
StartTimeHexEdit2.Text := '40';
if (StartTimeHexEdit.text = '2') then
StartTimeHexEdit2.Text := '80';
end;

procedure TForm1.FogColorRedEditChange(Sender: TObject);
var
red, green, blue: Integer;
begin
Try
FogRedHex.Caption := IntToHex(StrToInt(FogColorRedEdit.text), 2);
red := StrToInt(FogColorRedEdit.text);
green := strtoint(FogColorGreenEdit.text);
blue := strtoint(FogColorBlueEdit.text);
FogShape.brush.color := (blue*65536) + (green*256) + red;
Except
{Do Nothing}
End;
End;

procedure TForm1.FogColorGreenEditChange(Sender: TObject);
var
red, green, blue: Integer;
begin
Try
FogGreenHex.Caption := IntToHex(StrToInt(FogColorGreenEdit.text), 2);
red := StrToInt(FogColorRedEdit.text);
green := strtoint(FogColorGreenEdit.text);
blue := strtoint(FogColorBlueEdit.text);
FogShape.brush.color := (blue*65536) + (green*256) + red;
Except
{Do Nothing}
End;
End;

procedure TForm1.FogColorBlueEditChange(Sender: TObject);
var
red, green, blue: Integer;
begin
Try
FogBlueHex.Caption := IntToHex(StrToInt(FogColorBlueEdit.text), 2);
red := StrToInt(FogColorRedEdit.text);
green := strtoint(FogColorGreenEdit.text);
blue := strtoint(FogColorBlueEdit.text);
FogShape.brush.color := (blue*65536) + (green*256) + red;
Except
{Do Nothing}
End;
End;

procedure TForm1.StartTimeHexEdit2Change(Sender: TObject);
begin
if (StartTimeHexEdit2.Text = '0') then
StartTimeHexEdit.Text := '0'; //00:00
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '128') then
StartTimeHexEdit.Text := '2'; //00:30
if(StartTimeHexEdit2.Text = '192') then
StartTimeHexEdit.Text := '3'; //00:45
if(StartTimeHexEdit2.Text = '256') then
StartTimeHexEdit.Text := '4'; //01:00
if(StartTimeHexEdit2.Text = '320') then
StartTimeHexEdit.Text := '5'; //01:15
if(StartTimeHexEdit2.Text = '384') then
StartTimeHexEdit.Text := '6'; //01:30
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '7'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '8'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '9'; //00:15
if(StartTimeHexEdit2.Text = '64')
//MUST FINISH THE TIME BEFORE RELEASE
//then
StartTimeHexEdit.Text := '10'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '11'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '12'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '13'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '14'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '15'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '16'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '17'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '18'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '19'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '20'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '21'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '22'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '23'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64')
For your gaming textures and downloads. Now hosting over 5000 game textures and more uploaded every night. Click the sig.
Image
DR.EVIL~TAG
Mod Depot Staff
 
Posts: 427
Joined: 03-31-2004 03:31 PM

Postby DR.EVIL~TAG » 01-21-2006 01:36 PM

Continued:::::::::


then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64')
then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64')
then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64')
then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
if(StartTimeHexEdit2.Text = '64') then
StartTimeHexEdit.Text := '1'; //00:15
//TIME ENDS HERE
end;

procedure TForm1.StartTimeHExEditChange(Sender: TObject);
begin
StartTimeCombo.itemindex := strtoint(StartTimeHexEdit.text);
end;

procedure TForm1.CheckBoxsHexValueEditChange(Sender: TObject);
begin
CheckBoxsHexValueEdit2.text := IntToHex(StrToInt(CheckBoxsHexValueEdit.Text), 2);
end;

procedure TForm1.CheckBoxsHexValueEdit2Change(Sender: TObject);
var
newValue, oldValue : integer;
begin
oldValue := GetCheckBoxByteValue;
if CheckBoxsHexValueEdit2.text <> '' then
newValue := StrToIntDef('$' +CheckBoxsHexValueEdit2.text, oldValue)
else
newValue := 0;
if newValue <> oldValue then
SetCheckBoxStates( newValue );
end;
//////Climate starts Here
procedure TForm1.ClimateComboChange(Sender: TObject);
begin
ClimateHexEdit.text := Format('%.1d', [StartTimeCombo.ItemIndex + 0]);
if (ClimateHexEdit.text = '0') then
ClimateHexEdit2.Text := '0';
if (ClimateHexEdit.text = '1') then
ClimateHexEdit2.Text := '1';
if (ClimateHexEdit.text = '2') then
ClimateHexEdit2.Text := '2';
end;

procedure TForm1.ClimateHexEdit2Change(Sender: TObject);
begin
if (ClimateHexEdit2.Text = '0') then
ClimateHexEdit.Text := '0'; //Desert
if(ClimateHexEdit2.Text = '1') then
ClimateHexEdit.Text := '1'; //Jungle
if(ClimateHexEdit2.Text = '2') then
ClimateHexEdit.Text := '2'; //Snow

end;

procedure TForm1.ClimateHexEditChange(Sender: TObject);
begin
ClimateCombo.itemindex := strtoint(ClimateHexEdit.text);
end;
//////Climate Ends Here

//Wind Starts Here
procedure TForm1.WindSpeedEditChange(Sender: TObject);
begin
Try
WindHexLabel.Caption := IntToHex(StrToInt(WindSpeedEdit.text), 2);
trackbar3.position := strtoint(WindSpeedEdit.text);
Except
{Do Nothing}
End;

end;

procedure TForm1.TrackBar3Change(Sender: TObject);
begin
WindSpeedEdit.Text := IntToStr(TrackBar3.Position);
WindHexLabel.Caption:= IntToHex((Trackbar3.Position), 2 );
end;
//Wind Ends Here

///Weather starts here
procedure TForm1.WeatherComboChange(Sender: TObject);
begin
WeatherHexEdit.text := Format('%.1d', [StartTimeCombo.ItemIndex + 0]);
if (WeatherHexEdit.text = '0') then
WeatherHexEdit2.Text := '0';
if (WeatherHexEdit.text = '1') then
WeatherHexEdit2.Text := '1';
if (WeatherHexEdit.text = '2') then
WeatherHexEdit2.Text := '2';
end;

procedure TForm1.WeatherHExEditChange(Sender: TObject);
begin
WeatherCombo.itemindex := strtoint(WeatherHexEdit.text);
end;

procedure TForm1.WeatherHExEdit2Change(Sender: TObject);
begin
if (WeatherHexEdit2.Text = '0') then
WeatherHexEdit.Text := '0'; //Nice Day
if(WeatherHexEdit2.Text = '1') then
WeatherHexEdit.Text := '1'; //Rain
if(WeatherHexEdit2.Text = '2') then
WeatherHexEdit.Text := '2'; //Snow

end;

///Weather Ends here
procedure TForm1.WaterLevelCheckClick(Sender: TObject);
begin
CheckedBoxsHexValue;
end;

procedure TForm1.FogDistanceCheckClick(Sender: TObject);
begin
CheckedBoxsHexValue;
end;

procedure TForm1.WeatherCheckClick(Sender: TObject);
begin
CheckedBoxsHexValue;
end;

procedure TForm1.FogColorCheckClick(Sender: TObject);
begin
CheckedBoxsHexValue;
end;


//Night Vision Starts here

procedure TForm1.NightVisionHexEdit2Change(Sender: TObject);
var
newValue, oldValue : integer;
begin
oldValue := GetCheckBoxByteValue;
if NightVisionHexEdit2.text <> '' then
newValue := StrToIntDef('$' +NightVisionHexEdit2.text, oldValue)
else
newValue := 0;
if newValue <> oldValue then
NightSetCheckBoxStates( newValue );
end;

procedure TForm1.NightVisionHexEditChange(Sender: TObject);
begin
NightVisionHexEdit2.text := IntToHex(StrToInt(NightVisionHexEdit.Text), 2);
end;

procedure TForm1.NightVisionCheckClick(Sender: TObject);
begin
NightCheckedBoxsHexValue;
if (NightVisionCheck.Checked) then
StartWNVGonCheck.Enabled := True
end;

procedure TForm1.StartWNvgOnCheckClick(Sender: TObject);
begin
NightCheckedBoxsHexValue;
if (Not StartWNVGonCheck.Checked) then
StartWNVGonCheck.Enabled := False
end;

//Night Vision Ends here

end.[/QUOTE]

Image
For your gaming textures and downloads. Now hosting over 5000 game textures and more uploaded every night. Click the sig.
Image
DR.EVIL~TAG
Mod Depot Staff
 
Posts: 427
Joined: 03-31-2004 03:31 PM

Postby Eagle Eye » 01-31-2006 03:08 AM

So Evil..does this mean your closer to a bms to mis converter mate..(he says hopefully..)

EE
Image
User avatar
Eagle Eye
Moderator
 
Posts: 164
Joined: 02-11-2004 08:40 PM

Postby DR.EVIL~TAG » 01-31-2006 05:21 AM

Yes mate a bit closer, Still working on the arrays and things like that along with still learning the whole process, In between working on ROE and Texturing.
For your gaming textures and downloads. Now hosting over 5000 game textures and more uploaded every night. Click the sig.
Image
DR.EVIL~TAG
Mod Depot Staff
 
Posts: 427
Joined: 03-31-2004 03:31 PM

Postby Black Ice » 01-31-2006 04:55 PM

out of curiousity what programming language is this??? i understand almost none of it except for maybe the one line of VB in there... that's the only programming language i can use... sort of. with BHD maps and making some useless programs, anyway :)
Image
User avatar
Black Ice
loa fan!
 
Posts: 558
Joined: 05-13-2005 03:49 PM

Postby DR.EVIL~TAG » 01-31-2006 05:25 PM

Delphi 6 mate.
For your gaming textures and downloads. Now hosting over 5000 game textures and more uploaded every night. Click the sig.
Image
DR.EVIL~TAG
Mod Depot Staff
 
Posts: 427
Joined: 03-31-2004 03:31 PM

Postby A.bullet » 02-01-2006 08:37 PM

Hmm.. seems kind of .. umm.. familiar.. LOL
Admin Mod Depot
Owner / Admin DFBarracks.com
User avatar
A.bullet
Admin
 
Posts: 107
Joined: 02-09-2004 02:37 AM

Postby DR.EVIL~TAG » 02-03-2006 03:42 PM

Yep the selection below should look familuar, It has no bearing on the code here lol for got to take it out as i never got the arrays to work with it.

PBMSHeader5 = ^TBMSHeader5;
TBMSHeader5 = packed record
type_: array[0..2] of Char; //Longint; // 257117506
version: Byte;
name: array[0..31] of Char;
designer: array[0..31] of Char;
terrain: array[0..15] of Char;
cnvFile: array[0..15] of Char;
ttFile: array[0..15] of Char;
{} otherFile: array[0..15] of Char;
terrainColor: Longint;
attributes: Longint; // bitmask or game types
savedAttributes: Longint;
notVisibleIf: Longint;
arty: Longint;
waterLevel: Longint;
fogLevel: Longint;
fogColor: Longint;
loadouts: array[0..4] of array[0..4] of Byte; //3,1,2,4,5
unknown2: array[0..2] of Byte;
itemCount: Longint;
suffix: array[0..11] of Char;
eventCount: Longint;
weatherType: Longint;
goalsWin: array[0..3] of Byte; // 4 win conditions
goalsLose: array[0..3] of Byte; // 4 lose conditions
unknown3: array[0..15] of Byte;
environment: array[0..31] of Char;
wind: array[0..1] of Longint; // 2 vectors
teammates: array[0..1] of Byte; // 2 teammates?
unknown4: array[0..13] of Byte;
briefing: array[0..255] of Char;
end;
For your gaming textures and downloads. Now hosting over 5000 game textures and more uploaded every night. Click the sig.
Image
DR.EVIL~TAG
Mod Depot Staff
 
Posts: 427
Joined: 03-31-2004 03:31 PM


Return to Coders Hell

Who is online

Users browsing this forum: No registered users and 1 guest

cron