Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
textures.h File Reference
#include "graphics.h"
#include "map.h"

Go to the source code of this file.

Functions

void load_textures (void)
 
int get_texture_size (void)
 
rgb_t get_texture_pixel (const structures_t structure, const trc_world_position_t pixel_pos)
 
rgb_t apply_shade (const rgb_t original_pixel, const float shade)
 

Function Documentation

◆ apply_shade()

rgb_t apply_shade ( const rgb_t  original_pixel,
const float  shade 
)

Given an RGB and a shade, returns the same pixel but modified with the shade

◆ get_texture_pixel()

rgb_t get_texture_pixel ( const structures_t  structure,
const trc_world_position_t  pixel_pos 
)

Given an structure and a texture position, it returns the RGB info of the pixel in that position

◆ get_texture_size()

int get_texture_size ( void  )

Returns the size of the textures being used

Note
All the textures are square, so it only returns the length of one side

◆ load_textures()

void load_textures ( void  )

Loads the textures into engine structures (for faster performance)