Pick back up and comment
Clean placeholder code to get it running. Add comments to clarify working, add TODOs in main, add some references for the maths.
This commit is contained in:
parent
59939d182b
commit
c7384ba9ba
3 changed files with 34 additions and 4 deletions
7
World.h
7
World.h
|
@ -43,6 +43,13 @@ private:
|
|||
sf::Color ceilingColor;
|
||||
|
||||
void fillColumn(sf::RenderWindow&, int column, float scale, sf::Color wallColor = sf::Color(127,127,127)) const;
|
||||
/**
|
||||
* Cast a ray from a given position and return the on-screen scale.
|
||||
* @param originX Ray X origin
|
||||
* @param originY Ray Y origin
|
||||
* @param orientation Angle to cast to, in degrees
|
||||
* @return Scale on the screen of the hit wall.
|
||||
*/
|
||||
float castRay(float originX, float originY, float orientation);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue