- Comencem a treballar en les habitacions
This commit is contained in:
46
source/room.cpp
Normal file
46
source/room.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "room.h"
|
||||
#include "jdraw.h"
|
||||
|
||||
namespace room
|
||||
{
|
||||
static vec3_t size = {8,8,8};
|
||||
static vec3_t tmin = {0,0,0};
|
||||
static vec3_t tmax = {7,7,7};
|
||||
static vec3_t min = {0,0,0};
|
||||
static vec3_t max = {56,56,56};
|
||||
|
||||
void load(int x, int y)
|
||||
{
|
||||
size = {(x+1)*2,(y+1)*2,3};
|
||||
tmin = {3-x,3-y,0};
|
||||
tmax = {4+x,4+y,3};
|
||||
min = {tmin.x*8,tmin.y*8,0};
|
||||
max = {tmax.x*8,tmax.y*8,24};
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
for (int y=tmin.y;y<=tmax.y;++y)
|
||||
{
|
||||
for (int x=tmin.x;x<=tmax.x;++x)
|
||||
{
|
||||
draw::draw(148+x*16-y*16,76+x*8+y*8,32,15,0,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vec3_t getSize()
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
vec3_t getMin()
|
||||
{
|
||||
return min;
|
||||
}
|
||||
|
||||
vec3_t getMax()
|
||||
{
|
||||
return max;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user