Skip to content

Fix the graphical rendering and introduce new features

Paulo Emil Khayat requested to merge touch into main

Created by: pauloalbert

This PR implements fixes to rendering buildings at different heights.

Additionally, the ray tracing has been revamped. The new version runs one for loop and has two rays competing to hit a wall. if one hits a wall, and the other hasn't found a shorter one, return it.

There are several other syntax changes as-well; buildings are now Building unions. https://github.com/pauloalbert/swinging/blob/ddf055b37b812e3c419f785ea488aa981333047f/source/Map.h#L42-L51

This allows you to do things like this:

Building b = {0x1023};
// color takes up the top 4 bits! (currently 0001)
b.color = 5;
printf("%x\n",b.u16);    //0x5023

Merge request reports