rustenstein
rustenstein copied to clipboard
Display scaled sprites of static objects
- load a list of static objects from the map into the game (this is necessary because it can change: items dropped or picked up) (spotvis in wolf4sdl)
- object should have both view xy and tile xy
- update raycaster to mark all visible tiles in a boolean matrix
- for each static object:
- check if is visible from raycaster output matrix
- if it is, calculate height based on distance to player (TransformTile in wolf4sdl)
- port ScaleShape (similar to already ported simple_scale_shape)
- pass ray hits to get wall heights (aka occlusion array)
- only draw a given pixel column when sprite height > wall height at that x coordinate