Crazy Star posted on February 21, 2019 at 9:07 PM

String blog


#include "ggs_string.h"
namespace G
  String::String() :
    c_str = "";
    n = 1;
    is_loaded = false;
  String::String( const char* s ) :
    c_str = s;
    n = 0;
    while( s[n] ) ++n;
  const char* get( String s )
    if( !s.is_loaded ) return s.c_str;
    const char* c = (const char*);
    return c;
  String operator+(const String& a, const String& b)
    if( !a.n ) return b;
    if( !b.n ) return a;
    String c;
    u32 n = a.n + b.n - 1;
    if( add( &, n ) )
      s8* concat = + a.n;
      u32 i, j = a.n-1;
      for( i=0; i<j; ++i )[i] = (s8)(a.c_str[i]);
      for( i=0; i<b.n; ++i )[j+i] = (s8)(b.c_str[i]);
      c.is_loaded = true;
      c.n = n;
      c.c_str = (const char*);
    return c;
  String& operator+=( String& a, const String& b)
    return a = a + b;

#include "../Memory/ggs_dynamic_list.h"
namespace G
  struct String
    const char* c_str;
    List<s8> data;
    b32 is_loaded;
    u32 n;
    String( const char* s );
  const char* get( String s );
  String operator+(const String& a, const String& b);
  String& operator+=( String& a, const String& b);

Crazy Star posted on August 24, 2018 at 11:09 PM

Heya I'm Making Something

My OpenGL testbed turned into a renderer that can actually draw various shapes, which I'm starting to turn into a UI so that I can create a level editor for games :D
The FPS counter is totally broken LoL, or maybe it's LICEcap (my gif capture thing).
The backdrop is a nice sunset aint it pretty.
Then have a layer of chinese dragon aka bunch of sprites that are quite very animated. ( 8 directional walk / dance sequence )
Um then comes a layer of grass grid in 3D.... clickable.
And then tadaa the UI which isn't much yet tbh ^^
I have code if I should post some....

Crazy Star posted on March 27, 2018 at 1:46 PM

I believe now is the time to start a devlog

(copied from here: )

So here it is, the first entry for my ScaleUI devlog. I started this project right around Nov/Dec last year and decided not to publish it before it was at least useful. Actually, I've put a ton of work into this and just haven't posted it anywhere.

Complexity Overload One of the reasons was that I got a little crazy with rotating/scaling transforms, polygonal edges and masks. These complicated features made progress pretty slow because every time I worked on it some new bugs and problems I hadn't anticipated came up. GMS2 hasn't got the best routines for handling matrices so I had to write those myself too, and I'm not an expert on that.

Revamp and ugly skins I since decided to get rid of all that and just stick to the bare bones skeleton I had written, and which worked pretty well. Now progress is far more smooth, and I have implementing tabs/splitter containers as well as begun making skins. It sure ain't pretty though! If you want, you can leave a comment with feature requests or decoration tips :)

Upcoming features[/b]
I'm planning to improve the program flow with "dirty rectangles" and whatnot. As of now many elements has an update event and are redrawn over and over which is hardly what you'd expect from a GUI.

Right now skinning works by setting a default color (eg. Silver), and mixing others colors with that. What I'd really like would be to have a form of extension to the build in drawing routines which better handles gradients on arbitrary shapes.

Aside from standard controls like buttons and input fields, I'll probably also have to create menus before releasing the first demo. I actually already made menus, but had to delete them again at a point because they weren't "polygonal" =)

Thanks for reading, following, liking etc.

You can always follow progress on the GitHub repository here:
Also, if you're on the YYG forum, feel free to participate in the thread there: