Skip to content

Fix size of minimap - #42

Merged
Melow-code merged 35 commits into
mainfrom
fix-size-of-minimap
Nov 18, 2026
Merged

Melow-code merged 35 commits into
mainfrom
fix-size-of-minimap

Conversation

@SailMasterG

Copy link
Copy Markdown
Collaborator

Fix for the size of minimap, color background, and center of line of direction

Refactor the minimap implementation to improve visual scaling and
rendering accuracy.

- Rename `calculate_tile` to `size_tile` for clarity.
- Implement dynamic tile sizing based on map width to prevent
  distortion.
- Add `draw_background_map` to provide a visual base for the minimap.
- Fix off-by-one errors in tile drawing loops and boundary checks.
- Update `select_color` to use defined gray constants and handle
  orientation characters.
- Add new gray color definitions to `colors.h`.
- Fix header metadata and include unused parameter warnings.
…ature

Refactor the minimap logic to ensure consistent scaling and improve
data passing between modules.

- Clamp `tile_size` between 3 and 12 to prevent extreme scaling issues.
- Update `draw_minimap_player` to accept `t_minimap` pointer, allowing
  the player icon size to scale relative to the map tiles.
- Update function signatures in `inc/player.h` and `src/minimap/mini_map.c`
  to reflect the new parameter requirements.
- Fix minor header metadata and timestamp inconsistencies.
- Change `size` type to `float` in `draw_minimap_player` to improve scaling accuracy.
- Increase player icon scale factor from 0.5 to 0.7.
- Remove redundant `round()` calls in `mini_dir_player` for pixel coordinates.
- Update file header timestamp.
@Melow-code
Melow-code merged commit 8bf9b8d into main Nov 18, 2026
4 checks passed
@Melow-code
Melow-code deleted the fix-size-of-minimap branch November 18, 2026 13:54
@github-project-automation github-project-automation Bot moved this from Backlog to Done in CUB3D Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants