23 Commits

Author SHA1 Message Date
sheldonmlee 5a51a375a4 Initialize camera resolution from VIEW_SIZE constant 2024-01-15 18:33:22 +08:00
sheldonmlee 22cd090f92 Implement basic shading and colors.
CameraRay struct now stores information about tile intersection.
2023-05-01 00:10:01 +01:00
sheldonmlee 67c41106ff Fix fisheye effect with cosine 2023-04-30 22:47:45 +01:00
sheldonmlee 4a9d85ba1c Implement basic first person view rendering. 2023-04-20 02:21:21 +01:00
sheldonmlee d186b948a7 Update and make level bigger 2023-04-20 02:21:11 +01:00
sheldonmlee 900504971b Make ray generation sane 2023-04-20 02:19:54 +01:00
sheldonmlee 787b25239e Add first person view. 2023-04-20 00:31:41 +01:00
sheldonmlee 2c06859473 Refactor storing of ray-casted distances.
The ray-casting is done when camera_update() is called, and distances
are stored in the Camera struct.
2023-04-20 00:28:17 +01:00
sheldonmlee 33f673741b Remove draw scale from Camera struct. 2023-04-16 02:43:05 +01:00
sheldonmlee bce640219f Refactor 2D map drawing.
2D level represntation now drawn as minimap in it's own texture.
2023-04-16 02:17:11 +01:00
sheldonmlee 0acfb6e0a9 Ignore ctags files 2023-04-11 05:13:20 +01:00
sheldonmlee ccfe9fd786 Ray casting now working 2023-04-07 05:34:22 +01:00
sheldonmlee 3402fb50d9 Implment getting horizontal/vertical intesections of ray casting. 2023-04-04 20:02:49 +01:00
sheldonmlee ca50b6f4b7 Draw rays from camera and call ray casting stub function. 2023-04-02 01:21:02 +01:00
sheldonmlee f1cb03bc22 Make now runs ctags -R 2023-04-02 01:20:41 +01:00
sheldonmlee 0cd0d410a1 Add camera movement 2023-04-02 00:41:32 +01:00
sheldonmlee 15c3fe7604 Update level drawing 2023-04-02 00:41:16 +01:00
sheldonmlee 73412b27f8 Add basic camera representation 2023-04-01 00:16:14 +01:00
sheldonmlee 35ba580398 Update makefile 2023-04-01 00:15:53 +01:00
sheldonmlee dd703c3221 Some refactoring 2023-03-31 22:56:26 +01:00
sheldonmlee fe02b79946 Create basic level grid representation. 2023-03-31 01:08:02 +01:00
sheldonmlee b9470696f6 Separate drawing out to view.cpp 2023-03-30 23:49:36 +01:00
sheldonmlee dbb69dd80e Initial commit 2023-03-30 23:36:54 +01:00