I don't quite understand the code at line 418 in handmade.cpp:
1
2
3
4
5
6
7
8
9
10
11
12 | uint32 StartTileX = OldPlayerP.AbsTileX;
uint32 StartTileY = OldPlayerP.AbsTileY;
uint32 EndTileX = NewPlayerP.AbsTileX;
uint32 EndTileY = NewPlayerP.AbsTileY;
if(EndTileY > StartTileY)
{
int x = 4;
}
int32 DeltaX = SignOf(EndTileX - StartTileX);
int32 DeltaY = SignOf(EndTileY - StartTileY);
|
We seem to be testing the sign of the result of an operation between two unsigned values...
Surely this will always be positive?
Are we just missing a cast?