Skip to content

Instantly share code, notes, and snippets.

@GWRon
GWRon / read.md
Created December 27, 2022 09:33
Useful BlitzMax-stuff

To debug bcc without copying bcc sources to blitzmax/bin:

open bcc.bmx and after the import-stuff add:

putenv_ "BMXPATH="+"/home/ronny/Arbeit/Tools/BlitzMaxNG" 'adjust to your path
BlitzMaxPath() 'this sets some stuff
@GWRon
GWRon / dev.commandqueue.bmx
Last active November 3, 2022 10:16
Test code for a command queue.
SuperStrict
Framework Brl.StandardIO
Import Brl.Threads
Import Brl.ObjectList
Enum ECommandStatus
OPEN ' not yet run
RUNNING ' currently running
FINISHED ' finished execution
@GWRon
GWRon / render2texture_example2.bmx
Created March 10, 2022 14:40
render2texture_example2.bmx
SuperStrict
Framework Brl.StandardIO
Import Brl.RandomDefault
'Import Brl.GLMax2D
'Import Brl.D3D9Max2D
'Import SDL.D3D9SDLMax2D
Import Sdl.GLSDLMax2D
'Import SDL.GL2SDLMax2D
'Import Sdl.SDLRenderMax2D
import brl.PNGLoader
' J I G S A W - G A M E E X A M P L E
'
' Author Midimaster www.midimaster.de
'
' Copyright: Public Domain
' Version 1.01
' last change: now for BlitzMax NG and BlitzMax 1.51
'
' your own pngs:
' a transparent "jigmiddle.png" with a smaller black rectangle in the exact center,
SuperStrict
Framework Brl.StandardIO
Import Pub.FreeProcess
Import MaxGUI.Drivers
Import Brl.EventQueue
Import Brl.Bank
Import "lexer/Lexer.bmx"
Import "parser/Parser.bmx"
@GWRon
GWRon / font.bmx
Last active August 12, 2020 20:36
Parse font text
Method __drawNew:SVec2i(txt:String,x:Float,y:Float, color:SBitmapFontColor, doDraw:Int=True)
Const commandCharCode:Int = Asc("|")
Const payloadCharCode:Int = Asc("=")
Const escapeCharCode:Int = Asc("\")
Local currentColor:SColor8
Local hasCurrentColor:Int = False
Local colorBackup:SColor8 = New SColor8(0,0,0,255)
' retrieve current screen color
'GetColor(colorBackup)
SuperStrict
Import Text.Json
Import Brl.StandardIO
Import brl.reflection
Type TJSONHelper
Field defaultJSON:TJSON
Field jsonError:TJSONError
@GWRon
GWRon / server_standardio.bmx
Created January 6, 2020 22:49
server_standardio.bmx
SuperStrict
Framework BRL.StandardIO
Import BRL.SystemDefault
Import BRL.System
Import BRL.Stream
Import BRL.Retro
Import BRL.Blitz
Local args:String
<!-- === SERIES === -->
<scripttemplate product="2" licence_type="3" guid="scripttemplate-random-ron-animalseries01">
<title>
<de>%TITLE%</de>
<en>%TITLE%</en>
</title>
<description>
<de>Dokumentation über %ANIMALS%.
%EXTRA%</de>
<en>Documentary about %ANIMALS%.