Hi,
In day 33, at the end of the stream Casey does the following to compute `row` and `column` in the nested loop to draw the tiles:
| uint32_t column = rel_column + gameState->player_p.abs_tile_x;
uint32_t row = rel_row + gameState->player_p.abs_tile_y;
|
Here, `rel_column` and `rel_row` are signed and can be negative while the player's tile coords are unsigned integers.
The problem I am facing is that column and row get computed as garbage values because their type is unsigned but the expression on the right hand side evaluates to a signed value. As a result the assert in `get_tile_value_unchecked` breaks the program.
This is a problem that I am having with code that I typed and Casey's code on the stream seems to working fine. So, it would be great if someone could help me understand what I might have missed.