Skip to content

Commit

Permalink
Upload latest stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeHart66 committed May 16, 2021
1 parent 7a24c6a commit 80cebf7
Show file tree
Hide file tree
Showing 14 changed files with 7,113 additions and 5,532 deletions.
9 changes: 5 additions & 4 deletions VERSIONS.TXT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
***** v2021-03-30 *****
***** v2021-05-16 *****

FIX: [brl.requesters] Fixed compiling error on Linux. (Author: MikeHart)
FIX: [brl.filesystem] Fixed CreateDir not being able to use cerberus://internal file paths. (Author: MikeHart)
Expand All @@ -7,6 +7,7 @@ FIX: [docs/mojo.app] Typo correction. (Author: Phil7)
FIX: [mojo2] Fixed Canvas.ReadPixels only reading the last framebuffer it was rendered to. (Author: MikeHart)
FIX: [mojo/mojo2] Fixed Font.TextHeight returning the values without Glyph.yoffset. (Author: MikeHart)
FIX: [mojo] Fixed mojo.colornames throwing a "blocks nested to deeply" error on MSVC. (Author: MikeHart)
FIX: [html5] "Clear console" Button was still visible when Console was hidden. (Author: MikeHart)
MOD: [mojo/mojo2] Changed DrawText to use TextHeight("") when being y-aligned. (Author: MikeHart)
MOD: [GLFW/MSVC] Upgraded the solution to use MSVC 2019 and SDK 10.x. (Author: MikeHart)
MOD: [agk/buildtarget] Added fixes for TGCs Android template. (Author: MikeHart)
Expand All @@ -15,12 +16,12 @@ MOD: [CURL] Updated to version 7.75. (Author: MikeHart)
NEW: [mojo.input] Added KEY_ALT to the usable key codes. (Author: MikeHart)
NEW: [TRANSCC] Added #GLFW_GCC_SRC_OPTS to compile more source files. (Author: MikeHart)
NEW: [TRANSCC] Added #GLFW_GCC_VPATH_OPTS to add more paths to source files. (Author: MikeHart)
NEW: [TRANSCC/Android] Added bundleRelease to create app bundle. (Author: MikeHart)
NEW: [TRANSCC/Android] Added bundleRelease to create Android app bundle. (Author: MikeHart)
NEW: [TRANSCC/GLFW] Copy dlls into the build folder (Takes care of the OpenAl dlls). (Author: MikeHart)
NEW: [mojo/Android] Added new soundpool constructor to replace the depreciated one. (Author: MikeHart)
NEW: [HTML5] Added #HTML5_CANVAS_ALPHA to enable the canvas' background alpha channel. (Author: Holzchopf)
NEW: [GLFW/MSVC] Added the ability to create 32 and 64bit apps via #GLFW_GCC_MSIZE_WINNT. Will create a new app config setting to cover GCC and MSVC later on. (Author: MikeHart)
NEW: [brl.ini] Added a new Ini handler module, based on Martin Leidel's inital work. (Martin, MikeHart)
NEW: [GLFW/MSVC] Added the ability to create 32 and 64bit apps via #GLFW_GCC_MSIZE_WINNT and MSVC. Will create a new app config setting to cover GCC and MSVC later on. (Author: MikeHart)
NEW: [brl.ini] Added a new Ini handler module, based on Martin Leidel's initial work. (Martin, MikeHart)


KNOWN ISSUES:
Expand Down
7 changes: 4 additions & 3 deletions docs/cerberusdoc/Home.cerberusdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ This is the ultimate guide to Cerberus X.

>> Latest new stuff

* New [[../html/Modules_mojo.app.html#DeviceWindowWidth()|DeviceWindowWidth]] and [[../html/Modules_mojo.app.html#DeviceWindowHeight()|DeviceWindowHeight]] commands to returns the width or height of the application's device window in desktop units.
* New [[../html/Modules_mojo2.graphics_DrawList.html#DrawImageRect(Image,Float,Float,Int,Int,Int,Int,[Float],[Float],[Float])|DrawImageRect]] which let you scale and rotate your image rect inside mojo2 now.

* New config setting *#HTML5_CANVAS_ALPHA* to enable the canvas' background alpha channel.
* New config setting *#GLFW_GCC_SRC_OPTS* to compile more source files with MingW.
* New config setting *#GLFW_GCC_VPATH_OPTS* to add more paths to source files with MingW.
Expand All @@ -15,6 +12,10 @@ This is the ultimate guide to Cerberus X.
* Added key code *KEY_ALT*.
* Added bundleRelease to create Android app bundle.

>>>> Previous release (v2020-12-05)

* New [[../html/Modules_mojo.app.html#DeviceWindowWidth()|DeviceWindowWidth]] and [[../html/Modules_mojo.app.html#DeviceWindowHeight()|DeviceWindowHeight]] commands to returns the width or height of the application's device window in desktop units.
* New [[../html/Modules_mojo2.graphics_DrawList.html#DrawImageRect(Image,Float,Float,Int,Int,Int,Int,[Float],[Float],[Float])|DrawImageRect]] which let you scale and rotate your image rect inside mojo2 now.


>> Introduction
Expand Down
18 changes: 18 additions & 0 deletions examples/ini/ReadIni/ReadIni.cxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Strict

Import brl.ini

Function Main:Int()

Local ini:IniHandler = New IniHandler
ini.Load("setup.ini")


ini.WriteStringArray("zArray","string",["entry#1","entry#2","entry#3"])
ini.WriteIntArray("zArray","int",[1,2,33])
ini.WriteFloatArray("zArray","float",[1.0,2.0,33,5.123])
ini.WriteBoolArray("zArray","bool",[True,False,False,True])

Print ini.SaveToString()
Return 0
End
13 changes: 13 additions & 0 deletions examples/ini/ReadIni/ReadIni.data/setup.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is a test

[config]
installpath=C:\install.txt
screenwidth=1024
ShowDialog=True

# Now another section

[runtime]
growfactor=10.24
Level=2
name=Michael Hartlef
29 changes: 15 additions & 14 deletions modules/brl/filesystem.cxs
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,21 @@ Function CopyFile:Bool( src:String,dst:String )
End

Function CreateDir:Bool( path:String )
Local _ret:Bool = False
'path = path.Replace("\","/")
path = FixPath( path )
Local _dirs:= path.Split("/")
Local _curDir:=""
For Local _dir :=Eachin _dirs
If _dir.Length()= 0 Continue
_curDir += _dir
If FileType(_curDir)<>FILETYPE_DIR
_ret = BBFileSystem.CreateDir( FixPath( _curDir ) )
Endif
_curDir += "/"
Next
Return _ret
Local _ret:Bool = False
path = FixPath(path).Replace("\","/")

Local _dirs:= path.Split("/")
Local _curDir:=""
If path.StartsWith("/") Then _curDir = "/"
For Local _dir :=Eachin _dirs
If _dir.Length()= 0 Continue
_curDir += _dir
If FileType(_curDir)<>FILETYPE_DIR
_ret = BBFileSystem.CreateDir( FixPath( _curDir ) )
Endif
_curDir += "/"
Next
Return _ret
End

Function DeleteDir:Bool( path:String,recursive:Bool=False )
Expand Down
7 changes: 1 addition & 6 deletions modules/brl/httprequest.cxs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Import brl.asyncevent
#Endif

#If BRL_HTTPREQUEST_IMPLEMENTED
#If GLFW_USE_MINGW=True

#GLFW_USE_HTTPS=True
#GLFW_COPY_LIBS+="libcurl-x64"
Expand All @@ -21,10 +20,6 @@ Import brl.asyncevent
#GLFW_COPY_LIBS_32+="libcrypto-1_1"
#GLFW_COPY_LIBS_32+="libssl-1_1"





' Link libraries for curl
#If HOST="linux"
#GLFW_GCC_LIB_OPTS+="-lcurl"
Expand All @@ -33,7 +28,7 @@ Import brl.asyncevent
#If HOST="winnt"
#GLFW_GCC_LIB_OPTS+="-lcurldll"
#Endif
#Endif


Extern Private

Expand Down
5 changes: 4 additions & 1 deletion modules/mojo/graphics.cxs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Import mojox.graphics
' 20190117 - Holzchopf
' Color class support
Import color
Import mojo

Private

Expand Down Expand Up @@ -402,7 +403,7 @@ Class Image
surface=Null
Endif
End

Method WritePixels( pixels[],x,y,width,height,offset=0,pitch=0,frame=0 )
If Not pitch pitch=width

Expand Down Expand Up @@ -518,6 +519,7 @@ End

Function LoadImage:Image( path$,frameCount=1,flags=Image.DefaultFlags )
Local surf:=device.LoadSurface( FixDataPath(path) )

If surf
Return (New Image).Init( surf,frameCount,flags )
Else
Expand Down Expand Up @@ -983,6 +985,7 @@ Function DrawText:Void( text:String, x:Int, y:Int,xhandle:Float=0,yhandle:Float=

x += tmpChar.advance
Next

End

Function DrawText:Void( textLines:String[],x:Int,y:Int,xhandle:Float=0,yhandle:Float=0 )
Expand Down
5 changes: 4 additions & 1 deletion targets/glfw3/template/gcc_winnt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ CPPFLAGS=$(CCOPTS) \
-I../glfw3/src \
-I../openal/include \
-I../stb \
-I../tinyfiledialogs \
-I../zlib-1.2.8 \
-I../lpng1610

LD=g++
LDFLAGS=$(LDOPTS) -Wl,--subsystem,windows
LDLIBS=-lcomdlg32 -lgdi32 -lopengl32 $(LIBOPTS) -lws2_32
LDLIBS=-lcomdlg32 -lgdi32 -lopengl32 $(LIBOPTS) -lws2_32 -lole32

RES=windres
ifeq ($(ARCH),64)
Expand All @@ -28,6 +29,7 @@ endif
VPATH= $(VPATHOPTS) \
%.c ../glfw3/src \
%.c ../stb \
%.c ../tinyfiledialogs \
%.cpp .. \
%.rc ..

Expand All @@ -50,6 +52,7 @@ window.o \
stb_vorbis.o \
stb_image.o \
resource.o \
tinyfiledialogs.o \
main.o

TMP=build/$(dir $(OUT))
Expand Down
Loading

0 comments on commit 80cebf7

Please sign in to comment.