Compare commits
2 Commits
12674cc1a6
...
5e2105cfeb
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e2105cfeb | |||
| cd44dceb6b |
BIN
data/doors.gif
BIN
data/doors.gif
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -4,22 +4,12 @@ door-height-xp: 0
|
|||||||
door-height-xn: 0
|
door-height-xn: 0
|
||||||
color: PURPLE
|
color: PURPLE
|
||||||
floor-texture: 0
|
floor-texture: 0
|
||||||
wall-texture: 1
|
wall-texture: 14
|
||||||
door-texture: 3
|
door-texture: 2
|
||||||
under-door-texture: 0
|
under-door-texture: 0
|
||||||
exit-xn: 8
|
exit-xn: 8
|
||||||
exit-zn: 6
|
exit-zn: 6
|
||||||
|
|
||||||
actor{
|
|
||||||
name: FINESTRA
|
|
||||||
bmp: altres.gif
|
|
||||||
bmp-rect: 48 76 18 32
|
|
||||||
bmp-offset: 0 39
|
|
||||||
pos: 0 9 6
|
|
||||||
size: 1 1 9
|
|
||||||
movement: CW
|
|
||||||
}
|
|
||||||
|
|
||||||
actor{
|
actor{
|
||||||
name: LIFT
|
name: LIFT
|
||||||
bmp: caixes.gif
|
bmp: caixes.gif
|
||||||
@@ -31,3 +21,13 @@ actor{
|
|||||||
flags: MOVING
|
flags: MOVING
|
||||||
movement: Z
|
movement: Z
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: FINESTRA
|
||||||
|
bmp: altres.gif
|
||||||
|
bmp-rect: 48 76 18 32
|
||||||
|
bmp-offset: 0 39
|
||||||
|
pos: 0 9 6
|
||||||
|
size: 1 1 9
|
||||||
|
movement: CW
|
||||||
|
}
|
||||||
|
|||||||
@@ -255,6 +255,20 @@ namespace draw
|
|||||||
managed[num_managed++] = surf;
|
managed[num_managed++] = surf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reloadSurface(surface *surf)
|
||||||
|
{
|
||||||
|
free(surf->pixels);
|
||||||
|
int size;
|
||||||
|
uint8_t *buffer = (uint8_t *)file::getFileBuffer(surf->filename, size);
|
||||||
|
surf->pixels = LoadGif(buffer, &surf->w, &surf->h);
|
||||||
|
free(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void reloadAll()
|
||||||
|
{
|
||||||
|
for (int i=0; i<num_managed; ++i) reloadSurface(managed[i]);
|
||||||
|
}
|
||||||
|
|
||||||
surface *getSurface(const std::string &filename)
|
surface *getSurface(const std::string &filename)
|
||||||
{
|
{
|
||||||
for(int i=0; i<num_managed; ++i)
|
for(int i=0; i<num_managed; ++i)
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ namespace draw
|
|||||||
/// @return un punter a una nova superficie
|
/// @return un punter a una nova superficie
|
||||||
/// ATENCIÓ: EN THEPOOL AÇÒ VAL PER A LA CÀRREGA INCIAL DE TOTS ELS GIFs
|
/// ATENCIÓ: EN THEPOOL AÇÒ VAL PER A LA CÀRREGA INCIAL DE TOTS ELS GIFs
|
||||||
void loadSurface(const std::string &filename);
|
void loadSurface(const std::string &filename);
|
||||||
|
void reloadSurface(surface *surf);
|
||||||
|
void reloadAll();
|
||||||
|
|
||||||
surface *getSurface(const std::string &filename);
|
surface *getSurface(const std::string &filename);
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,10 @@ bool game::loop()
|
|||||||
file::setConfigValue("fullscreen", fullscreen?"yes":"no");
|
file::setConfigValue("fullscreen", fullscreen?"yes":"no");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (input::keyPressed(SDL_SCANCODE_F12)) {
|
||||||
|
draw::reloadAll();
|
||||||
|
}
|
||||||
|
|
||||||
int option;
|
int option;
|
||||||
switch(current_module)
|
switch(current_module)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user