taisei/src/resource/texture.h

36 lines
1.1 KiB
C
Raw Permalink Normal View History

/*
* This software is licensed under the terms of the MIT License.
* See COPYING for further information.
* ---
2024-05-16 23:30:41 +02:00
* Copyright (c) 2011-2024, Lukas Weber <laochailan@web.de>.
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
*/
#pragma once
#include "taisei.h"
#include "resource.h"
#include "util/geometry.h"
2011-12-25 08:18:03 +01:00
typedef struct Texture Texture;
void begin_draw_texture(FloatRect dest, FloatRect frag, Texture *tex);
void end_draw_texture(void);
void fill_viewport(float xoff, float yoff, float ratio, const char *name);
void fill_viewport_p(float xoff, float yoff, float ratio, float aspect, float angle, Texture *tex);
void fill_screen(const char *name);
void fill_screen_p(Texture *tex);
2011-11-01 21:20:40 +01:00
void loop_tex_line_p(cmplx a, cmplx b, float w, float t, Texture *texture);
void loop_tex_line(cmplx a, cmplx b, float w, float t, const char *texture);
2017-03-25 09:22:45 +01:00
extern ResourceHandler texture_res_handler;
2017-04-18 21:48:18 +02:00
#define TEX_PATH_PREFIX "res/gfx/"
#define TEX_EXTENSION ".tex"
DEFINE_RESOURCE_GETTER(Texture, res_texture, RES_TEXTURE)
DEFINE_OPTIONAL_RESOURCE_GETTER(Texture, res_texture_optional, RES_TEXTURE)