Skip to content
This repository was archived by the owner on Nov 4, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
!/targets/cpptool
!/targets/flash
!/targets/glfw
!/targets/glfw3
!/targets/html5
!/targets/ios
!/targets/psm
Expand Down
77 changes: 77 additions & 0 deletions VERSIONS.TXT
Original file line number Diff line number Diff line change
@@ -1,6 +1,83 @@

***** v82a *****

Fixed some typos in brl.datastream.

Imports now happen while preprocessing, not after.

Fixed c++ issue with reflection and recent extends null fixes.

Fixed html5 webaudio panning issue - panningModel now set to "equalpower".


***** v81b *****

Added #GLFW_WINDOW_DECORATED to glfw3 target - set to 'false' to create a borderless etc window.

Fixed macos glfw3 audio not working.

Ant now referenced by absolute path in android builder because Yosemite...

Fixed glfw/glfw3 targets so they can build with mingw64 (TDM-GCC-64 tested). Building with mingw64 will produce 64 bit apps by default.

Removed forced 32 bit architecture for macos stdcpp builds.

Moved some hard coded gcc options from transcc to makefile for glfw target.

Added AppPath/AppArgs/SetEnv/GetEnv/ChangeDir/CurrentDir/Execute/ExitApp to brl.process - brl.filepath, brl.filesystem and brl.process should now be preferred over os module (although that wont be going anywhere just yet).

Added src/mserver/mserver.monkey, src/launcher/launcher.monkey and src/rebuildall.monkey for linux 64.

Renamed src/monkey->src/launcher; removed src/modman.

Added #GLFW_VERSION int var to glfw targets.

Fixed glfw3 window resizing not updating DeviceWidth/DeviceHeight.

Fixed weird yosemite issue where ant wasn't found when building for android.


***** v81a *****

Renamed a bunch of targets - see IDE combo box. Shouldn't affect monkey code?

Added new glfw3 target (note: had to apt-get install libxcursor-dev and libxinerama-dev on Linux)

More extern extends null fixes for debugger/gc.

Fixed bug where extern 'extends null' objects confused cpp debug builds.

Tweaked android audio so pool.stop() isn't inadvertantly called twice.


***** v80c *****

Fixed a nasty GC bug.

Fixed misspelling of CFG_GLFW_APP_LABEL in glfw target.

Had another hack at the glfw joystick code. Both pc/mac versions now attempt to detect xbox360 controllers (mac also tries to detect ps3) defaulting to 'logitech dual action' layout if device not recognized. FAR from foolproof, but should/may be an improvement on current setup.

Added RealPath to brl.filesystem.


***** v80b *****

Fixed android_new 'sdk not found' admob issue - moved some google-player-services_lib config files to 'templates' dir.

Fixed trans Next [varname] issue where varname was being ignored.

Transcc android builders now preserve parent dir name when copying android #LIBS files from "x86", "mips", "armeabi" and "armeabi-v7a" dirs.

Fixed misspelling of MANIFEST as MAINFEST in transcc android builders!

Merged some pull requests: Internal android ActivityDelegate class now handles onNewIntent, and android brl.filesystem CopyFile() now handles src files in monkey://data/


***** v80a *****

Changed glfw LoadState/SaveState to use monkey://internal/.monkeystate if #GLFW_APP_LABEL is set.

Changed glfw monkey://internal/ to point to local per-user app data location. App must set #GLFW_APP_LABEL (and optionally #GLFW_APP_PUBLISHER) for this to work. App data location on windows is: $APPDATA\GLFW_APP_PUBLISHER\GLFW_APP_LABEL; on linux: $HOME/.config/GLFW_APP_PUBLISHER/GLFW_APP_LABEL; on macos, $HOME/Library/Application Support/GLFW_APP_PUBLISHER/GLFW_APP_LABEL. If #GLFW_APP_PUBLISHER is not set, it's not used.

Made glfw target monkey://data/ etc dir locations absolute, not CD relative.
Expand Down
5 changes: 4 additions & 1 deletion bananas/devolonter/matchup/src/progressbar.monkey
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ Import mojo

Class ProgressBar

Private

Field x:Float, y:Float

Field width:Float, height:Float

Private
Field value:Float

Public

Method New(x:Float, y:Float, width:Float, height:Float)
Self.x = x; Self.y = y
Self.width = width; Self.height = height
Expand Down
1 change: 1 addition & 0 deletions bin/config.macos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ HTML_PLAYER=open -n "${MONKEYDIR}/bin/mserver_macos.app" --args
'Ant is currently available here:
' http://ant.apache.org/bindownload.cgi
'
ANT_PATH="${HOME}/apache-ant-1.9.4"
ANT_PATH="${HOME}/apache-ant-1.9.2"
'--------------------

Expand Down
1 change: 1 addition & 0 deletions bin/config.winnt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ ANT_PATH="${SYSTEMDRIVE}\ant"
'MinGW is currently here:
'
MINGW_PATH="D:\\devtools\TDM-GCC-32"
'MINGW_PATH="D:\\devtools\TDM-GCC-64"
MINGW_PATH="${MONKEYDIR}\MinGW"
MINGW_PATH="${SYSTEMDRIVE}\TDM-GCC-32"
MINGW_PATH="${SYSTEMDRIVE}\MinGW32"
Expand Down
14 changes: 11 additions & 3 deletions docs/monkeydoc/Programming/App config settings.monkeydoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,26 @@ The following app config settings are currently supported:

'Mojo settings, defaults shown
'
#MOJO_AUTO_SUSPEND_ENABLED=True 'Set to True to cause app to suspend when desktop window loses focus
#MOJO_AUTO_SUSPEND_ENABLED=True 'Set to True to cause app to suspend when desktop window loses focus.
#MOJO_HICOLOR_TEXTURES=True
#MOJO_IMAGE_FILTERING_ENABLED=True

'Html5 settings, defaults shown
'
#HTML5_WEBAUDIO_ENABLED=True 'Set to false to disable webaudio support for mojo audio, and to use older multimedia audio system instead.

'GLFW settings, defaults shown
'
#GLFW_USE_MINGW=False 'Set to true on Windows to use Mingw instead of msvc2010 to build glfw apps
#GLFW_WINDOW_TITLE="Monkey Game"
#GLFW_WINDOW_WIDTH=640 'Set this and HEIGHT to 0 for a 'windowless' glfw app
#GLFW_WINDOW_HEIGHT=480
#GLFW_WINDOW_HEIGHT=480
#GLFW_WINDOW_RESIZABLE=False
#GLFW_WINDOW_FULLSCREEN=False
#GLFW_WINDOW_SAMPLES=0 'Set to number of samples for multisampling (glfw3 only).
#GLFW_WINDOW_DECORATED=True 'Set to false to create a broderless window (glfw3 only).
#GLFW_VERSION=2 'Set to GLFW version, ie: 2 or 3.

#GLFW_APP_LABEL="My App" 'Human readable label for app.
'Must be set for monkey://internal to map to 'per user' app data dir.
'If not set (the default), monkey://internal is shared by all users of app.
Expand Down Expand Up @@ -104,7 +112,7 @@ The following app config settings are currently supported:

'Misc
'
#CC_OPTS 'additional gcc options for stdcpp target, eg: #CC_OPTS+="-DMyDefine"
#CC_OPTS="" 'additional gcc options for stdcpp target, eg: #CC_OPTS+="-DMyDefine"

</pre>

Expand Down
35 changes: 22 additions & 13 deletions modules/brl/datastream.monkey
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@ Import brl.stream

Class DataStream Extends Stream

Method New( buf:DataBuffer,offset:Int=0 )
_buffer=buf
Method New( buffer:DataBuffer,offset:Int=0 )
_buffer=buffer
_offset=offset
_length=buf.Length-offset
_length=buffer.Length-offset
End

Method New( buf:DataBuffer,offset:Int,length:Int )
_buffer=buf
Method New( buffer:DataBuffer,offset:Int,length:Int )
_buffer=buffer
_offset=offset
_length=length
End

Method Data:DataBuffer() Property
Return _buffer
End

Method Offset:Int() Property
Return _offset
End

Method Length:Int() Property
Return _length
End
Expand All @@ -35,34 +43,35 @@ Class DataStream Extends Stream
Method Close:Void()
If _buffer
_buffer=Null
_position=0
_offset=0
_length=0
_position=0
Endif
End

Method Read:Int( buf:DataBuffer,offset:Int,count:Int )
If _position+count>_length count=_length-_position
For Local i:=0 Until count
buf.PokeByte offset+i,_buffer.PeekByte( _offset+_position+i )
Next

_buffer.CopyBytes _offset+_position,buf,offset,count
_position+=count

Return count
End

Method Write:Int( buf:DataBuffer,offset:Int,count:Int )
If _position+count>_length count=_length-_position
For Local i:=0 Until count
_buffer.PokeByte _offset+_position+i,buf.PeekByte( offset+i )
Next

buf.CopyBytes offset,_buffer,_offset+_position,count
_position+=count

Return count
End

Private

Field _buffer:DataBuffer
Field _position:Int
Field _offset:Int
Field _length:Int
Field _position:Int

End
6 changes: 6 additions & 0 deletions modules/brl/filesystem.monkey
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Extern Private
Class BBFileSystem

Function FixPath:String( path:String )
Function RealPath:String( path:String )
Function FileType:Int( path:String )
Function FileSize:Int( path:String )
Function FileTime:Int( path:String )
Expand Down Expand Up @@ -59,6 +60,10 @@ Function FileTime:Int( path:String )
Return BBFileSystem.FileTime( FixPath( path ) )
End

Function RealPath:String( path:String )
Return BBFileSystem.RealPath( FixPath( path ) )
End

Function CreateFile:Bool( path:String )
Return BBFileSystem.CreateFile( FixPath( path ) )
End
Expand Down Expand Up @@ -157,3 +162,4 @@ Function LoadDir:String[]( path:String,recursive:Bool=False,hidden:Bool=False )

Return files.ToArray()
End

2 changes: 2 additions & 0 deletions modules/brl/monkeydoc/databuffer.monkeydoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ The @encoding parameter should be one of:
| "utf8" | Unicode
| "ascii" | 8 bit ascii

The returned value is the number of bytes poked into the databuffer.


# Method PokeBytes:Void(address:Int,bytes:Int[],offset:Int,count:Int )

Expand Down
25 changes: 13 additions & 12 deletions modules/brl/monkeydoc/datastream.monkeydoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,30 @@ Please see the [[DataStream]] class for more information on datastreams.
A datastream allows you to read and write data to and from a databuffer in a stream-like way.


# Method New( buffer:DataBuffer,start:Int=0 )
# Method New( data:DataBuffer,offset:Int=0 )

Creates a datastream that wraps the specified databuffer.

The wrapped range of data begins at byte address @start and extends to the end of the buffer. Data outside this range will not be modified by any stream operations.
The wrapped range of data begins at byte address @offset and extends to the end of the buffer. Data outside this range will not be modified by any stream operations.

Params:

@buffer - databuffer to wrap.
# Method New( data:DataBuffer,offset:Int,length:Int )

@start - byte address within databuffer.
Creates a datastream that wraps the specified databuffer.

The wrapped range of data begins at byte address @offset and extends for @length bytes. Data outside of this range will not be modified by any stream operations.

# Method New( buffer:DataBuffer,start:Int,length:Int )

Creates a datastream that wraps the specified databuffer.
# Method Data:DataBuffer() Property

Returns the databuffer object wrapped by this datastream.


The wrapped range of data begins at byte address @start and extends for @length bytes. Data outside of this range will not be modified by any stream operations.
# Method Offset:Int() Property

Params:
Returns the start offset of the data in the databuffer object wrapped by this datastream.

@buffer - databuffer to wrap.

@start - byte address within databuffer.
# Method Length:Int() Property

@length - byte length.
Returns the length of the data in the databuffer object wrapped by this datastream.
5 changes: 5 additions & 0 deletions modules/brl/monkeydoc/filesystem.monkeydoc
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ Params:
path - a file system path.


# Function RealPath:String(path:String)

Converts @path to an absolute filesystem path.


# Function CreateFile:Bool(path:String)

Creates a new file at @path.
Expand Down
42 changes: 41 additions & 1 deletion modules/brl/monkeydoc/process.monkeydoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,50 @@

# Import brl.databuffer

# Function AppPath:String()

# Class Process
Returns the file system path of the currently running application.


# Function AppArgs:String[]()

Returns the application startup parameters.


# Function SetEnv:Int(name:String,value:String)

Set an environment variable.


# Function GetEnv:String(name:String)

Get an environment variable.


# Function ChangeDir:Int(path:String)

Changes the current directory of the running application.


# Function CurrentDir:String()

Returns the current directory of the currently running application.


# Function Execute:Int(cmd:String)

Executes a shell command and returns the result. This is generally 0 for success, or non-0 for failure.


# Function ExitApp:Int(retcode:Int)

Exits the application with the given return code.

In general, ExitApp should return 0 if successful, or <0 upon failure.


# Class Process


# Method Start:Void(cmd:String)

Expand Down
Loading