raycaster icon indicating copy to clipboard operation
raycaster copied to clipboard

Refactor IsWall into class Map

Open sammer1107 opened this issue 5 years ago • 2 comments

  • The refactor in #3 was not good enough, so I came up with another one. In this new refactor, raycaster only needs a reference to the Map object instead of the whole Game object. This still allows Game to use IsWall() from Map object, which can be used to implement wall collision.
  • Wrapping the map in a class also enable possible feature like switching map in the future.
  • some macro in raycaster.h are moved to other places to avoid circular include.

sammer1107 avatar Nov 12 '20 09:11 sammer1107

I defer to @RinHizakura .

jserv avatar Dec 19 '20 19:12 jserv

I have checked those commits and also applied them to execute for testing. To my knowledge, they could work as same as the codes we used before. The duplicates of IsWall() can be correctly removed by these changes.

RinHizakura avatar Dec 20 '20 11:12 RinHizakura