소스 검색

Updated modules to SuperStrict.

woollybah 9 년 전
부모
커밋
1ea6720e02
6개의 변경된 파일187개의 추가작업 그리고 175개의 파일을 삭제
  1. 73 71
      event.mod/event.bmx
  2. 19 17
      eventqueue.mod/eventqueue.bmx
  3. 43 41
      filesystem.mod/filesystem.bmx
  4. 15 13
      font.mod/font.bmx
  5. 25 23
      freetypefont.mod/freetypefont.bmx
  6. 12 10
      random.mod/random.bmx

+ 73 - 71
event.mod/event.bmx

@@ -1,17 +1,19 @@
 
-Strict
+SuperStrict
 
 Rem
 bbdoc: Events/Events
 End Rem
 Module BRL.Event
 
-ModuleInfo "Version: 1.05"
+ModuleInfo "Version: 1.06"
 ModuleInfo "Author: Mark Sibly, Bruce A Henderson"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: Blitz Research Ltd"
 ModuleInfo "Modserver: BRL"
 
+ModuleInfo "History: 1.06"
+ModuleInfo "History: Module is now SuperStrict"
 ModuleInfo "History: 1.05"
 ModuleInfo "History: Added EVENT_MULTIGESTURE."
 ModuleInfo "History: 1.04"
@@ -47,7 +49,7 @@ The #EmitEventHook global variable contains a hook id for use with #AddHook.
 Each time #EmitEvent is called, the event is passed to all #EmitEventHook 
 hook functions by means of the hook function @data parameter.
 End Rem
-Global EmitEventHook=AllocHookId()
+Global EmitEventHook:Int=AllocHookId()
 
 Rem
 bbdoc: Event object type
@@ -57,7 +59,7 @@ Type TEvent
 	Rem
 	bbdoc: Event identifier
 	End Rem
-	Field id
+	Field id:Int
 	
 	Rem
 	bbdoc: Event source object
@@ -67,22 +69,22 @@ Type TEvent
 	Rem
 	bbdoc: Event specific data
 	End Rem
-	Field data
+	Field data:Int
 	
 	Rem
 	bbdoc: Event specific modifiers
 	End Rem
-	Field mods
+	Field mods:Int
 	
 	Rem
 	bbdoc: Event specific position data
 	End Rem
-	Field x
+	Field x:Int
 	
 	Rem
 	bbdoc: Event specific position data
 	End Rem
-	Field y
+	Field y:Int
 	
 	Rem
 	bbdoc: Event specific extra information
@@ -131,7 +133,7 @@ Type TEvent
 	bbdoc: Create an event object
 	returns: A new event object
 	End Rem
-	Function Create:TEvent( id,source:Object=Null,data=0,mods=0,x=0,y=0,extra:Object=Null,usePool:Int = True )
+	Function Create:TEvent( id:Int,source:Object=Null,data:Int=0,mods:Int=0,x:Int=0,y:Int=0,extra:Object=Null,usePool:Int = True )
 		Local t:TEvent
 ?threaded
 		_eventLock.Lock()
@@ -159,23 +161,23 @@ Type TEvent
 	bbdoc: Allocate a user event id
 	returns: A new user event id
 	End Rem
-	Function AllocUserId()
-		Global _id=EVENT_USEREVENTMASK
+	Function AllocUserId:Int()
+		Global _id:Int=EVENT_USEREVENTMASK
 		_id:+1
 		Return _id
 	End Function
 	
-	Function RegisterId( id,description$ )
+	Function RegisterId( id:Int,description$ )
 		_regids:+String(id)+"{"+description+"}"
 	End Function
 	
-	Function DescriptionForId$( id )
+	Function DescriptionForId$( id:Int )
 		Local t$="}"+String(id)+"{"
-		Local i=_regids.Find( t )
-		If i=-1 Return
+		Local i:Int=_regids.Find( t )
+		If i=-1 Return Null
 		i:+t.length
-		Local i2=_regids.Find( "}",i )
-		If i2=-1 Return
+		Local i2:Int=_regids.Find( "}",i )
+		If i2=-1 Return Null
 		Return _regids[i..i2]
 	End Function
 
@@ -183,57 +185,57 @@ Type TEvent
 	
 End Type
 
-Const EVENT_APPMASK=$100
-Const EVENT_APPSUSPEND=$101
-Const EVENT_APPRESUME=$102
-Const EVENT_APPTERMINATE=$103
-Const EVENT_APPOPENFILE=$104
-Const EVENT_APPIDLE=$105		'Reserved by Mark!
-Const EVENT_KEYMASK=$200
-Const EVENT_KEYDOWN=$201
-Const EVENT_KEYUP=$202
-Const EVENT_KEYCHAR=$203
-Const EVENT_KEYREPEAT=$204
-Const EVENT_MOUSEMASK=$400
-Const EVENT_MOUSEDOWN=$401
-Const EVENT_MOUSEUP=$402
-Const EVENT_MOUSEMOVE=$403
-Const EVENT_MOUSEWHEEL=$404
-Const EVENT_MOUSEENTER=$405
-Const EVENT_MOUSELEAVE=$406
-Const EVENT_TIMERMASK=$800
-Const EVENT_TIMERTICK=$801
-Const EVENT_HOTKEYMASK=$1000
-Const EVENT_HOTKEYHIT=$1001
-Const EVENT_GADGETMASK=$2000
-Const EVENT_GADGETACTION=$2001
-Const EVENT_GADGETPAINT=$2002
-Const EVENT_GADGETSELECT=$2003
-Const EVENT_GADGETMENU=$2004
-Const EVENT_GADGETOPEN=$2005
-Const EVENT_GADGETCLOSE=$2006
-Const EVENT_GADGETDONE=$2007
-Const EVENT_GADGETLOSTFOCUS=$2008
-Const EVENT_GADGETSHAPE=$2009	'reserved by Mark!
-Const EVENT_WINDOWMASK=$4000
-Const EVENT_WINDOWMOVE=$4001
-Const EVENT_WINDOWSIZE=$4002
-Const EVENT_WINDOWCLOSE=$4003
-Const EVENT_WINDOWACTIVATE=$4004
-Const EVENT_WINDOWACCEPT=$4005
-Const EVENT_MENUMASK=$8000
-Const EVENT_MENUACTION=$8001
-Const EVENT_STREAMMASK=$10000
-Const EVENT_STREAMEOF=$10001
-Const EVENT_STREAMAVAIL=$10002
-Const EVENT_PROCESSMASK=$20000
-Const EVENT_PROCESSEXIT=$20001
-Const EVENT_TOUCHMASK=$40000
-Const EVENT_TOUCHDOWN=$40001
-Const EVENT_TOUCHUP=$40002
-Const EVENT_TOUCHMOVE=$40003
-Const EVENT_MULTIGESTURE=$80000
-Const EVENT_USEREVENTMASK=$80000000
+Const EVENT_APPMASK:Int=$100
+Const EVENT_APPSUSPEND:Int=$101
+Const EVENT_APPRESUME:Int=$102
+Const EVENT_APPTERMINATE:Int=$103
+Const EVENT_APPOPENFILE:Int=$104
+Const EVENT_APPIDLE:Int=$105		'Reserved by Mark!
+Const EVENT_KEYMASK:Int=$200
+Const EVENT_KEYDOWN:Int=$201
+Const EVENT_KEYUP:Int=$202
+Const EVENT_KEYCHAR:Int=$203
+Const EVENT_KEYREPEAT:Int=$204
+Const EVENT_MOUSEMASK:Int=$400
+Const EVENT_MOUSEDOWN:Int=$401
+Const EVENT_MOUSEUP:Int=$402
+Const EVENT_MOUSEMOVE:Int=$403
+Const EVENT_MOUSEWHEEL:Int=$404
+Const EVENT_MOUSEENTER:Int=$405
+Const EVENT_MOUSELEAVE:Int=$406
+Const EVENT_TIMERMASK:Int=$800
+Const EVENT_TIMERTICK:Int=$801
+Const EVENT_HOTKEYMASK:Int=$1000
+Const EVENT_HOTKEYHIT:Int=$1001
+Const EVENT_GADGETMASK:Int=$2000
+Const EVENT_GADGETACTION:Int=$2001
+Const EVENT_GADGETPAINT:Int=$2002
+Const EVENT_GADGETSELECT:Int=$2003
+Const EVENT_GADGETMENU:Int=$2004
+Const EVENT_GADGETOPEN:Int=$2005
+Const EVENT_GADGETCLOSE:Int=$2006
+Const EVENT_GADGETDONE:Int=$2007
+Const EVENT_GADGETLOSTFOCUS:Int=$2008
+Const EVENT_GADGETSHAPE:Int=$2009	'reserved by Mark!
+Const EVENT_WINDOWMASK:Int=$4000
+Const EVENT_WINDOWMOVE:Int=$4001
+Const EVENT_WINDOWSIZE:Int=$4002
+Const EVENT_WINDOWCLOSE:Int=$4003
+Const EVENT_WINDOWACTIVATE:Int=$4004
+Const EVENT_WINDOWACCEPT:Int=$4005
+Const EVENT_MENUMASK:Int=$8000
+Const EVENT_MENUACTION:Int=$8001
+Const EVENT_STREAMMASK:Int=$10000
+Const EVENT_STREAMEOF:Int=$10001
+Const EVENT_STREAMAVAIL:Int=$10002
+Const EVENT_PROCESSMASK:Int=$20000
+Const EVENT_PROCESSEXIT:Int=$20001
+Const EVENT_TOUCHMASK:Int=$40000
+Const EVENT_TOUCHDOWN:Int=$40001
+Const EVENT_TOUCHUP:Int=$40002
+Const EVENT_TOUCHMOVE:Int=$40003
+Const EVENT_MULTIGESTURE:Int=$80000
+Const EVENT_USEREVENTMASK:Int=$80000000
 
 TEvent.RegisterId EVENT_APPSUSPEND,"AppSuspend"
 TEvent.RegisterId EVENT_APPRESUME,"AppResume"
@@ -288,7 +290,7 @@ Rem
 bbdoc: Create an event object
 returns: A new event object
 End Rem
-Function CreateEvent:TEvent( id,source:Object=Null,data=0,mods=0,x=0,y=0,extra:Object=Null,usePool:Int = True )
+Function CreateEvent:TEvent( id:Int,source:Object=Null,data:Int=0,mods:Int=0,x:Int=0,y:Int=0,extra:Object=Null,usePool:Int = True )
 	Return TEvent.Create( id,source,data,mods,x,y,extra,usePool )
 End Function
 
@@ -296,8 +298,8 @@ Rem
 bbdoc: Allocate a user event id
 returns: A new user event id
 End Rem
-Function AllocUserEventId( description$="" )
-	Local id=TEvent.AllocUserId()
+Function AllocUserEventId:Int( description$="" )
+	Local id:Int=TEvent.AllocUserId()
 	If description TEvent.RegisterId id,description
 	Return id
 End Function

+ 19 - 17
eventqueue.mod/eventqueue.bmx

@@ -1,17 +1,19 @@
 
-Strict
+SuperStrict
 
 Rem
 bbdoc: Events/Event queue
 End Rem
 Module BRL.EventQueue
 
-ModuleInfo "Version: 1.02"
+ModuleInfo "Version: 1.03"
 ModuleInfo "Author: Mark Sibly, Bruce A Henderson"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: Blitz Research Ltd"
 ModuleInfo "Modserver: BRL"
 
+ModuleInfo "History: 1.03"
+ModuleInfo "History: Module is now SuperStrict"
 ModuleInfo "History: 1.02"
 ModuleInfo "History: Reuse TEvent objects."
 ModuleInfo "History: 1.01 Release"
@@ -24,13 +26,13 @@ Import BRL.System
 
 Private
 
-Const QUEUESIZE=256
-Const QUEUEMASK=QUEUESIZE-1
-Global queue:TEvent[QUEUESIZE],queue_put,queue_get
+Const QUEUESIZE:Int=256
+Const QUEUEMASK:Int=QUEUESIZE-1
+Global queue:TEvent[QUEUESIZE],queue_put:Int,queue_get:Int
 
-Function Hook:Object( id,data:Object,context:Object )
+Function Hook:Object( id:Int,data:Object,context:Object )
 	Local ev:TEvent=TEvent( data )
-	If Not ev Return
+	If Not ev Return Null
 	
 	Select ev.id
 	Case EVENT_WINDOWMOVE,EVENT_WINDOWSIZE,EVENT_TIMERTICK,EVENT_GADGETACTION
@@ -80,7 +82,7 @@ global variable.
 
 If there are no events in the event queue, #PollEvent returns 0.
 End Rem
-Function PollEvent()
+Function PollEvent:Int()
 	If queue_get=queue_put
 		PollSystem
 		If queue_get=queue_put
@@ -103,7 +105,7 @@ global variable.
 If there are no events in the event queue, #WaitEvent halts program execution until
 an event is available.
 End Rem
-Function WaitEvent()
+Function WaitEvent:Int()
 	While queue_get=queue_put
 		WaitSystem
 	Wend
@@ -122,9 +124,9 @@ queue, the existing event will be updated instead of @event
 being added to the event queue. This can be useful to prevent high frequency
 events such as timer events from flooding the event queue.
 End Rem
-Function PostEvent( event:TEvent,update=False )
+Function PostEvent( event:TEvent,update:Int=False )
 	If update
-		Local i=queue_get
+		Local i:Int=queue_get
 		While i<>queue_put
 			Local t:TEvent=queue[i & QUEUEMASK ]
 			If t.id=event.id And t.source=event.source
@@ -158,7 +160,7 @@ Rem
 bbdoc: Get current event id
 returns: The @id field of the #CurrentEvent global variable
 EndRem
-Function EventID()
+Function EventID:Int()
 	Return CurrentEvent.id
 End Function
 
@@ -166,7 +168,7 @@ Rem
 bbdoc: Get current event data
 returns: The @data field of the #CurrentEvent global variable
 EndRem
-Function EventData()
+Function EventData:Int()
 	Return CurrentEvent.data
 End Function
 
@@ -174,7 +176,7 @@ Rem
 bbdoc: Get current event modifiers
 returns: The @mods field of the #CurrentEvent global variable
 EndRem
-Function EventMods()
+Function EventMods:Int()
 	Return CurrentEvent.mods
 End Function
 
@@ -182,7 +184,7 @@ Rem
 bbdoc: Get current event x value
 returns: The @x field of the #CurrentEvent global variable
 EndRem
-Function EventX()
+Function EventX:Int()
 	Return CurrentEvent.x
 End Function
 
@@ -190,7 +192,7 @@ Rem
 bbdoc: Get current event y value
 returns: The @y field of the #CurrentEvent global variable
 EndRem
-Function EventY()
+Function EventY:Int()
 	Return CurrentEvent.y
 End Function
 
@@ -222,6 +224,6 @@ Rem
 bbdoc: Get current event source object handle
 returns: The @source field of the #CurrentEvent global variable converted to an integer handle
 EndRem
-Function EventSourceHandle()
+Function EventSourceHandle:Size_T()
 	Return HandleFromObject( CurrentEvent.source )
 End Function

+ 43 - 41
filesystem.mod/filesystem.bmx

@@ -1,17 +1,19 @@
 
-Strict
+SuperStrict
 
 Rem
 bbdoc: System/File system
 End Rem
 Module BRL.FileSystem
 
-ModuleInfo "Version: 1.09"
+ModuleInfo "Version: 1.10"
 ModuleInfo "Author: Mark Sibly"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: Blitz Research Ltd"
 ModuleInfo "Modserver: BRL"
 
+ModuleInfo "History: 1.10"
+ModuleInfo "History: Module is now SuperStrict"
 ModuleInfo "History: 1.09 Release"
 ModuleInfo "History: Fixed RealPath breaking win32 //server paths"
 ModuleInfo "History: 1.08 Release"
@@ -28,7 +30,7 @@ ModuleInfo "History: Added optional resurse parameter to CreateDir"
 Import Pub.StdC
 Import BRL.BankStream
 
-Const FILETYPE_NONE=0,FILETYPE_FILE=1,FILETYPE_DIR=2
+Const FILETYPE_NONE:Int=0,FILETYPE_FILE:Int=1,FILETYPE_DIR:Int=2
 
 Private
 
@@ -37,39 +39,39 @@ Function _RootPath$( path$ )
 	If path.StartsWith( "//" )
 		Return path[ ..path.Find( "/",2 )+1 ]
 	EndIf
-	Local i=path.Find( ":" )
+	Local i:Int=path.Find( ":" )
 	If i<>-1 And path.Find( "/" )=i+1 Return path[..i+2]
 ?
 	If path.StartsWith( "/" ) Return "/"
 End Function
 
-Function _IsRootPath( path$ )
+Function _IsRootPath:Int( path$ )
 	Return path And _RootPath( path )=path
 End Function
 
-Function _IsRealPath( path$ )
+Function _IsRealPath:Int( path$ )
 	Return _RootPath( path )<>""
 End Function
 
 ?Win32
 Function _CurrentDrive$()
 	Local cd$=getcwd_()
-	Local i=cd.Find( ":" )
+	Local i:Int=cd.Find( ":" )
 	If i<>-1 Return cd[..i]
 End Function
 ?
 
 Public
 
-Function FixPath( path$ Var,dirPath=False )
+Function FixPath( path$ Var,dirPath:Int=False )
 	path=path.Replace("\","/")
 ?Win32
 	If path.StartsWith( "//" )
 		If path.Find( "/",2 )=-1 path:+"/"
 	Else
-		Local i=path.Find( ":" )
+		Local i:Int=path.Find( ":" )
 		If i<>-1 And ( i=path.length-1 Or path[i+1]<>Asc(":") )
-			Local i2=path.Find( "/" )
+			Local i2:Int=path.Find( "/" )
 			If i2=-1 Or i2>i+1 path=path[..i+1]+"/"+path[i+1..]
 		EndIf
 	EndIf
@@ -85,7 +87,7 @@ bbdoc: Strip directory from a file path
 End Rem
 Function StripDir$( path$ )
 	FixPath path
-	Local i=path.FindLast( "/" )
+	Local i:Int=path.FindLast( "/" )
 	If i<>-1 Return path[i+1..]
 	Return path
 End Function
@@ -95,7 +97,7 @@ bbdoc: Strip extension from a file path
 End Rem
 Function StripExt$( path$ )
 	FixPath path
-	Local i=path.FindLast( "." )
+	Local i:Int=path.FindLast( "." )
 	If i<>-1 And path.Find( "/",i+1 )=-1 Return path[..i]
 	Return path
 End Function
@@ -126,7 +128,7 @@ Function ExtractDir$( path$ )
 	FixPath path
 	If path="." Or path=".." Or _IsRootPath( path ) Return path
 
-	Local i=path.FindLast( "/" )
+	Local i:Int=path.FindLast( "/" )
 	If i=-1 Return ""
 	
 	If _IsRootPath( path[..i+1] ) i:+1
@@ -138,7 +140,7 @@ bbdoc: Extract extension from a file path
 End Rem
 Function ExtractExt$( path$ )
 	FixPath path
-	Local i=path.FindLast( "." )
+	Local i:Int=path.FindLast( "." )
 	If i<>-1 And path.Find( "/",i+1 )=-1 Return path[i+1..]
 End Function
 
@@ -172,7 +174,7 @@ Function RealPath$( path$ )
 	
 	path:+"/"
 	While path
-		Local i=path.Find( "/" )
+		Local i:Int=path.Find( "/" )
 		Local t$=path[..i]
 		path=path[i+1..]
 		Select t
@@ -193,9 +195,9 @@ Rem
 bbdoc: Get file type
 returns: 0 if file at @path doesn't exist, FILETYPE_FILE (1) if the file is a plain file or FILETYPE_DIR (2) if the file is a directory
 End Rem
-Function FileType( path$ )
+Function FileType:Int( path$ )
 	FixPath path
-	Local Mode,size:Long,mtime,ctime
+	Local Mode:Int,size:Long,mtime:Int,ctime:Int
 	If stat_( path,Mode,size,mtime,ctime ) Return 0
 	Select Mode & S_IFMT_
 	Case S_IFREG_ Return FILETYPE_FILE
@@ -208,9 +210,9 @@ Rem
 bbdoc: Get file time
 returns: The time the file at @path was last modified 
 End Rem
-Function FileTime( path$ )
+Function FileTime:Int( path$ )
 	FixPath path
-	Local Mode,size:Long,mtime,ctime
+	Local Mode:Int,size:Long,mtime:Int,ctime:Int
 	If stat_( path,Mode,size,mtime,ctime ) Return 0
 	Return mtime
 End Function
@@ -221,7 +223,7 @@ returns: Size, in bytes, of the file at @path, or -1 if the file does not exist
 end rem
 Function FileSize:Long( path$ )
 	FixPath path
-	Local Mode,size:Long,mtime,ctime
+	Local Mode:Int,size:Long,mtime:Int,ctime:Int
 	If stat_( path,Mode,size,mtime,ctime ) Return -1
 	Return size
 End Function
@@ -230,9 +232,9 @@ Rem
 bbdoc: Get file mode
 returns: file mode flags
 end rem
-Function FileMode( path$ )
+Function FileMode:Int( path$ )
 	FixPath path
-	Local Mode,size:Long,mtime,ctime
+	Local Mode:Int,size:Long,mtime:Int,ctime:Int
 	If stat_( path,Mode,size,mtime,ctime ) Return -1
 	Return Mode & 511
 End Function
@@ -240,7 +242,7 @@ End Function
 Rem
 bbdoc: Set file mode
 end rem
-Function SetFileMode( path$,Mode )
+Function SetFileMode( path$,Mode:Int )
 	FixPath path
 	chmod_ path,Mode
 End Function
@@ -249,7 +251,7 @@ Rem
 bbdoc: Create a file
 returns: True if successful
 End Rem
-Function CreateFile( path$ )
+Function CreateFile:Int( path$ )
 	FixPath path
 	remove_ path
 	Local t:Byte Ptr=fopen_( path,"wb" )
@@ -263,7 +265,7 @@ returns: True if successful
 about:
 If @recurse is true, any required subdirectories are also created.
 End Rem
-Function CreateDir( path$,recurse=False )
+Function CreateDir:Int( path$,recurse:Int=False )
 	FixPath path,True
 	If Not recurse
 		mkdir_ path,1023
@@ -272,7 +274,7 @@ Function CreateDir( path$,recurse=False )
 	Local t$
 	path=RealPath(path)+"/"
 	While path
-		Local i=path.find("/")+1
+		Local i:Int=path.find("/")+1
 		t:+path[..i]
 		path=path[i..]
 		Select FileType(t)
@@ -292,7 +294,7 @@ Rem
 bbdoc: Delete a file
 returns: True if successful
 End Rem
-Function DeleteFile( path$ )
+Function DeleteFile:Int( path$ )
 	FixPath path
 	remove_ path
 	Return FileType(path)=FILETYPE_NONE
@@ -302,7 +304,7 @@ Rem
 bbdoc: Renames a file
 returns: True if successful
 End Rem
-Function RenameFile( oldpath$,newpath$ )
+Function RenameFile:Int( oldpath$,newpath$ )
 	FixPath oldpath
 	FixPath newpath
 	Return rename_( oldpath,newpath)=0
@@ -312,8 +314,8 @@ Rem
 bbdoc: Copy a file
 returns: True if successful
 End Rem
-Function CopyFile( src$,dst$ )
-	Local in:TStream=ReadStream( src ),ok
+Function CopyFile:Int( src$,dst$ )
+	Local in:TStream=ReadStream( src ),ok:Int
 	If in
 		Local out:TStream=WriteStream( dst )
 		If out
@@ -333,9 +335,9 @@ Rem
 bbdoc: Copy a directory
 returns: True if successful
 End Rem
-Function CopyDir( src$,dst$ )
+Function CopyDir:Int( src$,dst$ )
 
-	Function CopyDir_( src$,dst$ )
+	Function CopyDir_:Int( src$,dst$ )
 		If FileType( dst )=FILETYPE_NONE CreateDir dst
 		If FileType( dst )<>FILETYPE_DIR Return False
 		For Local file$=EachIn LoadDir( src )
@@ -364,11 +366,11 @@ returns: True if successful
 about: Set @recurse to true to delete all subdirectories and files recursively - 
 but be careful!
 End Rem
-Function DeleteDir( path$,recurse=False )
+Function DeleteDir:Int( path$,recurse:Int=False )
 	FixPath path,True
 	If recurse
 		Local dir:Byte Ptr=ReadDir( path )
-		If Not dir Return
+		If Not dir Return False
 		Repeat
 			Local t$=NextFile( dir )
 			If t="" Exit
@@ -389,7 +391,7 @@ Rem
 bbdoc: Change current directory
 returns: True if successful
 End Rem
-Function ChangeDir( path$ )
+Function ChangeDir:Int( path$ )
 	FixPath path,True
 	If chdir_( path )=0 Return True
 End Function
@@ -424,11 +426,11 @@ returns: A string array containing contents of @dir
 about: The @skip_dots parameter, if true, removes the '.' (current) and '..'
 (parent) directories from the returned array.
 end rem
-Function LoadDir$[]( dir$,skip_dots=True )
+Function LoadDir$[]( dir$,skip_dots:Int=True )
 	FixPath dir,True
 	Local d:Byte Ptr=ReadDir( dir )
-	If Not d Return
-	Local i$[100],n
+	If Not d Return Null
+	Local i$[100],n:Int
 	Repeat
 		Local f$=NextFile( d )
 		If Not f Exit
@@ -449,15 +451,15 @@ to cache the contents of the file to ensure serial streams such as
 http: based url's are seekable. Use the #CloseStream command when
 finished reading and or writing to a Stream returned by #OpenFile.
 End Rem
-Function OpenFile:TStream( url:Object,readable=True,writeable=True )
+Function OpenFile:TStream( url:Object,readable:Int=True,writeable:Int=True )
 	Local stream:TStream=OpenStream( url,readable,writeable )
-	If Not stream Return
+	If Not stream Return Null
 	If stream.Pos()=-1 Return TBankStream.Create( TBank.Load(stream) )
 	Return stream
 End Function
 
 Rem
-bbdoc: Open a file for input.
+bbdoc: Open a file For Input.
 about:
 This command is similar to the #ReadStream command but will attempt
 to cache the contents of the file to ensure serial streams such as 

+ 15 - 13
font.mod/font.bmx

@@ -1,44 +1,46 @@
 
-Strict
+SuperStrict
 
 Module BRL.Font
 
-ModuleInfo "Version: 1.05"
+ModuleInfo "Version: 1.06"
 ModuleInfo "Author: Mark Sibly"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: Blitz Research Ltd"
 ModuleInfo "Modserver: BRL"
 
+ModuleInfo "History: 1.06"
+ModuleInfo "History: Module is now SuperStrict"
 ModuleInfo "History: 1.05 Release"
 ModuleInfo "History: Modified interface for improved unicode support"
 
-Const BOLDFONT=1
-Const ITALICFONT=2
-Const SMOOTHFONT=4
+Const BOLDFONT:Int=1
+Const ITALICFONT:Int=2
+Const SMOOTHFONT:Int=4
 
 Type TGlyph
 	
 	Method Pixels:Object() Abstract
 
 	Method Advance#() Abstract
-	Method GetRect( x Var,y Var,width Var,height Var ) Abstract
+	Method GetRect( x:Int Var,y:Int Var,width:Int Var,height:Int Var ) Abstract
 
 End Type
 
 Type TFont
 
-	Method Style() Abstract
-	Method Height() Abstract
-	Method CountGlyphs() Abstract
-	Method CharToGlyph( char ) Abstract
-	Method LoadGlyph:TGlyph( index ) Abstract
+	Method Style:Int() Abstract
+	Method Height:Int() Abstract
+	Method CountGlyphs:Int() Abstract
+	Method CharToGlyph:Int( char:Int ) Abstract
+	Method LoadGlyph:TGlyph( index:Int ) Abstract
 
 End Type
 
 Type TFontLoader
 	Field _succ:TFontLoader
 
-	Method LoadFont:TFont( url:Object,size,style ) Abstract
+	Method LoadFont:TFont( url:Object,size:Int,style:Int ) Abstract
 
 End Type
 
@@ -54,7 +56,7 @@ Function AddFontLoader( loader:TFontLoader )
 	_loaders=loader
 End Function
 
-Function LoadFont:TFont( url:Object,size,style=SMOOTHFONT )
+Function LoadFont:TFont( url:Object,size:Int,style:Int=SMOOTHFONT )
 
 	Local loader:TFontLoader=_loaders
 	

+ 25 - 23
freetypefont.mod/freetypefont.bmx

@@ -1,14 +1,16 @@
 
-Strict
+SuperStrict
 
 Module BRL.FreeTypeFont
 
-ModuleInfo "Version: 1.09"
+ModuleInfo "Version: 1.10"
 ModuleInfo "Author: Simon Armstrong, Mark Sibly"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: Blitz Research Ltd"
 ModuleInfo "Modserver: BRL"
 
+ModuleInfo "History: 1.10"
+ModuleInfo "History: Module is now SuperStrict"
 ModuleInfo "History: 1.09 Release"
 ModuleInfo "History: Offset glyph rect to allow for smooth font border"
 ModuleInfo "History: 1.08 Release"
@@ -41,7 +43,7 @@ Public
 Type TFreeTypeGlyph Extends TGlyph
 
 	Field _pixmap:TPixmap
-	Field _advance#,_x,_y,_w,_h
+	Field _advance#,_x:Int,_y:Int,_w:Int,_h:Int
 	
 	Method Pixels:TPixmap()
 		If _pixmap Return _pixmap
@@ -53,7 +55,7 @@ Type TFreeTypeGlyph Extends TGlyph
 		Return _advance
 	End Method
 	
-	Method GetRect( x Var,y Var,w Var,h Var )
+	Method GetRect( x:Int Var,y:Int Var,w:Int Var,h:Int Var )
 		x=_x
 		y=_y
 		w=_w
@@ -66,33 +68,33 @@ Type TFreeTypeFont Extends BRL.Font.TFont
 
 	'Field _face:FTFace
 	Field _ft_face:Byte Ptr
-	Field _style,_height
-	Field _ascend,_descend
+	Field _style:Int,_height:Int
+	Field _ascend:Int,_descend:Int
 	Field _glyphs:TFreeTypeGlyph[]
-	Field _buf:Byte Ptr,_buf_size
+	Field _buf:Byte Ptr,_buf_size:Int
 	
 	Method Delete()
 		FT_Done_Face _ft_face
 		MemFree _buf
 	End Method
 
-	Method Style()
+	Method Style:Int()
 		Return _style
 	End Method
 
-	Method Height()
+	Method Height:Int()
 		Return _height
 	End Method
 	
-	Method CountGlyphs()
+	Method CountGlyphs:Int()
 		Return _glyphs.length
 	End Method
 	
-	Method CharToGlyph( char )
+	Method CharToGlyph:Int( char:Int )
 		Return FT_Get_Char_Index( _ft_face,char )-1
 	End Method
 	
-	Method LoadGlyph:TFreeTypeGlyph( index )
+	Method LoadGlyph:TFreeTypeGlyph( index:Int )
 	
 		Local glyph:TFreeTypeGlyph=_glyphs[index]
 		If glyph Return glyph
@@ -126,11 +128,11 @@ Type TFreeTypeFont Extends BRL.Font.TFont
 			pixmap=TPixmap.CreateStatic( buffer,width,rows,pitch,PF_A8 ).Copy()
 		Else
 			pixmap=CreatePixmap( width,rows,PF_A8 )
-			Local b
-			For Local y=0 Until rows
+			Local b:Int
+			For Local y:Int=0 Until rows
 				Local dst:Byte Ptr=pixmap.PixelPtr(0,y)
 				Local src:Byte Ptr=buffer+y*pitch
-				For Local x=0 Until width
+				For Local x:Int=0 Until width
 					If (x&7)=0 b=src[x/8]
 					If b & $80 dst[x]=$ff Else dst[x]=0
 					b:+b
@@ -152,30 +154,30 @@ Type TFreeTypeFont Extends BRL.Font.TFont
 
 	End Method
 	
-	Function Load:TFreeTypeFont( src$,size,style )
+	Function Load:TFreeTypeFont( src$,size:Int,style:Int )
 
 		Global ft_lib:Byte Ptr
 		
 		If Not ft_lib
-			If FT_Init_FreeType( Varptr ft_lib ) Return
+			If FT_Init_FreeType( Varptr ft_lib ) Return Null
 		EndIf
 
-		Local buf:Byte Ptr,buf_size
+		Local buf:Byte Ptr,buf_size:Int
 				
 		Local ft_face:Byte Ptr
 
 		If src.Find( "::" )>0
 			Local tmp:Byte[]=LoadByteArray( src )
 			buf_size=tmp.length
-			If Not buf_size Return
+			If Not buf_size Return Null
 			buf=MemAlloc( buf_size )
 			MemCopy buf,tmp,buf_size
 			If FT_New_Memory_Face( ft_lib,buf,buf_size,0,Varptr ft_face )
 				MemFree buf
-				Return
+				Return Null
 			EndIf
 		Else
-			If FT_New_Face( ft_lib,src$,0,Varptr ft_face ) Return
+			If FT_New_Face( ft_lib,src$,0,Varptr ft_face ) Return Null
 		EndIf
 		
 		While size
@@ -184,7 +186,7 @@ Type TFreeTypeFont Extends BRL.Font.TFont
 		Wend
 		If Not size 
 			FT_Done_Face ft_face
-			Return
+			Return Null
 		EndIf
 		
 		'Local face:FTFace=New FTFace
@@ -213,7 +215,7 @@ End Type
 
 Type TFreeTypeFontLoader Extends TFontLoader
 
-	Method LoadFont:TFreeTypeFont( url:Object,size,style )
+	Method LoadFont:TFreeTypeFont( url:Object,size:Int,style:Int )
 	
 		Local src$=String( url )
 		

+ 12 - 10
random.mod/random.bmx

@@ -1,23 +1,25 @@
 
-Strict
+SuperStrict
 
 Rem
 bbdoc: Math/Random numbers
 End Rem
 Module BRL.Random
 
-ModuleInfo "Version: 1.05"
+ModuleInfo "Version: 1.06"
 ModuleInfo "Author: Mark Sibly, Floyd"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: Blitz Research Ltd"
 ModuleInfo "Modserver: BRL"
 
+ModuleInfo "History: 1.06"
+ModuleInfo "History: Module is now SuperStrict"
 ModuleInfo "History: 1.05 Release"
 ModuleInfo "History: Fixed Rand() with negative min value bug"
 
 Private
-Global	rnd_state=$1234
-Const	RND_A=48271,RND_M=2147483647,RND_Q=44488,RND_R=3399
+Global	rnd_state:Int=$1234
+Const	RND_A:Int=48271,RND_M:Int=2147483647,RND_Q:Int=44488,RND_R:Int=3399
 Public
 
 Rem
@@ -77,16 +79,16 @@ The optional parameter allows you to use #Rand in 2 ways:
 * &Rand(x,y) | Random integer in the range x to y (inclusive)
 ]
 End Rem
-Function Rand( min_value,max_value=1 )
-	Local range=max_value-min_value
-	If range>0 Return Int( RndDouble()*(1+range) )+min_value
-	Return Int( RndDouble()*(1-range) )+max_value
+Function Rand:Int( min_value:Int,max_value:Int=1 )
+	Local Range:Int=max_value-min_value
+	If Range>0 Return Int( RndDouble()*(1+Range) )+min_value
+	Return Int( RndDouble()*(1-Range) )+max_value
 End Function
 
 Rem
 bbdoc: Set random number generator seed
 End Rem
-Function SeedRnd( seed )
+Function SeedRnd( seed:Int )
 	rnd_state=seed & $7fffffff             				'enforces rnd_state >= 0
 	If rnd_state=0 Or rnd_state=RND_M rnd_state=$1234	'disallow 0 and M
 End Function
@@ -97,6 +99,6 @@ returns: The current random number generator seed
 about: Use in conjunction with SeedRnd, RndSeed allows you to reproduce sequences of random
 numbers.
 End Rem
-Function RndSeed()
+Function RndSeed:Int()
 	Return rnd_state
 End Function