supercasiobros/src/level.c

41 lines
2.3 KiB
C

#include "level.h"
#include "world.h"
#include "mario.h"
#include <gint/display.h>
world_t level_0[]=
{
{EARTH,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {TUYAU, 0, 3, 0}, {TUYAU, 0, 2, 0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {TUYAU, 1, 3, 0}, {TUYAU, 1, 2, 0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,1,0}, {EARTH,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {BRICK,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,1,0}, {EARTH,1,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {GIFT,0,0,0}, {COIN,0,0,0}, {COIN,0,0,0},
{EARTH,1,1,0}, {EARTH,2,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {BRICK,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,1,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},
{EARTH,2,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}
};
extern image_t img_lvl0;
#define LVL_0_X 12
#define LVL_0_Y 8
#define LVL_0_MARIOX 11
#define LVL_0_MARIOY 16
void set_level(int n)
{
if (n==0)
{
w_current=&level_0;
w_fond=&img_lvl0;
w_current_x=LVL_0_X;
w_current_y=LVL_0_Y;
mario_x_max=0;
mario.p.x=LVL_0_MARIOX;
mario.p.y=LVL_0_MARIOY;
}
mario.p.vx=0;
mario.p.vy=0;
}