added texture for TP blocks

This commit is contained in:
Alexandre 2025-02-20 14:51:53 +01:00
parent 5a2f68c741
commit e0acddbdc5
9 changed files with 7 additions and 5 deletions

BIN
bin/back

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
res/exclamation_block.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -373,9 +373,9 @@ void project_to_cube(double x0, double y0, double z0, double* rx, double* ry, do
double z = z0 - (c->z + c->d/2.0);
// rotate (y)
double xry = x*cos(c->hz_angle) + z*sin(c->hz_angle);
double xry = x*cos(c->hz_angle) - z*sin(c->hz_angle);
double yry = y;
double zry = z*cos(c->hz_angle) - x*sin(c->hz_angle);
double zry = z*cos(c->hz_angle) + x*sin(c->hz_angle);
// rotate (x)
if(rx != NULL) {*rx = c->x + c->w/2.0 + xry;}

View File

@ -90,7 +90,7 @@ void init_ent_generator(int n) {
hashtbl_entities[6].onDeath = NULL;
hashtbl_entities[7].id = 7;
hashtbl_entities[7].tex = 0;
hashtbl_entities[7].tex = 2;
hashtbl_entities[7].name = "WarpBox";
hashtbl_entities[7].updatePos = NULL;
hashtbl_entities[7].onHit = &pop_and_tp;

View File

@ -431,10 +431,12 @@ int main_alt() {
glEnableVertexAttribArray(1);
printf("-----------------------------------------------------------------------------------------------\n"); fflush(stdout);
// 16 max //
//generate_texture(0, "res/container.jpg", "jpg");
generate_texture(0, "res/white.png", PNG);
generate_texture(1, "res/question_block.png", PNG);
generate_texture(2, "res/exclamation_block.png", PNG);
printf("-----------------------------------------------------------------------------------------------\n"); fflush(stdout);

View File

@ -20,7 +20,7 @@ Entities :
[0.0, 8.0, 1.0, 0.5, 0.5, 0.5, 0.0, 0.0, 193, 192, 0, 1, 0, 0]
[0.0, 9.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 193, 192, 0, 1, 0, 0]
[0.0, 10.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 193, 192, 0, 1, 0, 0]
[-1.0, -5.0, -1.0, 2.0, 2.0, 2.0, 1.0, 0.0, 16, 16, 16, 1, 0, 7, templates/, 7, level passed, 192, 192, 192]
[-1.0, -5.0, -1.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 7, templates/, 7, level passed, 192, 192, 192]
Weight :
50