BambooBasic

Version History, and general rambling! ;)

v1_2Le

	- Added IGI, the Immediate Gizmo Interface, to Linux: the in-game GUI built on Dear ImGui
	  that the Windows and web editions got in 1.2e. Menus, HUDs, debug panels and editors drawn
	  over your game - call the igi functions every frame between drawing and b2dFlip (values go
	  in, new values come out: volume = igiSliderInt("Volume", volume, 0, 100)). All 90 igi
	  functions, the same as Windows: windows, buttons, sliders, text boxes, drop-downs, lists,
	  trees, tabs, menus, pop-ups, images, themes, every ImGui colour, roundings, sizes and your
	  own fonts. It looks the same as on Windows - same font, same colours, same blending - and
	  it is drawn after any screen shader, so a CRT effect bends the game but not the HUD.
	  See examples/Runtime/35 - IGI.
	- IGI's code editor works too: syntax colouring, line numbers, undo, marked lines with
	  tooltips, and copy and paste with the system clipboard. Languages are .lang files;
	  BambooBasic, C++, Lua, WGSL and HLSL come in userlibs/languages. IGI's fonts are built
	  into the runtime, so a program needs nothing extra beside it.
	- Fixed ToDouble / ToInt of a String array element (ToDouble(words[1])) not compiling, in
	  a Print as well as anywhere else.
	- Designer fixes: text with quotes or < > & in it saves and loads properly, nested submenus
	  survive being reopened, the generated onSelect handlers no longer call a missing Str(),
	  and the event dispatcher is kept up to date however your loop is indented.
	- BBR_INCLUDE.bam has the IGI constants (IGI_WINDOW_*, IGI_COL_*, IGI_STYLE_*) and is the
	  same file as the Windows edition's again.

v1_2Ld

	- MOVIES ARE IN LINUX BABY, and they are real video files now. b2dLoadMovie takes an .mp4, .mkv,
	  .webm and so on directly - the old .bbv format and its converter are gone. Same 16
	  calls as before (play, pause, resume, stop, loop, volume, draw, draw scaled), and the
	  picture keeps time with a real clock, so a slow frame skips rather than slowing the
	  film down. The soundtrack plays through the same audio engine as everything else.
	  On Linux the decoding is done by GStreamer, which comes with most desktops. If a movie
	  will not load, run scripts/deps-runtime.sh - it checks for the plugins that decode
	  video. Fedora and openSUSE users need RPM Fusion or Packman for most .mp4 files, as
	  they leave H.264 out of their official repositories.
	  See examples/Runtime/31 - Movies.
	- Added b2dLoadMesh(), which loads 3D models baked to .bb3d, animated ones included. The
	  runtime stores the model and blends its animation frames; your program turns and
	  projects the points and draws the faces, the 3D-in-2D way. b2dMeshAnimate will blend ANY
	  two frames, so if a model's animation clips are rubbish (some exporters make every clip
	  the whole animation) you can still loop just the frames you want. Models with no texture
	  carry their own face colours - b2dMeshFaceR/G/B. See examples/Runtime/30 - Meshes, and
	  docs/3d_in_2d.html.
	- Added b2dFreeMesh(), to free a loaded mesh (and its texture) when you're done with it.
	- b2dLoadMesh also rejects a .bb3d whose faces point at vertices that don't exist.
	- Mesh examples no longer draw the model tinted by the help text colour.
	- The IDE starts on glibc 2.38 again (Ubuntu 24.04, Debian 13). One maths call in the GLB
	  converter had quietly raised it to 2.43.
	- Added Tools -> GLB to .bb3d Mesh Converter to the IDE, to make those models. Point it at a
	  .glb, pick a folder and a name, and it writes the .bb3d plus the texture as a .png. Skeletal
	  animation is baked to frames at the rate you choose. Afterwards it offers a preview you can
	  scrub through frame by frame, which is the way to find out which frame numbers are which
	  movement when a model's clips are no help.
	- Added the AI Assistant (View -> AI Assistant, Ctrl+Shift+A): a chat window where Claude
	  answers questions about BambooBasic, explains your code, fixes build errors and, if you
	  let it, edits the files you attach. It looks things up in the docs and examples rather
	  than guessing. You need your own Anthropic API key, which is kept in your desktop's
	  keyring. Right-click in the editor and pick Ask AI about this to ask about a selection.
	  See docs/ai_assistant.html.
	- Added b2dDrawImageQuad(), which stretches an image over any four corners, and
	  b2dDrawImageQuadDepth(), the same with a depth per corner so textured faces hide each
	  other properly without sorting. The UV versions, b2dDrawImageQuadUV and
	  b2dDrawImageQuadDepthUV, let each corner show a chosen part of the image - atlases, or
	  a model's own texture mapping. See examples/Runtime/29 - Image Quads.
	- Debug builds of big programs compile MUCH faster. The debugger used to send every
	  global and constant after every single line, which made the generated code enormous
	  (27 MB for Anti-Tetrafied); it now sends them only when you are actually paused, which
	  took that down to 556 KB. As a bonus, globals now show in the variables panel while you
	  are paused inside a function too, not just in Main.
	- Fixed building a string with & that includes a function returning a number, like
	  s = "Score: " & GetScore(). It would not compile unless you Printed it directly. Same
	  for a plain number (s = "Lives: " & 3).
	- Fixed & inside a call's brackets in a Print - Print Shout("Hi " & name) turned the &
	  into a bitwise OR and did not compile. Print "x" & Chr(65) and Asc() work too now, and
	  so does joining two plain strings, s = "a" & "b".
	- A right-click in the editor now moves the cursor to where you clicked, so Go to
	  Definition works on the word you clicked rather than wherever the cursor was.
	- Fixed declarations with a * (pointer) parameter - they were quietly turned into a
	  broken "void" and failed to compile. b2dMeshCopyVertsX/Y/Z need it, to fill a whole
	  array in one call.
	- Dependency scripts know about GStreamer, and the docs cover all of the above: 404 of
	  404 functions documented.

v1_2Lc

	- THE BIG ONE: the 3D engine is gone, and everything that survived it is now b2d*.
	  b3dGraphics3D -> b2dGraphics, b3dCls3D -> b2dCls, b3dFlip3D -> b2dFlip,
	  b3dEnd -> b2dEnd, and the whole screen shader family (b3dLoadScreenShader,
	  b3dApplyScreenShader, b3dSetShaderFloat and friends) are b2d* too. Existing
	  programs need renaming - it is names only, the behaviour is unchanged.
	- Added b2dDrawQuad(), a four-cornered polygon given as four screen points, filled
	  or outlined. b2dDrawRect can only do axis-aligned boxes; this does the wonky ones,
	  which is what a projected 3D face or a pseudo-3D road actually is. No backface
	  culling - both windings draw, deliberately.
	- Added b2dSetDepth() and a real depth buffer, so 2D PRIMITIVES can be depth-tested
	  and drawn in any order. Images and text are never depth-tested, so a HUD still sits
	  on top the way it always did, and code that never calls it behaves exactly as before.
	- Added b2dDrawQuadDepth(), the same quad but with a depth per CORNER, interpolated
	  across the face. That is what lets two faces of the same solid intersect properly
	  instead of one popping through the other. One gotcha and it is yours, not the
	  runtime's: feed it PROJECTIVE depths of the form a + b/z, not raw view-Z, or a flat
	  face creases along its diagonal. See docs/3d_in_2d.html.
	- Added b2dSetClipRect() / b2dClearClipRect() - a 2D scissor. Affects primitives,
	  images AND text, applies only to draws made after the call, and is cleared at the
	  start of each frame so a forgotten one cannot leak into the next.
	- Added b2dGetFPS(), which the Windows side already had.
	- 2D images now get a full mipmap chain, so sprites stop shimmering when drawn small.
	  No API change. Sprite sheets and font atlases deliberately do NOT get one - a mip
	  level would average across the boundaries between frames or glyphs and bleed the
	  neighbours in.
	- Added b2dLoadTTF(), which loads a TrueType/OpenType font (.ttf/.otf) at a pixel size
	  you choose and hands back an ORDINARY font handle. b2dDrawText, b2dDrawTextEx,
	  b2dGetStringWidth/Height, b2dGetFontWidth/Height and b2dFreeFont all take it, so the
	  only line that changes in your program is the one that loads the font. Glyphs are
	  rasterised from the outlines on first use and cached, and text is now decoded as
	  UTF-8, so you get whatever the font actually contains rather than the 256 characters
	  a bitmap font can hold - accents, Greek, Chinese. b2dLoadFont and the bitmap path are
	  untouched, and existing programs render identically.
	  Two things that are deliberate rather than oversights: each size is its OWN
	  b2dLoadTTF call, because stretching one set of glyphs to another size is exactly what
	  makes text look mushy; and the glyph cache has a ceiling, so a program putting many
	  thousands of DIFFERENT characters on screen at once will eventually stop caching new
	  ones and leave gaps rather than slow down. Neither bites normal use.
	  See examples/Runtime/28 - TTF Fonts - TTFTest.bam to look at it, TTFCheck.bam to
	  check it (it prints the measurements and saves the frame it drew).
	- Fixed a nasty one in the mouse: the reported cursor position had become dead-reckoned
	  from movement events, so anything that happened while the pointer was off the window
	  was lost for good, and the clamp turned it into a ratchet - every trip off the window
	  left the position permanently further adrift. Symptom was menu buttons lighting up
	  while the cursor was somewhere else entirely. It now reads the real pointer unless
	  the program is driving the cursor itself (mouse-look), which is the only case that
	  needs dead reckoning.
	- Fixed mouse coordinates under fullscreen letterboxing - they were being handed over in
	  surface pixels as though they were your coordinate space, with no fit applied.
	  inpGetMouseX/Y and inpMoveMouse now both map through it.
	- Fixed sysUpdateEvents sampling the mouse BEFORE pumping the event queue, so every
	  reading was one pump out of date.
	- Fixed inpMoveMouse moving the OS pointer but not the reported cursor, so a program
	  that warped and read straight back got the old value for a frame.
	- Fixed the second-F1 detailed help lookup, which said "No documentation found" for most
	  of the runtime - it guessed the docs folder from the function name prefix and only
	  knew four of them. It now searches all the categories, so all 363 functions resolve.
	- Fixed folder links in the IDE's documentation (the Examples link on the index) doing
	  nothing on Linux - it shelled out to Windows Explorer. Now uses whatever file manager
	  the desktop provides.
	- Docs: pages for everything above, the 3D-in-2D guide, and the category indexes are
	  generated from what is on disk now, so they cannot drift. 363 of 363 documented.
	- make dist tidied up: no more stale manifests, no more files from the Windows share
	  arriving marked executable, and .linkflags is no longer shipped with this machine's
	  absolute paths baked into it.

v1_2L
	
	- Another one for the codgers amongst us; Palette Cycling & Indexed Colour functions (see docs)
	- Fixed a few editor loose ends
	- Fixed FileCopy bug that would always return 0, even if the file was copied successfully
	- Added "PreCalc" block, this runs at build time, inside the transpiler, and bakes its 
	  results into your program as an array literal. (See docs) 
	- Added "AutoCall", which calls a function once/every specified amount of milliseconds... Think
	  Amstrad CPC's software interrupt mechanism... Sorry, I had to do it! ;)
	- Added With...EndWith block, for adding data to type and element fields (syntax sugar really),
	  again, see docs.
	- Added string interpolation for string variables/objects fields e.g. 
		
		Local age:Int = 49
		Print "My age is {%age}"
		
		Output: My age is 49
		
	- Added "Sequence"'s, which are BambooBasic's version of proper list containers (See docs)
	- Added Elements, which can we used with Sequence lists (Like Types, but not, again, see docs) 
	- Hopefully fixed intergrated/discrete combo GPU device crashes (and stop Window
	  updates breaking settings), also, a fall back to WARP, so the app shouldnt die when opened
	  on less-spec'd machines, though, it will probably run like shit! :D

v1_1
	
	- Added "Experimental" web target
	- Fixed screen shader code as I had hardcoded values in them when testing with the CRT shader
	- Fixed mid-frame GPU buffer resizing when dynamically adding entities.
	- Transpiler fix, detects unclosed blocks (If, Select etc etc)
	- Fixed type iteration crash when removing objects from the internal list in a For Each loop
	- Fixed jsonGetArrayCount returning the wrong value.
	- Added b3dCenterMesh(), b3dOpenFileDialog(), b3dSaveFileDialog and b3dOpenFolderDialog.
	- Fixed b3dCountTriangles for GPU meshes
	- Fixed DXGI shutdown crash (Cheers Amon)
	- Fixed b3dLoadBRSFile() function in regards to rotation.

v1_0

	- Full release... To much to add since I added 3D (Windoews) stuff, but, this IS the baseline now!
