summaryrefslogtreecommitdiff
path: root/level.bmx
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-10-01 02:23:59 +0000
committerIan C <ianc@noddybox.co.uk>2005-10-01 02:23:59 +0000
commit2f3aeb2c37136463c73a1df65797d7996b6f6034 (patch)
tree726c95935e86d6399e6e2f52d409c690668bbe9c /level.bmx
parent6888ab61c3a894c77c1678fe7cb441a948a87dd8 (diff)
Changed to using Doubles
Diffstat (limited to 'level.bmx')
-rw-r--r--level.bmx62
1 files changed, 31 insertions, 31 deletions
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())