c C: Get reference to parent struct from within nested struct That title sound a bit confusing so here an example: typedef struct { int x; int y; } point; typedef struct { int width; int height; point topLeft; } rectangle; Taking this example: If you got a pointer on a point-struct 'topleft' but don't know about the struct
Gameboy Advance Setup retro-platform-jam 5 is about to start and I think I will give GameBoyAdvanced a try. Not sure I will finish something due to the RoomGame and the NetworkGame need some love. But I could use it to write a new renderer for RoomGame. Ok,
Playstation1 GameJam Here a video of my beloved game made for 'retro gamejam': PS: Downloads via itch.io
C# Memory-Alignment EDIT: You can ignore most of the stuff written here. Rule of thumb. Classes will out of the box arrange the data-structures as good as possible, structs build their data-structure (JIT-wise) as the code tells if not [StructLayout(LayoutKind.Auto)] is set. The rest
Batch-Resize Images(Linux) Keeps aspect ratio find . -iname '*.png' -exec convert \{} -verbose -set filename:base "%[basename]" -resize 64x64 "./64x64/%[filename:base].png" \;`` Forces size: find . -iname '*.png' -exec convert \{} -verbose -set filename:base "%[basename]" -resize "64x64!" "
dotnet publish: specify RuntimeIdentifier Ever came across this error on publishing a dotnet project that includes libs of your own: error NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set PublishSingleFile to false.
urho3d Build Urho3D for special chipset I had the problem that I tried to run urho3d-headless on our server for a small game-instance-server-test but got some 'illegal chipset' core dump-mayham. Our server is quite of age. Good that Urho has some options for this out of the box. There is
Visual Studio Code: c# omnisharp crashing Quick tip: If you are using c# in vs code and for some reason the c# language server omnisharp crashes (e.g. you are running/debugging test-cases (in my case xunit)) fastest way to get going again (also with Test to be triggered from
git git: fixing lfs push looping with error 413 Just stumpled over a problem that I wanted to push a large file (400+mb) as part of a commit into our remote-repository but git ended up continuosly pushing 400+mb and then starting over without any progress. The long story short without knowing
qt-creator qtCreator: debugging not working anymore? All of a sudden (I guess after upgrading lots of libs in archlinux) qtCreator's (at the moment 4.15) debugging stopped working. I tested with gdb manually. Symbols were there and everything looked(!) fine. BUT not a single breakpoint was hit, and manully breaking
linux Route traffic through ssh-tunnel Install tun2socks Create interface: sudo ip tuntap add dev tun0 mode tun user <someuser> sudo ifconfig tun0 10.0.0.1 netmask 255.255.255.0 bind connection: badvpn-tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr
entt EnTT-(de)serialization with nlohmann::json Again playing with EnTT (ECS) which has a builtin mechanism that helps you (de)serialize a registry. You have to implement an 'archive' that (de)serializes the data. Here in
zproject zproject(part3): generate bindings After part1(getting started) and part2(looking at generated code) now its time to generate bindings, but before that let's generate a Docker-Image that will create a docker-image with this
zproject zproject(part 2): the generated files In the first part we saw how to create and build a zproject and in this part we will have a look at the code that is actually generated and
zproject zproject(part1): getting started ZProject is a project skeleton generator that helps you create c-APIs and generate multiple build-targets(cmake,autotools,..) with multiple scripting-language-bindings(python,lua,...) . The single source of truth is that project.
ghost ghost cms: get code highlighting to work If you have (like me) problems to get code-highlighting to work, here is my setup that works good enough for me. I actually use the first 'prism'-way but also added a 'highlight.js'-way. Go to the backend > code injection: Prism: header: <link
cpp use nlohmann::json for serialization Here some samples of how to use nlohmann::json for (de)serialization Define a struct following macro in it: NLOHMANN_DEFINE_TYPE_INTRUSIVE(Struct-name, member1, member2,...)This will add everything
ggj ggj'21: Solt dan Fundo I attended this years (online) global game jam('Headup Remote Jam 2021'). As always I want to use this weekend to kick myself in the butt to finish something in
Mate Linux: alt+tab problems Lately I experienced problems using alt+tab for switching between applications in manjaro-linux using mate-desktop. The problem seems to be the little thumbsnails showing a current preview of the specific application. To get rid of the problem: Pererences > WindowsUncheck 'Enable software compositing window
wasp-os: flash dfu via manjaro-linux At the moment I'm playing a bit with my pinetime smartwatch(es) and want to try wasp-os (python based development). I could flash the bootloader as described in the documentation
qt-creator qtCreator: strange debugging behaviour? My cpp-ide of choice is qtCreator. But lately I stumbled over a strange debugging behaviour where the debugger was triggered by some breakpoint unrelated SIGSTOPS right into the assembly. The easy fix to get around that is to uncheck "Run in terminal". I'm not
linux vim: deactivate visualmode Some linux distributions have vim's visualmode automatically been activated on mouse interaction. If you want to get rid of this: touch ~/.vimrc echo "set mouse-=a" > ~/.vimrc source ~/.vimrcSource: https://gist.github.com/u0d7i/01f78999feff1e2a8361#gistcomment-2698694
gimp Gimp-Quicktip: Show all tool-icons Just wanted to work with gimp and was wandering where the scale-tool went to? Well, I already thought that rotate/scale&co are hidden under some of those visible
blender Blender: installing pip module from within python Since some time the pip module is already installed in blender's python-distro. As I'm using pyzmq in my Urho3D-Blender exporter to have live-preview this is good news. Urho3D Renderer in
zeromq NetMQ in Unity3D Just started to play around with ZeroMQ in Unity3D using the pure C# implentation NetMQ, but I stumpled over this exception when binding the server: SocketException: The operation completed successfully.You can prevent this by just running following command on startup: AsyncIO.ForceDotNet.Force(