Dear community,
SDL's renderer represents the opportunity to take Blitzmax to the next level with robust software fallback. While there isn't scale and rotation, it gives you the power to support win, linux and mac cards which either have bad drivers or no 3D capability - and they are far more common than you might think!
To this end, I am proposing this thread be made sticky and we work together to create a definitive max 2D rendering solution. Lets get started!
The libs - precompiled is most convenient and no GPL issues but modules also welcome:
windows:
http://www.libsdl.org/release/SDL-1.2.8-win32.zip
linux:
http://www.libsdl.org/release/SDL-1.2.8-1.i386.rpm
mac:
http://www.libsdl.org/release/SDL-1.2.8.pkg.tar.gz
source in c:
http://www.libsdl.org/download-1.2.php
Please note these are all precompiled which is easier (unless someone wants to make a mod! Some brave soul...) And we are going for a windows version first.
Docs:
http://www.libsdl.org/cgi/docwiki.cgi/
Homepage:
http://www.libsdl.org/
Source code so far:
Contributed by noel cower (this is a very limited bit of source that just shows us some of the keywords, types and constants - perhaps it will help us get started:
And here's some alternative code - linking to a DLL but I don't know where to go from here as there isn't much documentation on this (thanks to Sarge on IRC):
The goal is to do all the software rendering externs and calls so we can with ease, fall back to SDL software rendering (bmax provides the hardware rendering).
To this end we might need SDL's mouse handling if it has it, and the rect class as it's animated surfaces require that.
I look forwards to your replies and any help you can give towards this open source blitzmax project. I will share everything I learn from it with you all, so all may benefit. Lets grow blitzmax beyond by working as a team!
Your contributions are valued and greatly appreciated.
SDL's renderer represents the opportunity to take Blitzmax to the next level with robust software fallback. While there isn't scale and rotation, it gives you the power to support win, linux and mac cards which either have bad drivers or no 3D capability - and they are far more common than you might think!
To this end, I am proposing this thread be made sticky and we work together to create a definitive max 2D rendering solution. Lets get started!
The libs - precompiled is most convenient and no GPL issues but modules also welcome:
windows:
http://www.libsdl.org/release/SDL-1.2.8-win32.zip
linux:
http://www.libsdl.org/release/SDL-1.2.8-1.i386.rpm
mac:
http://www.libsdl.org/release/SDL-1.2.8.pkg.tar.gz
source in c:
http://www.libsdl.org/download-1.2.php
Please note these are all precompiled which is easier (unless someone wants to make a mod! Some brave soul...) And we are going for a windows version first.
Docs:
http://www.libsdl.org/cgi/docwiki.cgi/
Homepage:
http://www.libsdl.org/
Source code so far:
Contributed by noel cower (this is a very limited bit of source that just shows us some of the keywords, types and constants - perhaps it will help us get started:
Strict Module Pub.SDL ModuleInfo "BlitzMax SDL Implementation" ModuleInfo "www.libsdl.org" ModuleInfo "GNU Lesser General Public License" Import "-lSDL" Const SDL_INIT_TIMER =$00000001 Const SDL_INIT_AUDIO =$00000010 Const SDL_INIT_VIDEO =$00000020 Const SDL_INIT_CDROM =$00000100 Const SDL_INIT_JOYSTICK =$00000200 Const SDL_INIT_NOPARACHUTE =$00100000 ' Don't catch fatal signals Const SDL_INIT_EVENTTHREAD =$01000000 ' Not supported on all OS's Const SDL_INIT_EVERYTHING =$0000FFFF Const SDL_APPMOUSEFOCUS =$01 ' The app has mouse coverage Const SDL_APPINPUTFOCUS =$02 ' The app has input focus Const SDL_APPACTIVE =$04 ' The application is active Const AUDIO_U8 =$0008 ' Unsigned 8-bit samples Const AUDIO_S8 =$8008 ' Signed 8-bit samples Const AUDIO_U16LSB =$0010 ' Unsigned 16-bit samples Const AUDIO_S16LSB =$8010 ' Signed 16-bit samples Const AUDIO_U16MSB =$1010 ' As above, but big-endian byte order Const AUDIO_S16MSB =$9010 ' As above, but big-endian byte order Const SDL_AUDIO_TRACK =$00 Const SDL_DATA_TRACK =$04 Const SDL_ALLEVENTS =$FFFFFFFF Const SDL_HAT_CENTERED =$00 Const SDL_HAT_UP =$01 Const SDL_HAT_RIGHT =$02 Const SDL_HAT_DOWN =$04 Const SDL_HAT_LEFT =$08 Const SDL_HAT_RIGHTUP = SDL_HAT_RIGHT|SDL_HAT_UP Const SDL_HAT_LEFTUP = SDL_HAT_LEFT|SDL_HAT_UP Const SDL_HAT_RIGHTDOWN = SDL_HAT_RIGHT|SDL_HAT_DOWN Const SDL_HAT_LEFTDOWN = SDL_HAT_LEFT|SDL_HAT_DOWN Const SDL_ALL_HOTKEYS =$FFFFFFFF Const SDL_SWSURFACE =$00000000 ' Surface is in system memory Const SDL_HWSURFACE =$00000001 ' Surface is in video memory Const SDL_ASYNCBLIT =$00000004 ' Use asynchronous blits if possible Const SDL_ANYFORMAT =$10000000 ' Allow any video depth/pixel-format Const SDL_HWPALETTE =$20000000 ' Surface has exclusive palette Const SDL_DOUBLEBUF =$40000000 ' Set up double-buffered video mode Const SDL_FULLSCREEN =$80000000 ' Surface is a full screen display Const SDL_OPENGL =$00000002 ' Create an OpenGL rendering context Const SDL_OPENGLBLIT =$0000000A ' Create an OpenGL rendering context and use it for blitting Const SDL_RESIZABLE =$00000010 ' This video mode may be resized Const SDL_NOFRAME =$00000020 ' No window caption or edge frame Const SDL_HWACCEL =$00000100 ' Blit uses hardware acceleration Const SDL_SRCCOLORKEY =$00001000 ' Blit uses a source color key Const SDL_RLEACCELOK =$00002000 ' Private flag Const SDL_RLEACCEL =$00004000 ' Surface is RLE encoded Const SDL_SRCALPHA =$00010000 ' Blit uses source alpha blending Const SDL_PREALLOC =$01000000 ' Surface uses preallocated memory Const SDL_YV12_OVERLAY =$32315659 ' Planar mode: Y + V + U (3 planes) Const SDL_IYUV_OVERLAY =$56555949 ' Planar mode: Y + U + V (3 planes) Const SDL_YUY2_OVERLAY =$32595559 ' Packed mode: Y0+U0+Y1+V0 (1 plane) Const SDL_UYVY_OVERLAY =$59565955 ' Packed mode: U0+Y0+V0+Y1 (1 plane) Const SDL_YVYU_OVERLAY =$55595659 ' Packed mode: Y0+V0+Y1+U0 (1 plane) Const SDL_LOGPAL =$01 Const SDL_PHYSPAL =$02 Const SDL_AUDIO_STOPPED = 0 Const SDL_AUDIO_PLAYING = 1 Const SDL_AUDIO_PAUSED = 2 Const SDL_GL_RED_SIZE = 0 Const SDL_GL_GREEN_SIZE = 1 Const SDL_GL_BLUE_SIZE = 2 Const SDL_GL_ALPHA_SIZE = 3 Const SDL_GL_BUFFER_SIZE = 4 Const SDL_GL_DOUBLEBUFFER = 5 Const SDL_GL_DEPTH_SIZE = 6 Const SDL_GL_STENCIL_SIZE = 7 Const SDL_GL_ACCUM_RED_SIZE =8 Const SDL_GL_ACCUM_GREEN_SIZE =9 Const SDL_GL_ACCUM_BLUE_SIZE =10 Const SDL_GL_ACCUM_ALPHA_SIZE =11 Const SDL_GL_STEREO =12 Const SDL_GL_MULTISAMPLEBUFFERS =13 Const SDL_GL_MULTISAMPLESAMPLES =14 Const SDL_GRAB_QUERY = -1 Const SDL_GRAB_OFF = 0 Const SDL_GRAB_ON = 1 Const SDL_GRAB_FULLSCREEN = 2 ' Used internally Const CD_TRAYEMPTY = 0 Const CD_STOPPED = 1 Const CD_PLAYING = 2 Const CD_PAUSED = 3 Const CD_ERROR = -1 Const SDL_ENOMEM = 0 Const SDL_EFREAD = 1 Const SDL_EFWRITE = 2 Const SDL_EFSEEK = 3 Const SDL_LASTERROR = 4 Const SDL_NOEVENT = 0 Const SDL_ACTIVEEVENT = 1 Const SDL_KEYDOWN = 2 Const SDL_KEYUP = 3 Const SDL_MOUSEMOTION = 4 Const SDL_MOUSEBUTTONDOWN = 5 Const SDL_MOUSEBUTTONUP = 6 Const SDL_JOYAXISMOTION = 7 Const SDL_JOYBALLMOTION = 8 Const SDL_JOYHATMOTION = 9 Const SDL_JOYBUTTONDOWN = 10 Const SDL_JOYBUTTONUP = 11 Const SDL_QUIT = 12 Const SDL_SYSWMEVENT = 13 Const SDL_EVENT_RESERVEDA = 14 Const SDL_EVENT_RESERVEDB = 15 Const SDL_VIDEORESIZE = 16 Const SDL_VIDEOEXPOSE = 17 Const SDL_EVENT_RESERVED2 = 18 Const SDL_EVENT_RESERVED3 = 19 Const SDL_EVENT_RESERVED4 = 20 Const SDL_EVENT_RESERVED5 = 21 Const SDL_EVENT_RESERVED6 = 22 Const SDL_EVENT_RESERVED7 = 23 Const SDL_USEREVENT = 24 Const SDL_NUMEVENTS = 32 Const SDL_ALLEVENTS = $FFFFFFFF Const SDL_ACTIVEEVENTMASK = 1 Const SDL_KEYDOWNMASK = 2 Const SDL_KEYUPMASK = 4 Const SDL_MOUSEMOTIONMASK = 8 Const SDL_MOUSEBUTTONDOWNMA = 16 Const SDL_MOUSEBUTTONUPMASK = 32 Const SDL_MOUSEEVENTMASK = 64 Const SDL_JOYAXISMOTIONMASK = 128 Const SDL_JOYBALLMOTIONMASK = 256 Const SDL_JOYHATMOTIONMASK = 512 Const SDL_JOYBUTTONDOWNMASK = 1024 Const SDL_JOYBUTTONUPMASK = 2048 Const SDL_JOYEVENTMASK = 4096 Const SDL_VIDEORESIZEMASK = 8192 Const SDL_VIDEOEXPOSEMASK = 16384 Const SDL_QUITMASK = 66536 Const SDL_SYSWMEVENTMASK = 131072 Const SDL_QUERY = -1 Const SDL_IGNORE = 0 Const SDL_DISABLE = 0 Const SDL_ENABLE = 1 Const SDL_ADDEVENT = 0 Const SDL_PEEKEVENT = 1 Const SDL_GETEVENT = 2 Const SDLK_UNKNOWN = 0 Const SDLK_FIRST = 0 Const SDLK_BACKSPACE = 8 Const SDLK_TAB = 9 Const SDLK_CLEAR = 12 Const SDLK_RETURN = 13 Const SDLK_PAUSE = 19 Const SDLK_ESCAPE = 27 Const SDLK_SPACE = 32 Const SDLK_EXCLAIM = 33 Const SDLK_QUOTEDBL = 34 Const SDLK_HASH = 35 Const SDLK_DOLLAR = 36 Const SDLK_AMPERSAND = 38 Const SDLK_QUOTE = 39 Const SDLK_LEFTPAREN = 40 Const SDLK_RIGHTPAREN = 41 Const SDLK_ASTERISK = 42 Const SDLK_PLUS = 43 Const SDLK_COMMA = 44 Const SDLK_MINUS = 45 Const SDLK_PERIOD = 46 Const SDLK_SLASH = 47 Const SDLK_0 = 48 Const SDLK_1 = 49 Const SDLK_2 = 50 Const SDLK_3 = 51 Const SDLK_4 = 52 Const SDLK_5 = 53 Const SDLK_6 = 54 Const SDLK_7 = 55 Const SDLK_8 = 56 Const SDLK_9 = 57 Const SDLK_COLON = 58 Const SDLK_SEMICOLON = 59 Const SDLK_LESS = 60 Const SDLK_EQUALS = 61 Const SDLK_GREATER = 62 Const SDLK_QUESTION = 63 Const SDLK_AT = 64 ' Skip uppercase letters Const SDLK_LEFTBRACKET = 91 Const SDLK_BACKSLASH = 92 Const SDLK_RIGHTBRACKET = 93 Const SDLK_CARET = 94 Const SDLK_UNDERSCORE = 95 Const SDLK_BACKQUOTE = 96 Const SDLK_a = 97 Const SDLK_b = 98 Const SDLK_c = 99 Const SDLK_d = 100 Const SDLK_e = 101 Const SDLK_f = 102 Const SDLK_g = 103 Const SDLK_h = 104 Const SDLK_i = 105 Const SDLK_j = 106 Const SDLK_k = 107 Const SDLK_l = 108 Const SDLK_m = 109 Const SDLK_n = 110 Const SDLK_o = 111 Const SDLK_p = 112 Const SDLK_q = 113 Const SDLK_r = 114 Const SDLK_s = 115 Const SDLK_t = 116 Const SDLK_u = 117 Const SDLK_v = 118 Const SDLK_w = 119 Const SDLK_x = 120 Const SDLK_y = 121 Const SDLK_z = 122 Const SDLK_DELETE = 127 ' End of ASCII mapped keysyms ' International keyboard syms Const SDLK_WORLD_0 = 160 ' $A0 Const SDLK_WORLD_1 = 161 Const SDLK_WORLD_2 = 162 Const SDLK_WORLD_3 = 163 Const SDLK_WORLD_4 = 164 Const SDLK_WORLD_5 = 165 Const SDLK_WORLD_6 = 166 Const SDLK_WORLD_7 = 167 Const SDLK_WORLD_8 = 168 Const SDLK_WORLD_9 = 169 Const SDLK_WORLD_10 = 170 Const SDLK_WORLD_11 = 171 Const SDLK_WORLD_12 = 172 Const SDLK_WORLD_13 = 173 Const SDLK_WORLD_14 = 174 Const SDLK_WORLD_15 = 175 Const SDLK_WORLD_16 = 176 Const SDLK_WORLD_17 = 177 Const SDLK_WORLD_18 = 178 Const SDLK_WORLD_19 = 179 Const SDLK_WORLD_20 = 180 Const SDLK_WORLD_21 = 181 Const SDLK_WORLD_22 = 182 Const SDLK_WORLD_23 = 183 Const SDLK_WORLD_24 = 184 Const SDLK_WORLD_25 = 185 Const SDLK_WORLD_26 = 186 Const SDLK_WORLD_27 = 187 Const SDLK_WORLD_28 = 188 Const SDLK_WORLD_29 = 189 Const SDLK_WORLD_30 = 190 Const SDLK_WORLD_31 = 191 Const SDLK_WORLD_32 = 192 Const SDLK_WORLD_33 = 193 Const SDLK_WORLD_34 = 194 Const SDLK_WORLD_35 = 195 Const SDLK_WORLD_36 = 196 Const SDLK_WORLD_37 = 197 Const SDLK_WORLD_38 = 198 Const SDLK_WORLD_39 = 199 Const SDLK_WORLD_40 = 200 Const SDLK_WORLD_41 = 201 Const SDLK_WORLD_42 = 202 Const SDLK_WORLD_43 = 203 Const SDLK_WORLD_44 = 204 Const SDLK_WORLD_45 = 205 Const SDLK_WORLD_46 = 206 Const SDLK_WORLD_47 = 207 Const SDLK_WORLD_48 = 208 Const SDLK_WORLD_49 = 209 Const SDLK_WORLD_50 = 210 Const SDLK_WORLD_51 = 211 Const SDLK_WORLD_52 = 212 Const SDLK_WORLD_53 = 213 Const SDLK_WORLD_54 = 214 Const SDLK_WORLD_55 = 215 Const SDLK_WORLD_56 = 216 Const SDLK_WORLD_57 = 217 Const SDLK_WORLD_58 = 218 Const SDLK_WORLD_59 = 219 Const SDLK_WORLD_60 = 220 Const SDLK_WORLD_61 = 221 Const SDLK_WORLD_62 = 222 Const SDLK_WORLD_63 = 223 Const SDLK_WORLD_64 = 224 Const SDLK_WORLD_65 = 225 Const SDLK_WORLD_66 = 226 Const SDLK_WORLD_67 = 227 Const SDLK_WORLD_68 = 228 Const SDLK_WORLD_69 = 229 Const SDLK_WORLD_70 = 230 Const SDLK_WORLD_71 = 231 Const SDLK_WORLD_72 = 232 Const SDLK_WORLD_73 = 233 Const SDLK_WORLD_74 = 234 Const SDLK_WORLD_75 = 235 Const SDLK_WORLD_76 = 236 Const SDLK_WORLD_77 = 237 Const SDLK_WORLD_78 = 238 Const SDLK_WORLD_79 = 239 Const SDLK_WORLD_80 = 240 Const SDLK_WORLD_81 = 241 Const SDLK_WORLD_82 = 242 Const SDLK_WORLD_83 = 243 Const SDLK_WORLD_84 = 244 Const SDLK_WORLD_85 = 245 Const SDLK_WORLD_86 = 246 Const SDLK_WORLD_87 = 247 Const SDLK_WORLD_88 = 248 Const SDLK_WORLD_89 = 249 Const SDLK_WORLD_90 = 250 Const SDLK_WORLD_91 = 251 Const SDLK_WORLD_92 = 252 Const SDLK_WORLD_93 = 253 Const SDLK_WORLD_94 = 254 Const SDLK_WORLD_95 = 255 ' $FF ' Numeric keypad Const SDLK_KP0 = 256 Const SDLK_KP1 = 257 Const SDLK_KP2 = 258 Const SDLK_KP3 = 259 Const SDLK_KP4 = 260 Const SDLK_KP5 = 261 Const SDLK_KP6 = 262 Const SDLK_KP7 = 263 Const SDLK_KP8 = 264 Const SDLK_KP9 = 265 Const SDLK_KP_PERIOD = 266 Const SDLK_KP_DIVIDE = 267 Const SDLK_KP_MULTIPLY = 268 Const SDLK_KP_MINUS = 269 Const SDLK_KP_PLUS = 270 Const SDLK_KP_ENTER = 271 Const SDLK_KP_EQUALS = 272 ' Arrows + Home/End pad Const SDLK_UP = 273 Const SDLK_DOWN = 274 Const SDLK_RIGHT = 275 Const SDLK_LEFT = 276 Const SDLK_INSERT = 277 Const SDLK_HOME = 278 Const SDLK_END = 279 Const SDLK_PAGEUP = 280 Const SDLK_PAGEDOWN = 281 ' Function keys Const SDLK_F1 = 282 Const SDLK_F2 = 283 Const SDLK_F3 = 284 Const SDLK_F4 = 285 Const SDLK_F5 = 286 Const SDLK_F6 = 287 Const SDLK_F7 = 288 Const SDLK_F8 = 289 Const SDLK_F9 = 290 Const SDLK_F10 = 291 Const SDLK_F11 = 292 Const SDLK_F12 = 293 Const SDLK_F13 = 294 Const SDLK_F14 = 295 Const SDLK_F15 = 296 ' Key state modifier keys Const SDLK_NUMLOCK = 300 Const SDLK_CAPSLOCK = 301 Const SDLK_SCROLLOCK = 302 Const SDLK_RSHIFT = 303 Const SDLK_LSHIFT = 304 Const SDLK_RCTRL = 305 Const SDLK_LCTRL = 306 Const SDLK_RALT = 307 Const SDLK_LALT = 308 Const SDLK_RMETA = 309 Const SDLK_LMETA = 310 Const SDLK_LSUPER = 311 ' Left "Windows" key Const SDLK_RSUPER = 312 ' Right "Windows" key Const SDLK_MODE = 313 ' "Alt Gr" key Const SDLK_COMPOSE = 314 ' Multi-key compose key ' Miscellaneous function keys Const SDLK_HELP = 315 Const SDLK_PRINT = 316 Const SDLK_SYSREQ = 317 Const SDLK_BREAK = 318 Const SDLK_MENU = 319 Const SDLK_POWER = 320 ' Power Macintosh power key Const SDLK_EURO = 321 ' Some european keyboards Const SDLK_UNDO = 322 ' Atari keyboard has Undo Const SDLK_LAST = 323 Const KMOD_NONE = $0000 Const KMOD_LSHIFT= $0001 Const KMOD_RSHIFT= $0002 Const KMOD_LCTRL = $0040 Const KMOD_RCTRL = $0080 Const KMOD_LALT = $0100 Const KMOD_RALT = $0200 Const KMOD_LMETA = $0400 Const KMOD_RMETA = $0800 Const KMOD_NUM = $1000 Const KMOD_CAPS = $2000 Const KMOD_MODE = $4000 Const KMOD_RESERVED = $8000 Const KMOD_CTRL = KMOD_LCTRL|KMOD_RCTRL Const KMOD_SHIFT = KMOD_LSHIFT|KMOD_RSHIFT Const KMOD_ALT = KMOD_LALT|KMOD_RALT Const KMOD_META = KMOD_LMETA|KMOD_RMETA Const SDL_BUTTON_LEFT = 1 Const SDL_BUTTON_MIDDLE = 2 Const SDL_BUTTON_RIGHT = 3 Const SDL_BUTTON_WHEELUP = 4 Const SDL_BUTTON_WHEELDOWN = 5 Extern "C" Function SDL_Init(flags:Int) Function SDL_InitSubSystem(flags:Int) Function SDL_QuitSubSystem(flags:Int) Function SDL_Quit() Function SDL_WasInit:Int(flags:Int) Function SDL_GetError:Byte Ptr() Function SDL_GetVideoSurface:Byte Ptr() End Extern Type SDL_Surface Field flags:Int Field format:Byte Ptr Field w:Int,h:Int Field pitch@@ Field pixels:Byte Ptr Field clip_rect:Byte Ptr Field refCount:Int End Type Type SDL_Rect Field x@@,y@@ Field w@@,h@@ End Type Type SDL_Color Field r@,g@,b@,unused@ End Type Type SDL_Palette Field ncolors:Int Field colors:Byte Ptr End Type Type SDL_PixelFormat Field palette:Byte Ptr Field BitsPerPixel@ Field BytesPerPixel@ Field Rmask:Int,Gmask:Int,Bmask:Int,Amask:Int Field Rshift@,Gshift@,Bshift@,Ashift@ Field Rloss@,Gloss@,Bloss@,Aloss@ Field colorkey:Int Field alpha@ End Type Type SDL_VideoInfo Field hw_available Field wm_available Field blit_hw Field blit_hw_CC Field blit_hw_A Field blit_sw Field blit_sw_CC Field blit_sw_A Field blit_fill Field video_mem Field vfmt:Byte Ptr End Type Type SDL_Overlay Field format Field w,h Field planes Field pitches:Short Ptr Field pixels:Byte Ptr Field hw_overlay End Type Type SDL_AudioSpec Field freq:Int Field format:Short Field channels:Byte Field Silence:Byte Field Samples:Short Field Padding:Short Field Size:Int Field callback(userdata:Byte Ptr, stream:Byte Ptr, length:Int) Field userdata:Byte Ptr End Type Type SDL_AudioCVT Field needed:Int Field src_format@@ Field dst_format@@ Field rate_incr! Field buf:Byte Ptr Field length:Int Field len_cvt:Int Field len_mult:Int Field len_ratio! Field filters(cvt:Byte Ptr, format@@)[10] End Type Type SDL_CDtrack Field id@,type@,unused@@,length,offset End Type Type SDL_CD Field id,status,numtracks,cur_track,cur_frame Field track:SDL_CDtrack[100] End Type Type SDL_ActiveEvent Field _type@,gain@,state@ End Type Type SDL_KeyboardEvent Field _type@,which@,state@ Field keysym:Byte Ptr End Type Type SDL_MouseMotionEvent Field _type@,which@,state@,x@@,y@@,xrel@@,yrel@@ End Type Type SDL_MouseButtonEvent Field _type@,which@,button@,state@,x@@,y@@ End Type Type SDL_JoyAxisEvent Field _type@,which@,axis@,x@@,y@@ End Type Type SDL_JoyBallEvent Field _type@,which@,ball@,x@@,y@@ End Type Type SDL_JoyHatEvent Field _type@,which@,hat@,value@ End Type Type SDL_JoyButtonEvent Field _type@,which@,button@,state@ End Type Type SDL_ResizeEvent Field _type@,w,h End Type Type SDL_ExposeEvent Field _type@ End Type Type SDL_QuitEvent Field _type@ End Type Type SDL_UserEvent Field _type@ Field code Field data1:Byte Ptr Field data2:Byte Ptr End Type Type SDL_Event Field _type@ Field active:SDL_ActiveEvent Field key:SDL_KeyboardEvent Field motion:SDL_MouseMotionEvent Field button:SDL_MouseButtonEvent Field jaxin:SDL_JoyAxisEvent Field jball:SDL_JoyBallEvent Field jhat:SDL_JoyHatEvent Field jbutton:SDL_JoyButtonEvent Field resize:SDL_ResizeEvent Field expose:SDL_ExposeEvent Field quit:SDL_QuitEvent Field user:SDL_UserEvent Field syswm:Byte Ptr End Type Type SDL_Cursor Field area:Byte Ptr,hot_x@@,hot_y@@,data:Byte Ptr,mask:Byte Ptr,save:Byte Ptr[2],wm_cursor:Byte Ptr End Type Type WMcursor Abstract End Type
And here's some alternative code - linking to a DLL but I don't know where to go from here as there isn't much documentation on this (thanks to Sarge on IRC):
global lib = LoadLibraryA("SDL.dll") Extern... End Extern...
The goal is to do all the software rendering externs and calls so we can with ease, fall back to SDL software rendering (bmax provides the hardware rendering).
To this end we might need SDL's mouse handling if it has it, and the rect class as it's animated surfaces require that.
I look forwards to your replies and any help you can give towards this open source blitzmax project. I will share everything I learn from it with you all, so all may benefit. Lets grow blitzmax beyond by working as a team!
Your contributions are valued and greatly appreciated.
