Teleporters are now animation, updated elevators

This commit is contained in:
KikooDX 2020-05-15 18:46:38 +02:00
parent ce115178b5
commit bae45f36ce
36 changed files with 7 additions and 3 deletions

BIN
JTMM.g3a

Binary file not shown.

View File

@ -20,9 +20,9 @@ extern image_t img_red_dot; //off red bloc texture, 16x16
extern image_t img_exit; //exit texture, 16x16
extern image_t img_water; //water texture, 16x16
extern image_t img_semi_solid; //semi solid texture, 16x16
//animated textures (elevator)
extern image_t img_teleporter_0; //teleporter 0 texture, 16x16
extern image_t img_teleporter_1; //teleporter 1 texture, 16x16
//animated textures (elevator)
extern image_t img_elevator;
void draw_player(int x, int y)
@ -34,6 +34,8 @@ void draw_level(char level[], unsigned int step, char polarity, int *start_x,
int *start_y, int tp_positions[])
{
int const img_elevator_frame_count = img_elevator.width / 16;
int const img_teleporter_0_frame_count = img_teleporter_0.width / 16;
int const img_teleporter_1_frame_count = img_teleporter_1.width / 16;
dclear(BG_COLOR);
unsigned int i = 0;
unsigned int x = 0;
@ -85,12 +87,14 @@ int *start_y, int tp_positions[])
dimage(x + DRAW_OFFSET_X, y + DRAW_OFFSET_Y, &img_water);
break;
case 't': //teleporter 0
dimage(x + DRAW_OFFSET_X, y + DRAW_OFFSET_Y, &img_teleporter_0);
dsubimage(x + DRAW_OFFSET_X, y + DRAW_OFFSET_Y, &img_teleporter_0,
(step % img_teleporter_0_frame_count) * 16, 0, 16, 16, DIMAGE_NONE);
tp_positions[0] = x + 2;
tp_positions[1] = y + 2;
break;
case 'T': //teleporter 1
dimage(x + DRAW_OFFSET_X, y + DRAW_OFFSET_Y, &img_teleporter_1);
dsubimage(x + DRAW_OFFSET_X, y + DRAW_OFFSET_Y, &img_teleporter_1,
(step % img_teleporter_1_frame_count) * 16, 0, 16, 16, DIMAGE_NONE);
tp_positions[2] = x + 2;
tp_positions[3] = y + 2;
break;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B