From 2f3aeb2c37136463c73a1df65797d7996b6f6034 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 1 Oct 2005 02:23:59 +0000 Subject: Changed to using Doubles --- level.bmx | 62 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'level.bmx') diff --git a/level.bmx b/level.bmx index c7e3e4b..b86c33a 100644 --- a/level.bmx +++ b/level.bmx @@ -28,9 +28,9 @@ End Type Type TGravPoint Field repel:Int Field friendly:Int - Field x:Float - Field y:Float - Field mass:Float + Field x:Double + Field y:Double + Field mass:Double Method CreateMass:TMass() Local m:TMass=New TMass @@ -54,30 +54,30 @@ Type TGravPoint Local o:TGravPoint=New TGravPoint o.repel=s.ReadInt() o.friendly=s.ReadInt() - o.x=s.ReadFloat() - o.y=s.ReadFloat() - o.mass=s.ReadFloat() + o.x=s.ReadDouble() + o.y=s.ReadDouble() + o.mass=s.ReadDouble() Return o End Function Method ToStream(s:TStream) s.WriteInt(repel) s.WriteInt(friendly) - s.WriteFloat(x) - s.WriteFloat(y) - s.WriteFloat(mass) + s.WriteDouble(x) + s.WriteDouble(y) + s.WriteDouble(mass) End Method End Type Type TPointLine - Field x1:Float - Field y1:Float - Field x2:Float - Field y2:Float + Field x1:Double + Field y1:Double + Field x2:Double + Field y2:Double Field gap:Int Field v:TVector Field circle:Int - Field circvel:Float + Field circvel:Double Method New() v=TVector.Create() @@ -124,28 +124,28 @@ Type TPointLine Function FromStream:TPointLine(s:TStream) Local o:TPointLine=New TPointLine - o.x1=s.ReadFloat() - o.y1=s.ReadFloat() - o.x2=s.ReadFloat() - o.y2=s.ReadFloat() + o.x1=s.ReadDouble() + o.y1=s.ReadDouble() + o.x2=s.ReadDouble() + o.y2=s.ReadDouble() o.gap=s.ReadInt() - o.v.x=s.ReadFloat() - o.v.y=s.ReadFloat() + o.v.x=s.ReadDouble() + o.v.y=s.ReadDouble() o.circle=s.ReadInt() - o.circvel=s.ReadFloat() + o.circvel=s.ReadDouble() Return o End Function Method ToStream(s:TStream) - s.WriteFloat(x1) - s.WriteFloat(y1) - s.WriteFloat(x2) - s.WriteFloat(y2) + s.WriteDouble(x1) + s.WriteDouble(y1) + s.WriteDouble(x2) + s.WriteDouble(y2) s.WriteInt(gap) - s.WriteFloat(v.x) - s.WriteFloat(v.y) + s.WriteDouble(v.x) + s.WriteDouble(v.y) s.WriteInt(circle) - s.WriteFloat(circvel) + s.WriteDouble(circvel) End Method End Type @@ -157,7 +157,7 @@ Type TLevel Field winpercent:Int Field timer:Int Field invmass:Int - Field placemass:Float + Field placemass:Double Field placefriend:Int Method New() @@ -190,7 +190,7 @@ Type TLevel o.winpercent=s.ReadInt() o.timer=s.ReadInt() o.invmass=s.ReadInt() - o.placemass=s.ReadFloat() + o.placemass=s.ReadDouble() o.placefriend=s.ReadInt() c=s.ReadInt() @@ -212,7 +212,7 @@ Type TLevel s.WriteInt(winpercent) s.WriteInt(timer) s.WriteInt(invmass) - s.WriteFloat(placemass) + s.WriteDouble(placemass) s.WriteInt(placefriend) s.WriteInt(grav.Count()) -- cgit v1.2.3