17 Commits

Author SHA1 Message Date
59ec0542a1 - [NEW] Afegit icono al executable de Windows 2024-10-11 12:46:04 +02:00
2634cc1b2c - Neteja d'arxius inutils
- Afegits iconos
2024-10-11 12:23:08 +02:00
3132dc0157 - [CHG] Augmentada la duració del boost de invulnerabilitat
- [CHG] Afegits uns quants cafés estratègicament, i canviats alguns
2024-10-11 11:50:16 +02:00
9c10b6a372 Merge branch 'master' of https://gitea.sustancia.synology.me/JailDoctor/thepool 2024-10-11 09:20:28 +02:00
31f63516ca - [CHG] Ara en Linux la configuració se guarda en " ~/.config/thepool/config.txt"
- [FIX] Solventada explosió en pantalla de gameover per un dangling pointer. Aplicades medides similars en catslife i ingame.
2024-10-11 09:20:24 +02:00
b5f4425672 - [FIX] Ja no es mostra el cursor mai (excepte si estas editant) 2024-10-10 20:38:12 +02:00
51eb933383 - [FIX] Arreglats els errors de la paleta de fósforo
- [CHG] Augmentades les probabilitats de una Cat's Life
- [NEW] Informació dels renderers al arrancar
- [FIX] Quan apareix un dialeg ja no es queda el só de caminar sonant de fondo
- [NEW] Quan apareix un dialeg i sona una fanfarria, la música se pausa
2024-10-10 20:14:18 +02:00
3f127b5444 - [FIX] En pantalla completa se veïa el cursor, ara ja no 2024-10-10 17:28:46 +02:00
2055ac523d - [FIX] El mode a pantalla completa ja manté proporcions senceres, amb barres negres pels costat quan fa falta
- [NEW] Amb F4 se fa toggle entre mode NORMAL, SCANLINES, FOSFORO i SCANLINES+FOSFORO
2024-10-10 16:10:09 +02:00
0a5a79dc60 - [FIX] Guarda per a quan falla un arxiu en JFile 2024-10-10 13:48:24 +02:00
baae73a38d - [FIX] Un café feia impossible passar per una habitació
- [FIX] No s'activaba el prólogo quan toca
- [FIX] El gràfic de les portes de vegades era transparent
- [FIX] Separades unes caixes que feien molt frustrant agafar una cosa
- [FIX] Quan tenia el café de doble velocitat no podia creuar portes
- [FIX] Algunes vegades el objecte dropejat encara feia clipping amb altres
- [NEW] Missatges en els moments importants
- [NEW] Quan te pases el joc també te dona els 'stats' de temps, vides i habitacions visitades.
2024-10-10 12:58:22 +02:00
ec7ac7114e - [FIX] No es podia entrar al editor de bitmap_pos des de l'editor
- [FIX] Recreativa afegida
- [NEW] Prologo acabat
- [FIX] Quan s'acava el boost de invulnerabilitat se moria
2024-10-10 09:33:56 +02:00
cabbb52cbb - [FIX] Solventats els problemes de memòria al eliminar un actor 2024-10-09 12:03:16 +02:00
ac4e1f3298 Merge branch 'master' of https://gitea.sustancia.synology.me/JailDoctor/thepool 2024-10-09 10:10:23 +02:00
b292ae710a - [FIX] La porta de l'habitacio de les sabates, que vaig pujar en la party pero se m'havia oblidat fer-ho en el repo
- [FIX] Solució a un dangling pointer que me va trobar valgrind
- [COMMIT ABANS DEL MEGACANVI]
2024-10-09 10:10:21 +02:00
9827865e9c - Prologo quasi acabat 2024-10-08 13:59:04 +02:00
119136332b - [FIX] Si està escribint un text, que no pille la D o la M com a "duplicar" o "moure" el actor seleccionat 2024-10-08 08:08:17 +02:00
63 changed files with 1089 additions and 1306 deletions

3
.gitignore vendored
View File

@@ -5,3 +5,6 @@
build/* build/*
thepool thepool
thepool_debug thepool_debug
valgrind*
release/*
data.jf2

View File

@@ -3,7 +3,7 @@ source = source/*.cpp
windows: windows:
@echo off @echo off
g++ $(source) icon.res -lmingw32 -lSDL2main -lSDL2 -mwindows -o "$(executable).exe" g++ $(source) bin/icon.res -lmingw32 -lSDL2main -lSDL2 -mwindows -o "$(executable).exe"
strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable).exe" strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable).exe"
windows_debug: windows_debug:

BIN
bin/icon.icns Normal file

Binary file not shown.

BIN
bin/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
bin/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

1
bin/icon.rc Normal file
View File

@@ -0,0 +1 @@
id ICON "icon.ico"

BIN
bin/icon.res Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
data/fosforo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

View File

@@ -9,6 +9,7 @@ end2.gif
floor.gif floor.gif
font.gif font.gif
font2.gif font2.gif
fosforo.gif
gat.gif gat.gif
gat2.gif gat2.gif
intro1.gif intro1.gif
@@ -22,6 +23,10 @@ mapa.gif
objectes.gif objectes.gif
obrer.gif obrer.gif
piscina.gif piscina.gif
prologo1.gif
prologo2.gif
prologo3.gif
prologo4.gif
roomaux.gif roomaux.gif
sam.gif sam.gif
test.gif test.gif

View File

@@ -1,57 +0,0 @@
width: 2
height: 1
door-height-xp: 1
door-height-xn: 1
color: CYAN
floor-texture: 0
wall-texture: 2
door-texture: 0
under-door-texture: 0
exit-xp: 5
exit-xn: 1
exit-zn: 2
actor{
name: PLATFORM02
bmp: test.gif
bmp-rect: 64 0 32 24
bmp-offset: 0 24
pos: 16 20 0
size: 8 8 4
}
actor{
name: PLATFORM00
bmp: test.gif
bmp-rect: 64 0 32 24
bmp-offset: 0 24
pos: 8 28 0
size: 8 8 4
}
actor{
name: PLATFORM01
bmp: test.gif
bmp-rect: 64 0 32 24
bmp-offset: 0 24
pos: 16 28 0
size: 8 8 4
}
actor{
name: PLATFORM04
bmp: test.gif
bmp-rect: 64 0 32 24
bmp-offset: 0 24
pos: 40 28 0
size: 8 8 4
}
actor{
name: PLATFORM03
bmp: test.gif
bmp-rect: 64 0 32 24
bmp-offset: 0 24
pos: 48 28 0
size: 8 8 4
}

View File

@@ -1,112 +0,0 @@
width: 2
height: 2
door-height-xp: 0
door-height-yp: 0
color: CYAN
floor-texture: 9
wall-texture: 3
door-texture: 1
under-door-texture: 0
exit-xp: 0
exit-yp: 3
actor{
name: ARMARI01
bmp: caixes.gif
bmp-rect: 64 32 24 32
bmp-offset: -8 36
pos: 8 8 0
size: 8 4 5
movement: CW
}
actor{
name: TAULETA
bmp: caixes.gif
bmp-rect: 0 64 32 32
bmp-offset: 0 32
pos: 24 8 0
size: 8 8 5
movement: CW
}
actor{
name: S-SHOES
bmp: objectes.gif
bmp-rect: 162 0 28 22
bmp-offset: -3 24
pos: 48 8 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{
name: TAULA01
bmp: caixes.gif
bmp-rect: 128 32 32 32
bmp-offset: 0 32
pos: 8 24 0
size: 8 8 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: TAULA02
bmp: caixes.gif
bmp-rect: 160 32 32 32
bmp-offset: 0 32
pos: 8 32 0
size: 8 8 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: ARMARI02
bmp: caixes.gif
bmp-rect: 96 32 24 32
bmp-offset: -8 36
pos: 8 8 8
size: 8 4 8
movement: CW
}
actor{
name: TV
bmp: caixes.gif
bmp-rect: 32 64 32 32
bmp-offset: 0 32
pos: 24 7 5
size: 8 5 8
orient: XP
movement: CW
}
actor{
name: NES
bmp: caixes.gif
bmp-rect: 96 0 32 32
bmp-offset: 0 32
pos: 24 16 0
size: 8 8 6
flags: PICKABLE PUSHABLE GRAVITY
movement: CW
}
actor{
name: ROOMBA
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 40 32 0
size: 8 8 4
orient: YP
flags: MOVING DEADLY
movement: Y
}

View File

@@ -1,24 +0,0 @@
width: 2
height: 1
door-height-xn: 4
door-height-yp: 0
color: PURPLE
floor-texture: 1
wall-texture: 2
door-texture: 0
under-door-texture: 2
exit-xn: 3
exit-yp: 4
exit-zp: 0
actor{
name: G-FILTER
bmp: objectes.gif
bmp-rect: 0 0 24 32
bmp-offset: 0 32
pos: 8 16 0
size: 8 8 8
anim-wait: 4
flags: PUSHABLE ANIMATED GRAVITY SPECIAL
movement: CW
}

View File

@@ -1,67 +0,0 @@
width: 1
height: 2
door-height-xp: 0
door-height-yn: 4
color: PURPLE
floor-texture: 0
wall-texture: 0
door-texture: 0
under-door-texture: 0
exit-xp: 2
exit-yn: 1
actor{
name: CONVEYOR
bmp: caixes.gif
bmp-rect: 0 144 32 32
bmp-offset: 0 32
pos: 16 48 0
size: 8 8 4
anim-cycle: MIN
flags: REACTIVE ANIMATED
react-mask: ZN
react-push: XP
movement: CW
}
actor{
name: FINESTRA
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 39
pos: 15 23 4
size: 1 1 9
movement: CW
}
actor{
name: FINESTRA01
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 39
pos: 15 31 4
size: 1 1 9
movement: CW
}
actor{
name: BOX
bmp: test.gif
bmp-rect: 32 0 32 32
bmp-offset: 0 32
pos: 27 31 0
size: 8 8 8
flags: PUSHABLE GRAVITY
movement: CW
}
actor{
name: BOX01
bmp: test.gif
bmp-rect: 32 0 32 32
bmp-offset: 0 32
pos: 27 29 8
size: 8 8 8
flags: PICKABLE PUSHABLE GRAVITY
movement: CW
}

View File

@@ -1,250 +0,0 @@
width: 2
height: 3
door-height-yp: 2
door-height-yn: 2
color: GREEN
floor-texture: 1
wall-texture: 5
door-texture: 4
under-door-texture: 0
exit-yn: 2
actor{
name: BOX
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX02
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 16 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX03
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX20
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 8 0
size: 8 8 8
movement: CW
}
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 16 0
size: 8 8 8
movement: CW
}
actor{
name: BOX11
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 24 0
size: 8 8 8
movement: CW
}
actor{
name: BOX12
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 32 0
size: 8 8 8
movement: CW
}
actor{
name: BOX13
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 40 0
size: 8 8 8
movement: CW
}
actor{
name: BOX14
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 48 0
size: 8 8 8
movement: CW
}
actor{
name: BOX21
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 56 0
size: 8 8 8
movement: CW
}
actor{
name: BOX15
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 16 56 0
size: 8 8 8
movement: CW
}
actor{
name: BOX16
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 56 0
size: 8 8 8
movement: CW
}
actor{
name: BOX04
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX17
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 56 0
size: 8 8 8
movement: CW
}
actor{
name: BOX05
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 40 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX22
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX06
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 8 0
size: 8 8 8
movement: CW
}
actor{
name: BOX07
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 16 0
size: 8 8 8
movement: CW
}
actor{
name: BOX08
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 24 0
size: 8 8 8
movement: CW
}
actor{
name: BOX09
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 32 0
size: 8 8 8
movement: CW
}
actor{
name: BOX10
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 40 0
size: 8 8 8
movement: CW
}
actor{
name: BOX19
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 48 0
size: 8 8 8
movement: CW
}
actor{
name: BOX18
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 40 56 0
size: 8 8 8
movement: CW
}
actor{
name: BOX23
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 56 0
size: 8 8 8
movement: CW
}

View File

@@ -1,11 +0,0 @@
width: 2
height: 2
door-height-xp: 0
door-height-xn: 0
color: YELLOW
floor-texture: 8
wall-texture: 8
door-texture: 5
under-door-texture: 0
exit-xp: 6
exit-xn: 0

View File

@@ -1,114 +0,0 @@
width: 3
height: 3
door-height-xn: 0
color: CYAN
floor-texture: 0
wall-texture: 0
door-texture: 0
under-door-texture: 0
exit-xn: 5
exit-zp: 7
actor{
name: SOFA
bmp: altres.gif
bmp-rect: 0 0 48 40
bmp-offset: 0 32
pos: 0 0 0
size: 16 8 6
movement: CW
}
actor{
name: LLIT
bmp: altres.gif
bmp-rect: 48 0 57 47
bmp-offset: 12 33
pos: 16 0 0
size: 16 16 6
movement: CW
}
actor{
name: LIFT
bmp: caixes.gif
bmp-rect: 32 32 32 24
bmp-offset: 0 24
pos: 56 0 0
size: 8 8 4
orient: ZP
flags: MOVING
movement: Z
}
actor{
name: B4-02
bmp: objectes.gif
bmp-rect: 114 78 15 18
bmp-offset: -8 22
pos: 0 40 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: B8-00
bmp: objectes.gif
bmp-rect: 114 78 15 18
bmp-offset: -8 22
pos: 0 48 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: YONKI
bmp: caixes.gif
bmp-rect: 168 64 19 32
bmp-offset: -7 37
pos: 18 56 0
size: 6 6 12
anim-cycle: SEQ
anim-wait: 1
flags: PUSHABLE GRAVITY
movement: CW
}
actor{
name: BARREL
bmp: caixes.gif
bmp-rect: 96 64 18 32
bmp-offset: -7 37
pos: 25 57 0
size: 6 6 12
anim-cycle: SEQ
anim-wait: 1
flags: PUSHABLE ANIMATED GRAVITY
movement: CW
}
actor{
name: NEVERA1
bmp: caixes.gif
bmp-rect: 0 96 32 32
bmp-offset: 0 32
pos: 32 32 0
size: 8 8 8
movement: CW
}
actor{
name: NEVERA2
bmp: caixes.gif
bmp-rect: 32 96 32 32
bmp-offset: 0 32
pos: 32 32 8
size: 8 8 8
movement: CW
}

View File

@@ -1,33 +0,0 @@
width: 3
height: 3
door-height-xp: 0
door-height-xn: 0
color: PURPLE
floor-texture: 0
wall-texture: 14
door-texture: 2
under-door-texture: 0
exit-xn: 8
exit-zn: 6
actor{
name: LIFT
bmp: caixes.gif
bmp-rect: 32 32 32 24
bmp-offset: 0 24
pos: 56 0 0
size: 8 8 4
orient: ZP
flags: MOVING
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
}

View File

@@ -1,105 +0,0 @@
width: 2
height: 2
door-height-xp: 0
color: CYAN
floor-texture: 0
wall-texture: 11
door-texture: 0
under-door-texture: 0
exit-xp: 7
actor{
name: P-ELBOW
bmp: objectes.gif
bmp-rect: 0 32 22 32
bmp-offset: -2 35
pos: 8 16 0
size: 4 4 4
anim-wait: 6
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: P-PIPE
bmp: objectes.gif
bmp-rect: 0 64 16 32
bmp-offset: -8 36
pos: 8 24 0
size: 4 4 4
anim-wait: 6
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: P-SALT
bmp: objectes.gif
bmp-rect: 66 32 20 32
bmp-offset: -7 35
pos: 8 32 0
size: 4 4 4
anim-wait: 6
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: EXPLOSION
bmp: caixes.gif
bmp-rect: 0 160 18 22
bmp-offset: -7 38
pos: 32 32 0
size: 8 8 4
anim-cycle: SEQ
flags: ANIMATED
movement: CW
}
actor{
name: P-FILTER
bmp: objectes.gif
bmp-rect: 0 0 24 32
bmp-offset: -4 34
pos: 8 24 8
size: 4 4 4
anim-wait: 6
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: P-PUMP
bmp: objectes.gif
bmp-rect: 48 64 22 32
bmp-offset: -5 35
pos: 8 32 11
size: 4 4 4
anim-wait: 6
flags: ANIMATED SPECIAL
movement: CW
}
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 0 160 18 22
bmp-offset: -7 38
pos: 32 32 5
size: 8 8 4
anim-cycle: SEQ
flags: ANIMATED
movement: CW
}
actor{
name: P-TIMER
bmp: objectes.gif
bmp-rect: 72 0 24 32
bmp-offset: -4 34
pos: 8 40 8
size: 4 4 4
anim-wait: 6
flags: ANIMATED SPECIAL
movement: CW
}

View File

@@ -1,210 +0,0 @@
width: 3
height: 3
door-height-yp: 0
color: CYAN
floor-texture: 0
wall-texture: 0
door-texture: 0
under-door-texture: 0
exit-yp: 10
actor{
name: KALLAX-A03
bmp: altres.gif
bmp-rect: 72 48 24 27
bmp-offset: 0 31
pos: 0 16 0
size: 4 8 8
movement: CW
}
actor{
name: KALLAX-A
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 0 32 0
size: 4 8 8
movement: CW
}
actor{
name: KALLAX-A02
bmp: altres.gif
bmp-rect: 48 48 24 27
bmp-offset: 0 31
pos: 0 16 8
size: 4 8 8
movement: CW
}
actor{
name: KALLAX-A01
bmp: altres.gif
bmp-rect: 24 48 24 27
bmp-offset: 0 31
pos: 0 32 8
size: 4 8 8
movement: CW
}
actor{
name: KALLAX-A04
bmp: altres.gif
bmp-rect: 72 48 24 27
bmp-offset: -8 31
pos: 8 0 0
size: 8 4 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: KALLAX-A05
bmp: altres.gif
bmp-rect: 96 48 24 27
bmp-offset: -8 31
pos: 8 0 8
size: 8 4 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: ARCADE
bmp: altres.gif
bmp-rect: 160 0 30 48
bmp-offset: 0 48
pos: 16 0 0
size: 8 8 16
movement: CW
}
actor{
name: KALLAX-A07
bmp: altres.gif
bmp-rect: 96 48 24 27
bmp-offset: -8 31
pos: 24 0 0
size: 8 4 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: KALLAX-A08
bmp: altres.gif
bmp-rect: 24 48 24 27
bmp-offset: -8 31
pos: 32 0 0
size: 8 4 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: KALLAX-A06
bmp: altres.gif
bmp-rect: 72 48 24 27
bmp-offset: -8 31
pos: 24 0 8
size: 8 4 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: KALLAX-A09
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: -8 31
pos: 32 0 8
size: 8 4 8
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: TAULETA
bmp: caixes.gif
bmp-rect: 0 64 32 32
bmp-offset: 0 32
pos: 40 0 0
size: 8 8 4
movement: CW
}
actor{
name: BOX05
bmp: altres.gif
bmp-rect: 128 0 20 42
bmp-offset: -5 46
pos: 40 0 4
size: 8 8 8
movement: CW
}
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 128 32 32 32
bmp-offset: 0 32
pos: 16 24 0
size: 8 8 8
movement: CW
}
actor{
name: BOX02
bmp: caixes.gif
bmp-rect: 160 32 32 32
bmp-offset: 0 32
pos: 24 24 0
size: 8 8 8
react-push: XP
movement: CW
}
actor{
name: GAT
bmp: gat2.gif
bmp-rect: 0 0 24 28
bmp-offset: -5 30
pos: 40 32 0
size: 8 8 8
orient: XP
anim-wait: 1
flags: PUSHABLE MOVING ANIMATED ORIENTABLE INERTIA
movement: X
}
actor{
name: BOX03
bmp: caixes.gif
bmp-rect: 128 0 32 32
bmp-offset: 0 32
pos: 16 24 8
size: 8 8 2
flags: PUSHABLE
react-push: XP
movement: CW
}
actor{
name: BOX04
bmp: caixes.gif
bmp-rect: 32 64 32 32
bmp-offset: 0 32
pos: 24 24 8
size: 8 8 8
orient: YP
flags: ORIENTABLE
react-push: XP
movement: CW
}

View File

@@ -1,110 +0,0 @@
width: 0
height: 3
door-height-yp: 0
door-height-yn: 5
color: WHITE
floor-texture: 6
wall-texture: 0
door-texture: 0
under-door-texture: 0
exit-yn: 9
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 0 12
size: 8 8 8
movement: CW
}
actor{
name: BOX
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 0 12
size: 8 8 8
movement: CW
}
actor{
name: BOX08
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 8 8
size: 8 8 8
movement: CW
}
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 8 8
size: 8 8 8
movement: CW
}
actor{
name: BOX07
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 16 4
size: 8 8 8
movement: CW
}
actor{
name: BOX02
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 16 4
size: 8 8 8
movement: CW
}
actor{
name: BOX06
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 24 0
size: 8 8 8
movement: CW
}
actor{
name: BOX03
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 24 0
size: 8 8 8
movement: CW
}
actor{
name: BOX05
bmp: caixes.gif
bmp-rect: 32 32 32 24
bmp-offset: 0 24
pos: 24 32 0
size: 8 10 4
movement: CW
}
actor{
name: BOX04
bmp: caixes.gif
bmp-rect: 32 32 32 24
bmp-offset: 0 24
pos: 32 32 0
size: 8 10 4
movement: CW
}

BIN
data/prologo1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
data/prologo2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
data/prologo3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
data/prologo4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -52,7 +52,7 @@ actor{
} }
actor{ actor{
name: B-00-LIVE name: B-00-JUMP
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 114 78 15 18 bmp-rect: 114 78 15 18
bmp-offset: -8 22 bmp-offset: -8 22

View File

@@ -1,7 +1,7 @@
width: 2 width: 2
height: 3 height: 3
door-height-xn: 3 door-height-xn: 3
door-height-yp: 2 door-height-yp: 3
color: WHITE color: WHITE
floor-texture: 11 floor-texture: 11
wall-texture: 2 wall-texture: 2

View File

@@ -9,6 +9,19 @@ under-door-texture: 0
exit-yp: 15 exit-yp: 15
editor-done: 1 editor-done: 1
actor{
name: B-05-GOD
bmp: objectes.gif
bmp-rect: 114 78 15 18
bmp-offset: -8 22
pos: 40 40 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW
}
actor{ actor{
name: BOX-A-01 name: BOX-A-01
bmp: caixes.gif bmp: caixes.gif

View File

@@ -24,7 +24,7 @@ actor{
} }
actor{ actor{
name: B-01-JUMP name: B-01-RUN
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 114 78 15 18 bmp-rect: 114 78 15 18
bmp-offset: -8 22 bmp-offset: -8 22

View File

@@ -37,6 +37,17 @@ actor{
movement: CW movement: CW
} }
actor{
name: ARCADE
bmp: altres.gif
bmp-rect: 160 0 30 48
bmp-offset: 0 49
pos: 56 8 0
size: 8 8 16
orient: YP
movement: CW
}
actor{ actor{
name: BATMAN name: BATMAN
bmp: batman.gif bmp: batman.gif
@@ -67,7 +78,7 @@ actor{
bmp: altres.gif bmp: altres.gif
bmp-rect: 128 0 20 41 bmp-rect: 128 0 20 41
bmp-offset: -6 45 bmp-offset: -6 45
pos: 56 8 0 pos: 16 8 0
size: 6 6 16 size: 6 6 16
movement: CW movement: CW
} }

View File

@@ -12,18 +12,20 @@ exit-xn: 28
editor-done: 1 editor-done: 1
actor{ actor{
name: BOX-B name: B-03-LIVE
bmp: caixes.gif bmp: objectes.gif
bmp-rect: 32 0 32 32 bmp-rect: 114 78 15 18
bmp-offset: 0 32 bmp-offset: -8 24
pos: 48 8 0 pos: 48 56 16
size: 8 8 8 size: 4 4 4
flags: PUSHABLE anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW movement: CW
} }
actor{ actor{
name: CADIRA name: CADIRA-00
bmp: caixes.gif bmp: caixes.gif
bmp-rect: 64 96 20 32 bmp-rect: 64 96 20 32
bmp-offset: -7 38 bmp-offset: -7 38
@@ -34,12 +36,24 @@ actor{
movement: CW movement: CW
} }
actor{
name: CADIRA-01
bmp: caixes.gif
bmp-rect: 64 96 20 32
bmp-offset: -7 38
pos: 8 7 0
size: 6 5 8
orient: YP
flags: PUSHABLE
movement: CW
}
actor{ actor{
name: CUADRO-00 name: CUADRO-00
bmp: altres.gif bmp: altres.gif
bmp-rect: 66 75 18 32 bmp-rect: 66 75 18 32
bmp-offset: 0 39 bmp-offset: 0 39
pos: 7 8 6 pos: 7 13 6
size: 1 1 9 size: 1 1 9
orient: YP orient: YP
movement: CW movement: CW
@@ -50,7 +64,7 @@ actor{
bmp: altres.gif bmp: altres.gif
bmp-rect: 102 75 18 32 bmp-rect: 102 75 18 32
bmp-offset: 0 39 bmp-offset: 0 39
pos: 7 48 6 pos: 7 43 6
size: 1 1 9 size: 1 1 9
orient: YP orient: YP
movement: CW movement: CW
@@ -152,6 +166,26 @@ actor{
movement: CW movement: CW
} }
actor{
name: LAMPARA-00
bmp: altres.gif
bmp-rect: 128 0 20 41
bmp-offset: -6 45
pos: 48 56 0
size: 6 6 16
movement: CW
}
actor{
name: LAMPARA-01
bmp: altres.gif
bmp-rect: 128 0 20 41
bmp-offset: -6 45
pos: 8 56 0
size: 6 6 16
movement: CW
}
actor{ actor{
name: MESITA name: MESITA
bmp: caixes.gif bmp: caixes.gif
@@ -169,7 +203,7 @@ actor{
bmp-offset: -2 33 bmp-offset: -2 33
pos: 32 0 0 pos: 32 0 0
size: 8 7 6 size: 8 7 6
flags: PUSHABLE flags: PICKABLE PUSHABLE GRAVITY
movement: CW movement: CW
} }
@@ -178,7 +212,7 @@ actor{
bmp: caixes.gif bmp: caixes.gif
bmp-rect: 160 0 32 32 bmp-rect: 160 0 32 32
bmp-offset: 0 34 bmp-offset: 0 34
pos: 8 56 0 pos: 16 56 0
size: 8 8 2 size: 8 8 2
orient: XN orient: XN
flags: REACTIVE MOVING DEADLY flags: REACTIVE MOVING DEADLY
@@ -217,6 +251,6 @@ actor{
bmp-offset: -4 34 bmp-offset: -4 34
pos: 24 0 4 pos: 24 0 4
size: 8 6 8 size: 8 6 8
flags: PUSHABLE flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }

View File

@@ -11,6 +11,19 @@ exit-xn: 33
exit-yn: 28 exit-yn: 28
editor-done: 1 editor-done: 1
actor{
name: B-06-LIVE
bmp: objectes.gif
bmp-rect: 114 78 15 18
bmp-offset: -8 22
pos: 24 32 12
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW
}
actor{ actor{
name: PLATH-00 name: PLATH-00
bmp: caixes.gif bmp: caixes.gif
@@ -227,3 +240,15 @@ actor{
orient: ZP orient: ZP
movement: Z movement: Z
} }
actor{
name: PLATH-18
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 24 32 8
size: 8 8 4
orient: ZP
flags: DISAPPEAR
movement: Z
}

View File

@@ -21,6 +21,18 @@ actor{
movement: CW movement: CW
} }
actor{
name: ARCADE
bmp: altres.gif
bmp-rect: 160 0 30 48
bmp-offset: 0 49
pos: 8 24 0
size: 8 8 16
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{ actor{
name: CADIRA name: CADIRA
bmp: caixes.gif bmp: caixes.gif

View File

@@ -256,9 +256,9 @@ actor{
bmp: gat.gif bmp: gat.gif
bmp-rect: 0 0 24 28 bmp-rect: 0 0 24 28
bmp-offset: -4 32 bmp-offset: -4 32
pos: 16 16 0 pos: 16 24 0
size: 8 8 8 size: 8 8 8
orient: XP orient: YN
anim-wait: 1 anim-wait: 1
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN react-mask: XP XN YP YN ZP ZN
@@ -270,9 +270,9 @@ actor{
bmp: gat2.gif bmp: gat2.gif
bmp-rect: 0 0 24 28 bmp-rect: 0 0 24 28
bmp-offset: -4 32 bmp-offset: -4 32
pos: 40 40 0 pos: 40 32 0
size: 8 8 8 size: 8 8 8
orient: XN orient: YP
anim-wait: 1 anim-wait: 1
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN react-mask: XP XN YP YN ZP ZN

View File

@@ -183,9 +183,9 @@ actor{
bmp: obrer.gif bmp: obrer.gif
bmp-rect: 0 0 24 32 bmp-rect: 0 0 24 32
bmp-offset: -4 37 bmp-offset: -4 37
pos: 8 24 0 pos: 24 24 0
size: 8 8 8 size: 8 8 8
orient: XN orient: XP
anim-wait: 1 anim-wait: 1
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN react-mask: XP XN YP YN ZP ZN
@@ -197,9 +197,9 @@ actor{
bmp: obrer.gif bmp: obrer.gif
bmp-rect: 0 0 24 32 bmp-rect: 0 0 24 32
bmp-offset: -4 37 bmp-offset: -4 37
pos: 48 48 0 pos: 40 48 0
size: 8 8 8 size: 8 8 8
orient: XN orient: XP
anim-wait: 1 anim-wait: 1
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN react-mask: XP XN YP YN ZP ZN

View File

@@ -20,12 +20,25 @@ actor{
movement: CW movement: CW
} }
actor{
name: B-04-LIVE
bmp: objectes.gif
bmp-rect: 114 78 15 18
bmp-offset: -8 22
pos: 48 0 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW
}
actor{ actor{
name: BLOCMATA-00 name: BLOCMATA-00
bmp: altres.gif bmp: altres.gif
bmp-rect: 0 133 32 27 bmp-rect: 0 133 32 27
bmp-offset: 0 27 bmp-offset: 0 27
pos: 0 48 0 pos: 0 51 0
size: 8 8 6 size: 8 8 6
flags: REACTIVE DEADLY flags: REACTIVE DEADLY
react-mask: XP XN YP YN ZP ZN react-mask: XP XN YP YN ZP ZN
@@ -61,6 +74,7 @@ actor{
bmp-offset: 0 32 bmp-offset: 0 32
pos: 0 49 6 pos: 0 49 6
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
@@ -72,7 +86,7 @@ actor{
pos: 8 40 0 pos: 8 40 0
size: 8 8 8 size: 8 8 8
orient: YP orient: YP
flags: ORIENTABLE flags: PUSHABLE ORIENTABLE GRAVITY
movement: CW movement: CW
} }
@@ -83,6 +97,7 @@ actor{
bmp-offset: 0 32 bmp-offset: 0 32
pos: 8 32 8 pos: 8 32 8
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
@@ -117,6 +132,7 @@ actor{
bmp-offset: 0 32 bmp-offset: 0 32
pos: 31 2 0 pos: 31 2 0
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
@@ -128,7 +144,7 @@ actor{
pos: 54 0 8 pos: 54 0 8
size: 8 8 8 size: 8 8 8
orient: YP orient: YP
flags: ORIENTABLE flags: PUSHABLE ORIENTABLE GRAVITY
movement: CW movement: CW
} }
@@ -149,6 +165,7 @@ actor{
bmp-offset: 0 32 bmp-offset: 0 32
pos: 10 32 0 pos: 10 32 0
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
@@ -167,8 +184,9 @@ actor{
bmp: caixes.gif bmp: caixes.gif
bmp-rect: 32 0 32 32 bmp-rect: 32 0 32 32
bmp-offset: 0 32 bmp-offset: 0 32
pos: 40 0 0 pos: 40 1 0
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
@@ -180,7 +198,7 @@ actor{
pos: 46 3 10 pos: 46 3 10
size: 8 8 8 size: 8 8 8
orient: YP orient: YP
flags: ORIENTABLE flags: PUSHABLE ORIENTABLE GRAVITY
movement: CW movement: CW
} }
@@ -256,3 +274,42 @@ actor{
flags: MOVING ANIMATED flags: MOVING ANIMATED
movement: RANDV movement: RANDV
} }
actor{
name: EXPLOSION-03
bmp: caixes.gif
bmp-rect: 0 160 18 22
bmp-offset: -7 24
pos: 48 48 0
size: 8 8 4
orient: YN
anim-cycle: SEQ
flags: MOVING ANIMATED
movement: RANDV
}
actor{
name: EXPLOSION-04
bmp: caixes.gif
bmp-rect: 0 160 18 22
bmp-offset: -7 24
pos: 0 0 0
size: 8 8 4
orient: XP
anim-cycle: SEQ
flags: MOVING ANIMATED
movement: RANDV
}
actor{
name: EXPLOSION-05
bmp: caixes.gif
bmp-rect: 0 160 18 22
bmp-offset: -7 24
pos: 16 24 0
size: 8 8 4
orient: XN
anim-cycle: SEQ
flags: MOVING ANIMATED
movement: RANDV
}

View File

@@ -9,6 +9,19 @@ under-door-texture: 2
exit-xp: 62 exit-xp: 62
editor-done: 1 editor-done: 1
actor{
name: B-02-GOD
bmp: objectes.gif
bmp-rect: 114 78 15 18
bmp-offset: -8 22
pos: 56 16 20
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: ANIMATED SPECIAL
movement: CW
}
actor{ actor{
name: P-ELBOW name: P-ELBOW
bmp: objectes.gif bmp: objectes.gif
@@ -45,6 +58,29 @@ actor{
movement: Y movement: Y
} }
actor{
name: PLATH-02
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 56 16 16
size: 8 8 4
orient: ZP
movement: Z
}
actor{
name: PLATH-04
bmp: altres.gif
bmp-rect: 160 48 32 32
bmp-offset: 0 32
pos: 32 8 16
size: 8 8 4
orient: XN
flags: MOVING
movement: X
}
actor{ actor{
name: TRANSPA-00 name: TRANSPA-00
bmp: altres.gif bmp: altres.gif

View File

@@ -176,11 +176,11 @@ actor{
} }
actor{ actor{
name: S-BAG name: X-0
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 145 41 20 25 bmp-rect: 162 0 28 22
bmp-offset: -5 27 bmp-offset: -3 24
pos: 31 13 16 pos: 8 32 0
size: 4 4 4 size: 4 4 4
anim-cycle: SEQ anim-cycle: SEQ
anim-wait: 2 anim-wait: 2
@@ -189,25 +189,12 @@ actor{
} }
actor{ actor{
name: S-GLOVES name: X-1
bmp: objectes.gif
bmp-rect: 165 45 21 22
bmp-offset: -2 26
pos: 24 14 4
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{
name: S-PANTS
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 167 22 18 23 bmp-rect: 167 22 18 23
bmp-offset: -7 27 bmp-offset: -7 27
pos: 16 24 4 pos: 16 24 4
size: 4 4 4 size: 4 4 6
anim-cycle: SEQ anim-cycle: SEQ
anim-wait: 2 anim-wait: 2
flags: SPECIAL flags: SPECIAL
@@ -215,12 +202,25 @@ actor{
} }
actor{ actor{
name: S-SHOES name: X-2
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 162 0 28 22 bmp-rect: 165 45 21 22
bmp-offset: -3 24 bmp-offset: -2 26
pos: 0 24 0 pos: 24 14 4
size: 4 4 4 size: 4 4 5
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{
name: X-3
bmp: objectes.gif
bmp-rect: 145 41 20 25
bmp-offset: -5 27
pos: 34 13 16
size: 6 4 6
anim-cycle: SEQ anim-cycle: SEQ
anim-wait: 2 anim-wait: 2
flags: SPECIAL flags: SPECIAL

View File

@@ -210,19 +210,6 @@ actor{
movement: Y movement: Y
} }
actor{
name: S-GLOVES
bmp: objectes.gif
bmp-rect: 165 45 21 22
bmp-offset: -2 26
pos: 8 22 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{ actor{
name: WC name: WC
bmp: altres.gif bmp: altres.gif
@@ -234,3 +221,16 @@ actor{
flags: ORIENTABLE flags: ORIENTABLE
movement: CCW movement: CCW
} }
actor{
name: Y-2
bmp: objectes.gif
bmp-rect: 165 45 21 22
bmp-offset: -2 26
pos: 8 22 0
size: 4 4 5
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}

View File

@@ -94,19 +94,6 @@ actor{
movement: Y movement: Y
} }
actor{
name: S-PANTS
bmp: objectes.gif
bmp-rect: 167 22 18 23
bmp-offset: -7 27
pos: 0 16 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{ actor{
name: TRANSPA-00 name: TRANSPA-00
bmp: altres.gif bmp: altres.gif
@@ -316,3 +303,16 @@ actor{
size: 8 8 6 size: 8 8 6
movement: CW movement: CW
} }
actor{
name: Y-1
bmp: objectes.gif
bmp-rect: 167 22 18 23
bmp-offset: -7 27
pos: 0 16 0
size: 4 4 6
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}

View File

@@ -1,7 +1,7 @@
width: 2 width: 2
height: 3 height: 3
door-height-xn: 3 door-height-xn: 3
door-height-yp: 2 door-height-yp: 3
color: WHITE color: WHITE
floor-texture: 11 floor-texture: 11
wall-texture: 2 wall-texture: 2
@@ -402,12 +402,12 @@ actor{
} }
actor{ actor{
name: S-SHOES name: Y-0
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 162 0 28 22 bmp-rect: 162 0 28 22
bmp-offset: -3 24 bmp-offset: -3 24
pos: 40 0 4 pos: 40 0 4
size: 4 4 4 size: 6 6 4
anim-cycle: SEQ anim-cycle: SEQ
anim-wait: 2 anim-wait: 2
flags: SPECIAL flags: SPECIAL

View File

@@ -155,19 +155,6 @@ actor{
movement: Y movement: Y
} }
actor{
name: S-BAG
bmp: objectes.gif
bmp-rect: 145 41 20 25
bmp-offset: -5 27
pos: 0 56 20
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{ actor{
name: TRANSPA-00 name: TRANSPA-00
bmp: altres.gif bmp: altres.gif
@@ -268,3 +255,16 @@ actor{
flags: PUSHABLE GRAVITY flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
actor{
name: Y-3
bmp: objectes.gif
bmp-rect: 145 41 20 25
bmp-offset: -5 27
pos: 0 56 20
size: 6 4 6
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}

View File

@@ -273,6 +273,18 @@ category{
movement: CCW movement: CCW
} }
actor{
name: ARCADE
bmp: altres.gif
bmp-rect: 160 0 30 48
bmp-offset: 0 49
pos: 0 16 0
size: 8 8 16
orient: YP
flags: ORIENTABLE
movement: CW
}
} }
category{ category{

View File

@@ -33,6 +33,7 @@ namespace actor
int walk_channel = -1; int walk_channel = -1;
bool push_sound_already_playing = false; bool push_sound_already_playing = false;
std::vector<actor_t*> purgatory;
void resetTag() void resetTag()
{ {
@@ -69,6 +70,7 @@ namespace actor
act->surface = draw::getSurface(bmp.c_str()); act->surface = draw::getSurface(bmp.c_str());
act->bmp_rect = r; act->bmp_rect = r;
act->bmp_offset = o; act->bmp_offset = o;
act->alive = true;
return act; return act;
} }
@@ -89,6 +91,8 @@ namespace actor
act->react_mask = act->react_push = 0; act->react_mask = act->react_push = 0;
act->flags = FLAG_NONE; act->flags = FLAG_NONE;
act->template_category = 0; act->template_category = 0;
act->alive = true;
return act; return act;
} }
@@ -233,7 +237,7 @@ namespace actor
newactor->prev = act->prev; newactor->prev = act->prev;
newactor->next = act->next; newactor->next = act->next;
act->prev = act->next = nullptr; act->prev = act->next = nullptr;
remove(act); sendToPurgatory(act);
return newactor; return newactor;
} }
@@ -457,13 +461,33 @@ namespace actor
actor_t *hero = find("HERO"); actor_t *hero = find("HERO");
while (obj2) while (obj2)
{ {
if (obj2 != hero && obj1 != obj2 && check_2d_collision(obj1, obj2)) if (obj2 != hero && obj1 != obj2 && (obj1->pos.z<obj2->pos.z+obj2->size.z) && check_2d_collision(obj1, obj2))
return true; return true;
obj2 = obj2->next; obj2 = obj2->next;
} }
return false; return false;
} }
void find_non_colliding_position(actor_t *obj)
{
int dist = 1;
while (does_collide(obj))
{
obj->pos.x += dist;
if (!does_collide(obj)) return;
obj->pos.x -= dist*2;
if (!does_collide(obj)) return;
obj->pos.x += dist;
obj->pos.y += dist;
if (!does_collide(obj)) return;
obj->pos.y -= dist*2;
if (!does_collide(obj)) return;
obj->pos.y += dist;
dist++;
}
}
const bool is_above(actor_t *obj1, actor_t *obj2) const bool is_above(actor_t *obj1, actor_t *obj2)
{ {
return check_2d_collision(obj1, obj2) && (obj1->pos.z == obj2->pos.z + obj2->size.z); return check_2d_collision(obj1, obj2) && (obj1->pos.z == obj2->pos.z + obj2->size.z);
@@ -636,6 +660,7 @@ namespace actor
audio::playSound("snd_disappear.wav", SOUND_BASIC); audio::playSound("snd_disappear.wav", SOUND_BASIC);
act = actor::replaceWithTemplate(act, "EXPLOSION"); act = actor::replaceWithTemplate(act, "EXPLOSION");
act->name[0] = '_'; act->name[0] = '_';
return PUSH_NONE;
} }
if (source->flags & FLAG_DEADLY) if (source->flags & FLAG_DEADLY)
@@ -675,6 +700,36 @@ namespace actor
hero::pickAnbernic(act->name); hero::pickAnbernic(act->name);
audio::playSound("snd_pick.wav", SOUND_BASIC); audio::playSound("snd_pick.wav", SOUND_BASIC);
} }
else if (act->name[0] == 'X')
{
if (hero::isCarryingPrologoObject()) {
audio::playSound("snd_push.wav", SOUND_BASIC);
return result;
} else {
hero::pickPrologoObject(act->name[2]-48);
audio::playSound("snd_pick.wav", SOUND_BASIC);
}
}
else if (act->name[0] == 'Y')
{
const int which = act->name[2]-48;
if (hero::getPrologoObjectState(which)==PROLOGO_OBJECT_PICKED)
{
hero::leavePrologoObject(which);
audio::playSound("snd_pick.wav", SOUND_BASIC);
act->name[0] = 'Z';
room::cycleColor(1);
return result;
} else {
audio::playSound("snd_push.wav", SOUND_BASIC);
return result;
}
}
else if (act->name[0] == 'Z')
{
audio::playSound("snd_push.wav", SOUND_BASIC);
return result;
}
else else
{ {
SDL_assert(false); SDL_assert(false);
@@ -682,6 +737,7 @@ namespace actor
act = actor::replaceWithTemplate(act, "EXPLOSION"); act = actor::replaceWithTemplate(act, "EXPLOSION");
act->name[0] = '_'; act->name[0] = '_';
room::cycleColor(1); room::cycleColor(1);
return PUSH_NONE;
} }
} }
return result; return result;
@@ -700,6 +756,7 @@ namespace actor
if ((act->pos.x > min.x && act->pos.y >= min.y && (act->pos.y + act->size.y) <= max.y) || ((room::getDoors() & DOOR_XN) && (act->pos.y >= 24) && (act->pos.y <= 32))) if ((act->pos.x > min.x && act->pos.y >= min.y && (act->pos.y + act->size.y) <= max.y) || ((room::getDoors() & DOOR_XN) && (act->pos.y >= 24) && (act->pos.y <= 32)))
{ {
moving = true; moving = true;
// Si està en les vores d'una porta, espenta cap a centrar-lo
if ((act->pos.x <= min.x) && (act->pos.z == room::getDoor(XN) * 4) && (room::getDoors() & DOOR_XN)) if ((act->pos.x <= min.x) && (act->pos.z == room::getDoor(XN) * 4) && (room::getDoors() & DOOR_XN))
{ {
if (act->pos.y < 28) if (act->pos.y < 28)
@@ -707,10 +764,16 @@ namespace actor
else if (act->pos.y > 28) else if (act->pos.y > 28)
act->push |= PUSH_YN; act->push |= PUSH_YN;
else else
{
act->push |= PUSH_XN; act->push |= PUSH_XN;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
else else
{
act->push |= PUSH_XN; act->push |= PUSH_XN;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
} }
else if (controller::down(KEY_RIGHT)) //(input::keyDown(SDL_SCANCODE_RIGHT) || input::keyDown(config::getKey(KEY_RIGHT))) else if (controller::down(KEY_RIGHT)) //(input::keyDown(SDL_SCANCODE_RIGHT) || input::keyDown(config::getKey(KEY_RIGHT)))
@@ -720,6 +783,7 @@ namespace actor
if (((act->pos.x + act->size.x) < max.x && act->pos.y >= min.y && (act->pos.y + act->size.y) <= max.y) || ((room::getDoors() & DOOR_XP) && (act->pos.y >= 24) && (act->pos.y <= 32))) if (((act->pos.x + act->size.x) < max.x && act->pos.y >= min.y && (act->pos.y + act->size.y) <= max.y) || ((room::getDoors() & DOOR_XP) && (act->pos.y >= 24) && (act->pos.y <= 32)))
{ {
moving = true; moving = true;
// Si està en les vores d'una porta, espenta cap a centrar-lo
if (((act->pos.x + act->size.x) >= max.x) && (act->pos.z == room::getDoor(XP) * 4) && (room::getDoors() & DOOR_XP)) if (((act->pos.x + act->size.x) >= max.x) && (act->pos.z == room::getDoor(XP) * 4) && (room::getDoors() & DOOR_XP))
{ {
if (act->pos.y < 28) if (act->pos.y < 28)
@@ -727,10 +791,16 @@ namespace actor
else if (act->pos.y > 28) else if (act->pos.y > 28)
act->push |= PUSH_YN; act->push |= PUSH_YN;
else else
{
act->push |= PUSH_XP; act->push |= PUSH_XP;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
else else
{
act->push |= PUSH_XP; act->push |= PUSH_XP;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
} }
else if (controller::down(KEY_UP)) // input::keyDown(SDL_SCANCODE_UP) || input::keyDown(config::getKey(KEY_UP))) else if (controller::down(KEY_UP)) // input::keyDown(SDL_SCANCODE_UP) || input::keyDown(config::getKey(KEY_UP)))
@@ -740,6 +810,7 @@ namespace actor
if ((act->pos.y > min.y && act->pos.x >= min.x && (act->pos.x + act->size.x) <= max.x) || ((room::getDoors() & DOOR_YN) && (act->pos.x >= 24) && (act->pos.x <= 32))) if ((act->pos.y > min.y && act->pos.x >= min.x && (act->pos.x + act->size.x) <= max.x) || ((room::getDoors() & DOOR_YN) && (act->pos.x >= 24) && (act->pos.x <= 32)))
{ {
moving = true; moving = true;
// Si està en les vores d'una porta, espenta cap a centrar-lo
if ((act->pos.y <= min.y) && (act->pos.z == room::getDoor(YN) * 4) && (room::getDoors() & DOOR_YN)) if ((act->pos.y <= min.y) && (act->pos.z == room::getDoor(YN) * 4) && (room::getDoors() & DOOR_YN))
{ {
if (act->pos.x < 28) if (act->pos.x < 28)
@@ -747,10 +818,16 @@ namespace actor
else if (act->pos.x > 28) else if (act->pos.x > 28)
act->push |= PUSH_XN; act->push |= PUSH_XN;
else else
{
act->push |= PUSH_YN; act->push |= PUSH_YN;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
else else
{
act->push |= PUSH_YN; act->push |= PUSH_YN;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
} }
else if (controller::down(KEY_DOWN)) // input::keyDown(SDL_SCANCODE_DOWN) || input::keyDown(config::getKey(KEY_DOWN))) else if (controller::down(KEY_DOWN)) // input::keyDown(SDL_SCANCODE_DOWN) || input::keyDown(config::getKey(KEY_DOWN)))
@@ -760,6 +837,7 @@ namespace actor
if (((act->pos.y + act->size.y) < max.y && act->pos.x >= min.x && (act->pos.x + act->size.x) <= max.x) || ((room::getDoors() & DOOR_YP) && (act->pos.x >= 24) && (act->pos.x <= 32))) if (((act->pos.y + act->size.y) < max.y && act->pos.x >= min.x && (act->pos.x + act->size.x) <= max.x) || ((room::getDoors() & DOOR_YP) && (act->pos.x >= 24) && (act->pos.x <= 32)))
{ {
moving = true; moving = true;
// Si està en les vores d'una porta, espenta cap a centrar-lo
if (((act->pos.y + act->size.y) >= max.y) && (act->pos.z == room::getDoor(YP) * 4) && (room::getDoors() & DOOR_YP)) if (((act->pos.y + act->size.y) >= max.y) && (act->pos.z == room::getDoor(YP) * 4) && (room::getDoors() & DOOR_YP))
{ {
if (act->pos.x < 28) if (act->pos.x < 28)
@@ -767,10 +845,16 @@ namespace actor
else if (act->pos.x > 28) else if (act->pos.x > 28)
act->push |= PUSH_XN; act->push |= PUSH_XN;
else else
{
act->push |= PUSH_YP; act->push |= PUSH_YP;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
else else
{
act->push |= PUSH_YP; act->push |= PUSH_YP;
if (hero::getBoostRun() > 0) act->push |= PUSH_DOUBLE;
}
} }
} }
// if ((input::keyPressed(SDL_SCANCODE_RETURN) || input::keyPressed(config::getKey(KEY_PICK))) && (hero::getSkills() & SKILL_PANTS)) // if ((input::keyPressed(SDL_SCANCODE_RETURN) || input::keyPressed(config::getKey(KEY_PICK))) && (hero::getSkills() & SKILL_PANTS))
@@ -785,7 +869,8 @@ namespace actor
if (picked->pos.y + picked->size.y > room::getMax().y) if (picked->pos.y + picked->size.y > room::getMax().y)
picked->pos.y = room::getMax().y - picked->size.y; picked->pos.y = room::getMax().y - picked->size.y;
picked->pos.z = act->pos.z; picked->pos.z = act->pos.z;
if (does_collide(picked)) find_non_colliding_position(picked);
/*if (does_collide(picked))
{ {
picked->pos.x -= 2; picked->pos.x -= 2;
if (does_collide(picked)) if (does_collide(picked))
@@ -793,7 +878,7 @@ namespace actor
picked->pos.x += 2; picked->pos.x += 2;
picked->pos.y -= 2; picked->pos.y -= 2;
} }
} }*/
act->pos.z += picked->size.z; act->pos.z += picked->size.z;
actor::actor_t *above = act->above; actor::actor_t *above = act->above;
while (above) while (above)
@@ -1026,7 +1111,7 @@ namespace actor
vec3_t min = room::getMin(); vec3_t min = room::getMin();
vec3_t max = room::getMax(); vec3_t max = room::getMax();
if ((act->push & PUSH_KILL) && (act->flags & FLAG_HERO)) if ((act->push & PUSH_KILL) && (act->flags & FLAG_HERO) && (!hero::hasBoostGod()))
{ {
if (!editor::isDevMode()) if (!editor::isDevMode())
{ {
@@ -1055,6 +1140,8 @@ namespace actor
return; return;
} }
if ((act->flags & FLAG_HERO) && (hero::hasBoostGod())) act->push &= ~PUSH_KILL;
// [RZC 26/09/2024] Hack usant react_push en el moviment RAND per a contar la distancia abans de canviar de direcció // [RZC 26/09/2024] Hack usant react_push en el moviment RAND per a contar la distancia abans de canviar de direcció
if (act->movement == MOV_RAND) if (act->movement == MOV_RAND)
{ {
@@ -1073,7 +1160,9 @@ namespace actor
act->pos.z += act->react_push; act->pos.z += act->react_push;
} }
int vel = (act->flags & FLAG_HERO) && (hero::getBoostRun() > 0) ? 2 : 1; //int vel = (act->flags & FLAG_HERO) && (hero::getBoostRun() > 0) ? 2 : 1;
int vel = (act->flags & FLAG_HERO) && (act->push & PUSH_DOUBLE) ? 2 : 1;
act->push &= ~ PUSH_DOUBLE;
if (act->push & PUSH_ZP) if (act->push & PUSH_ZP)
{ {
@@ -1134,8 +1223,10 @@ namespace actor
actor::actor_t *other = actor::get_collision(act); actor::actor_t *other = actor::get_collision(act);
if (other || (act->pos.x < min.x && (!(room::getDoors() & DOOR_XN) || (act->pos.y != 28) || (act->pos.z != room::getDoor(XN) * 4) || !(act->flags & FLAG_HERO)))) if (other || (act->pos.x < min.x && (!(room::getDoors() & DOOR_XN) || (act->pos.y != 28) || (act->pos.z != room::getDoor(XN) * 4) || !(act->flags & FLAG_HERO))))
{ {
if (other) if (other) {
other->push |= push(act, other, PUSH_XN); uint8_t push_value = push(act, other, PUSH_XN);
if (push_value) other->push |= push_value;
}
act->pos.x += vel; act->pos.x += vel;
if (act->flags & FLAG_MOVING) if (act->flags & FLAG_MOVING)
changeMoving(act); changeMoving(act);
@@ -1172,8 +1263,10 @@ namespace actor
actor::actor_t *other = actor::get_collision(act); actor::actor_t *other = actor::get_collision(act);
if (other || ((act->pos.x + act->size.x) > max.x && (!(room::getDoors() & DOOR_XP) || (act->pos.y != 28) || !(act->flags & FLAG_HERO)))) if (other || ((act->pos.x + act->size.x) > max.x && (!(room::getDoors() & DOOR_XP) || (act->pos.y != 28) || !(act->flags & FLAG_HERO))))
{ {
if (other) if (other) {
other->push |= push(act, other, PUSH_XP); uint8_t push_value = push(act, other, PUSH_XP);
if (push_value) other->push |= push_value;
}
act->pos.x -= vel; act->pos.x -= vel;
if (act->flags & FLAG_MOVING) if (act->flags & FLAG_MOVING)
changeMoving(act); changeMoving(act);
@@ -1193,7 +1286,7 @@ namespace actor
room::load(room::getExit(XP)); room::load(room::getExit(XP));
if (llevar_abad) if (llevar_abad)
{ {
actor::remove(actor::find("ABAD")); actor::sendToPurgatory(actor::find("ABAD"));
} }
act->pos.x = room::getMin().x - 3; act->pos.x = room::getMin().x - 3;
act->pos.z = room::getDoor(XN) * 4; act->pos.z = room::getDoor(XN) * 4;
@@ -1213,8 +1306,10 @@ namespace actor
actor::actor_t *other = actor::get_collision(act); actor::actor_t *other = actor::get_collision(act);
if (other || (act->pos.y < min.y && (!(room::getDoors() & DOOR_YN) || (act->pos.x != 28) || (act->pos.z != room::getDoor(YN) * 4) || !(act->flags & FLAG_HERO)))) if (other || (act->pos.y < min.y && (!(room::getDoors() & DOOR_YN) || (act->pos.x != 28) || (act->pos.z != room::getDoor(YN) * 4) || !(act->flags & FLAG_HERO))))
{ {
if (other) if (other) {
other->push |= push(act, other, PUSH_YN); uint8_t push_value = push(act, other, PUSH_YN);
if (push_value) other->push |= push_value;
}
act->pos.y += vel; act->pos.y += vel;
if (act->flags & FLAG_MOVING) if (act->flags & FLAG_MOVING)
changeMoving(act); changeMoving(act);
@@ -1249,8 +1344,10 @@ namespace actor
actor::actor_t *other = actor::get_collision(act); actor::actor_t *other = actor::get_collision(act);
if (other || ((act->pos.y + act->size.y) > max.y && (!(room::getDoors() & DOOR_YP) || (act->pos.x != 28) || !(act->flags & FLAG_HERO)))) if (other || ((act->pos.y + act->size.y) > max.y && (!(room::getDoors() & DOOR_YP) || (act->pos.x != 28) || !(act->flags & FLAG_HERO))))
{ {
if (other) if (other) {
other->push |= push(act, other, PUSH_YP); uint8_t push_value = push(act, other, PUSH_YP);
if (push_value) other->push |= push_value;
}
act->pos.y -= vel; act->pos.y -= vel;
if (act->flags & FLAG_MOVING) if (act->flags & FLAG_MOVING)
changeMoving(act); changeMoving(act);
@@ -1307,7 +1404,8 @@ namespace actor
if (is_above(act, act->below)) if (is_above(act, act->below))
{ {
// ...li pase a ell el push, neteje el meu flag, canvie direcció si pertoca i me ane // ...li pase a ell el push, neteje el meu flag, canvie direcció si pertoca i me ane
act->push |= push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia uint8_t push_value = push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia
if (push_value) act->push |= push_value;
act->push &= ~PUSH_ZN; act->push &= ~PUSH_ZN;
if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z)) if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z))
changeMoving(act); changeMoving(act);
@@ -1328,7 +1426,9 @@ namespace actor
act->below = below; act->below = below;
below->above = act; below->above = act;
// ... i li passem el push, netejem el meu flag i gonnem // ... i li passem el push, netejem el meu flag i gonnem
act->push |= push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia uint8_t push_value = push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia
if (push_value) act->push |= push_value;
act->push &= ~PUSH_ZN; act->push &= ~PUSH_ZN;
if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z)) if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z))
changeMoving(act); changeMoving(act);
@@ -1384,7 +1484,7 @@ namespace actor
{ {
if (act->name[0] == '_') if (act->name[0] == '_')
{ {
actor::remove(act); actor::sendToPurgatory(act);
return; return;
} }
else else
@@ -1401,23 +1501,16 @@ namespace actor
act->anim_wait_count++; act->anim_wait_count++;
} }
if (act->flags & FLAG_HERO) if (act->flags & FLAG_HERO) updateUserInput(act);
updateUserInput(act);
if (act->flags & FLAG_MOVING) if (act->flags & FLAG_MOVING)
{ {
if (act->movement == MOV_HUNT && ((act->pos.x & 7) == 0 || (act->pos.y & 7) == 0)) if (act->movement == MOV_HUNT && ((act->pos.x & 7) == 0 || (act->pos.y & 7) == 0))
changeMoving(act); changeMoving(act);
updateMoving(act); updateMoving(act);
} }
if (act->flags & FLAG_GRAVITY) if (act->flags & FLAG_GRAVITY) act->push |= PUSH_ZN;
act->push |= PUSH_ZN;
// if (act->flags & FLAG_PUSHABLE)
updatePush(act); updatePush(act);
// if (act->flags & FLAG_GRAVITY) updateGravity(act);
// if (act->flags & FLAG_REACTIVE) updateReactive(act);
// act->push = PUSH_NONE;
if (!room_changed && update_all && next) if (!room_changed && update_all && next)
update(next); update(next);
@@ -1500,9 +1593,10 @@ namespace actor
if (editor::isEditing() && (act == selected) && modules::game::getSection() == modules::game::SECTION_ACTOR) if (editor::isEditing() && (act == selected) && modules::game::getSection() == modules::game::SECTION_ACTOR)
draw::swapcol(1, room::getColor(1)); // Si està seleccionat, que canvie de color draw::swapcol(1, room::getColor(1)); // Si està seleccionat, que canvie de color
draw::stencil::set(act->tag); draw::stencil::set(act->tag);
if (!(act->flags & FLAG_SPECIAL) || !(act->name[0] == 'Y') || (brilli_brilli<4) )
draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x + ao, act->bmp_rect.y + oo, flip); draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x + ao, act->bmp_rect.y + oo, flip);
draw::swapcol(1, room::getColor(0)); // Tornem al color per defecte draw::swapcol(1, room::getColor(0)); // Tornem al color per defecte
if ((act->flags & FLAG_SPECIAL) && (act->name[0] != 'A')) if ((act->flags & FLAG_SPECIAL) && (act->name[0] != 'A') && (act->name[0] != 'Z'))
{ {
draw::setSource(brilli); draw::setSource(brilli);
const int dx = (act->bmp_rect.w - 22) >> 1; const int dx = (act->bmp_rect.w - 22) >> 1;
@@ -1635,6 +1729,26 @@ namespace actor
free(act); free(act);
} }
void sendToPurgatory(actor_t *act)
{
if (!act) return;
if (act->prev) act->prev->next = act->next;
if (act == first) first = act->next;
if (act == dirty) dirty = act->next;
if (act->next) act->next->prev = act->prev;
if (act == selected) selected = nullptr;
if (act->below) act->below->above = nullptr;
if (act->above) act->above->below = nullptr;
act->alive = false;
purgatory.push_back(act);
}
void cleanPurgatory()
{
for (auto act : purgatory) remove(act);
purgatory.clear();
}
void pick(actor_t *act) void pick(actor_t *act)
{ {
if (!act) if (!act)
@@ -1917,10 +2031,12 @@ namespace actor
int first_orient = 0; int first_orient = 0;
bool dead = false; bool dead = false;
bool prologo = false; bool prologo = false;
int prologo_objects[4] = {PROLOGO_OBJECT_INITIAL, PROLOGO_OBJECT_INITIAL, PROLOGO_OBJECT_INITIAL, PROLOGO_OBJECT_INITIAL};
int num_prologo_objects=0;
void setPrologo() void setPrologo(const bool value)
{ {
prologo = true; prologo = value;
} }
const bool isPrologo() const bool isPrologo()
@@ -1951,6 +2067,8 @@ namespace actor
lives = 8; lives = 8;
skills = SKILL_NONE; skills = SKILL_NONE;
if (prologo) skills &= SKILL_SHOES; if (prologo) skills &= SKILL_SHOES;
for (int i=0;i<4;++i) prologo_objects[i] = PROLOGO_OBJECT_INITIAL;
num_prologo_objects=0;
parts = PART_NONE; parts = PART_NONE;
for (int i = 0; i < 10; ++i) for (int i = 0; i < 10; ++i)
anbernics[i] = false; anbernics[i] = false;
@@ -1989,8 +2107,8 @@ namespace actor
{ {
return dead; return dead;
} }
const int getBoosterFromString(const char *booster) const int getBoosterFromString(const char *booster)
{ {
static const char *boostset_name[4] = {"RUN", "GOD", "JUMP", "LIVE"}; static const char *boostset_name[4] = {"RUN", "GOD", "JUMP", "LIVE"};
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
@@ -2046,7 +2164,7 @@ namespace actor
switch (getBoosterFromString(booster)) switch (getBoosterFromString(booster))
{ {
case BOOST_GOD: case BOOST_GOD:
boost_god = 99 * 2; boost_god = 99 * 4;
break; break;
case BOOST_RUN: case BOOST_RUN:
boost_steps = 99 * 2; boost_steps = 99 * 2;
@@ -2097,6 +2215,11 @@ namespace actor
boost_jumps--; boost_jumps--;
} }
const bool hasBoostGod()
{
return boost_god > 0;
}
const int getSkillFromString(char *skill) const int getSkillFromString(char *skill)
{ {
static const char *skillset_name[4] = {"SHOES", "GLOVES", "PANTS", "BAG"}; static const char *skillset_name[4] = {"SHOES", "GLOVES", "PANTS", "BAG"};
@@ -2135,7 +2258,12 @@ namespace actor
bool giveSkill(char *skill) bool giveSkill(char *skill)
{ {
return giveSkill(getSkillFromString(skill)); const int skill_number = getSkillFromString(skill);
if (skill_number==SKILL_SHOES) modules::game::setMissatge(" JA TENS LES SABATES!- ARA JA POTS BOTAR!");
else if (skill_number==SKILL_GLOVES) modules::game::setMissatge(" JA TENS ELS GUANTS!- ARA JA POTS ESPENTAR!");
else if (skill_number==SKILL_PANTS) modules::game::setMissatge(" JA TENS ELS PANTALONS!- JA POTS AGAFAR COSES!");
else if (skill_number==SKILL_BAG) modules::game::setMissatge(" JA TENS LA MOTXILLA!- A ARREPLEGAR PECES!");
return giveSkill(skill_number);
} }
bool dropSkill(int skill) bool dropSkill(int skill)
@@ -2197,8 +2325,13 @@ namespace actor
{ {
const int value = getPartFromString(part); const int value = getPartFromString(part);
parts |= value; parts |= value;
if (value != 0) if (value != 0) stats::collectPart();
stats::collectPart();
int num_parts = stats::getNumPartsCollected();
char text[] = " PECES ARREPLEGADES:- 0/6";
text[34] = num_parts + 48;
modules::game::setMissatge(text);
return value != 0; return value != 0;
} }
@@ -2222,6 +2355,18 @@ namespace actor
void pickAnbernic(char *name) void pickAnbernic(char *name)
{ {
anbernics[name[8] - 48] = true; anbernics[name[8] - 48] = true;
int num_anbernics = getNumAmbernicsCollected();
if (num_anbernics==10)
{
modules::game::setMissatge(" HAS DESBLOQUEJAT- EL PROLOGO!");
config::setProgoloDesbloquejat();
}
else
{
char text[] = " ANBERNICS ARREPLEGADES:- 0/10";
text[36] = num_anbernics+48;
modules::game::setMissatge(text);
}
} }
bool wasAnbernicCollected(char *name) bool wasAnbernicCollected(char *name)
@@ -2238,6 +2383,33 @@ namespace actor
return count; return count;
} }
void pickPrologoObject(int which)
{
prologo_objects[which] = PROLOGO_OBJECT_PICKED;
}
void leavePrologoObject(int which)
{
prologo_objects[which] = PROLOGO_OBJECT_LEFT;
num_prologo_objects++;
}
const bool isCarryingPrologoObject()
{
for (auto object : prologo_objects) if (object==PROLOGO_OBJECT_PICKED) return true;
return false;
}
const int getPrologoObjectState(int which)
{
return prologo_objects[which];
}
const int getNumPrologoObjectsDone()
{
return num_prologo_objects;
}
void move(int *x, int *y, int *z) void move(int *x, int *y, int *z)
{ {
actor_t *hero = actor::find("HERO"); actor_t *hero = actor::find("HERO");
@@ -2263,13 +2435,13 @@ namespace actor
int partsCollected = 0; int partsCollected = 0;
bool roomVisited[MAX_ROOMS]; bool roomVisited[MAX_ROOMS];
int livesLost = 0; int livesLost = 0;
int catsLifeOdds = 5; int catsLifeOdds = 2;
uint32_t start_time = 0; uint32_t start_time = 0;
void reset() void reset()
{ {
partsCollected = livesLost = 0; partsCollected = livesLost = 0;
catsLifeOdds = 5; catsLifeOdds = 2;
for (int i = 0; i < MAX_ROOMS; ++i) for (int i = 0; i < MAX_ROOMS; ++i)
roomVisited[i] = false; roomVisited[i] = false;
start_time = SDL_GetTicks(); start_time = SDL_GetTicks();

View File

@@ -33,6 +33,7 @@
#define PUSH_ZP 16 #define PUSH_ZP 16
#define PUSH_ZN 32 #define PUSH_ZN 32
#define PUSH_KILL 64 #define PUSH_KILL 64
#define PUSH_DOUBLE 128
// Tipus de moviment de l'actor // Tipus de moviment de l'actor
#define MOV_NONE 0 // Ningun #define MOV_NONE 0 // Ningun
@@ -109,6 +110,7 @@ namespace actor
int tag; int tag;
int template_category; int template_category;
bool alive;
}; };
void resetTag(); void resetTag();
@@ -169,6 +171,10 @@ namespace actor
void remove(actor_t *act); void remove(actor_t *act);
void sendToPurgatory(actor_t *act);
void cleanPurgatory();
void pick(actor_t *act); void pick(actor_t *act);
actor_t *getPicked(); actor_t *getPicked();
@@ -198,7 +204,16 @@ namespace actor
namespace hero namespace hero
{ {
void setPrologo(); #define PROLOGO_OBJECT_INITIAL 0
#define PROLOGO_OBJECT_PICKED 1
#define PROLOGO_OBJECT_LEFT 2
#define PROLOGO_SHOES 0
#define PROLOGO_PANTS 1
#define PROLOGO_GLOVES 2
#define PROLOGO_BAG 3
void setPrologo(const bool value);
const bool isPrologo(); const bool isPrologo();
void init(const bool complete = true); void init(const bool complete = true);
int getLives(); int getLives();
@@ -218,6 +233,7 @@ namespace actor
void useBoostGod(); void useBoostGod();
void useBoostRun(); void useBoostRun();
void useBoostJump(); void useBoostJump();
const bool hasBoostGod();
const int getSkillFromString(char *skill); const int getSkillFromString(char *skill);
const char *getSkillName(int skill); const char *getSkillName(int skill);
@@ -239,6 +255,12 @@ namespace actor
bool wasAnbernicCollected(char *name); bool wasAnbernicCollected(char *name);
int getNumAmbernicsCollected(); int getNumAmbernicsCollected();
void pickPrologoObject(int which);
void leavePrologoObject(int which);
const bool isCarryingPrologoObject();
const int getPrologoObjectState(int which);
const int getNumPrologoObjectsDone();
void move(int *x, int *y, int *z); void move(int *x, int *y, int *z);
void setFirstPos(); void setFirstPos();
} }

View File

@@ -15,11 +15,15 @@ namespace draw
SDL_Renderer *sdl_renderer = nullptr; // El renderer de SDL SDL_Renderer *sdl_renderer = nullptr; // El renderer de SDL
SDL_Texture *sdl_texture = nullptr; // La textura de SDL a la que pintarem la nostra superficie "screen" i que despres volcarem a pantalla SDL_Texture *sdl_texture = nullptr; // La textura de SDL a la que pintarem la nostra superficie "screen" i que despres volcarem a pantalla
SDL_Rect dest_rect = {0, 0, 320, 240};
static int fullscreen_scale = 1;
static int screen_zoom = 1; static int screen_zoom = 1;
static bool screen_fullscreen = false; static bool screen_fullscreen = false;
static int screen_width = 320; static int screen_width = 320;
static int screen_height = 240; static int screen_height = 240;
std::string screen_title = ""; std::string screen_title = "";
static int screen_mode = SCREEN_MODE_NORMAL;
surface *screen = nullptr; // La superficie screen, que representa la pantalla. Se crea i destrueix internament surface *screen = nullptr; // La superficie screen, que representa la pantalla. Se crea i destrueix internament
surface *destination = nullptr; // Punter a la actual superficie de destí surface *destination = nullptr; // Punter a la actual superficie de destí
@@ -89,8 +93,39 @@ namespace draw
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0);
sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height);
SDL_RendererInfo info;
const int num_render_drivers = SDL_GetNumRenderDrivers();
printf("Available renderers:\n");
for (int i=0; i<num_render_drivers; ++i)
{
SDL_GetRenderDriverInfo(i, &info);
printf(" - %i: %s\n", i, info.name);
}
SDL_GetRendererInfo(sdl_renderer, &info);
printf("\nRenderer: %s\n", info.name);
SDL_ShowCursor(false);
if (screen_fullscreen)
{
int w, h;
SDL_GetWindowSize(sdl_window, &w, &h);
fullscreen_scale = h/screen_height;
dest_rect.w = screen_width * fullscreen_scale;
dest_rect.h = screen_height * fullscreen_scale;
dest_rect.x = (w - dest_rect.w)/2;
dest_rect.y = (h - dest_rect.h)/2;
}
else
{
dest_rect.x = dest_rect.y = 0;
dest_rect.w = screen_width * zoom;
dest_rect.h = screen_height * zoom;
}
// Establim el tamany "logic", indepndent del tamany de finestra // Establim el tamany "logic", indepndent del tamany de finestra
SDL_RenderSetLogicalSize(sdl_renderer, width, height); //SDL_RenderSetLogicalSize(sdl_renderer, width, height);
// Creem la superficie "screen" i la establim com a superficie destinació // Creem la superficie "screen" i la establim com a superficie destinació
screen = createSurface(width, height); screen = createSurface(width, height);
@@ -152,8 +187,27 @@ namespace draw
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0);
sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height);
SDL_ShowCursor(false);
if (screen_fullscreen)
{
int w, h;
SDL_GetWindowSize(sdl_window, &w, &h);
fullscreen_scale = h/screen_height;
dest_rect.w = screen_width * fullscreen_scale;
dest_rect.h = screen_height * fullscreen_scale;
dest_rect.x = (w - dest_rect.w)/2;
dest_rect.y = (h - dest_rect.h)/2;
}
else
{
dest_rect.x = dest_rect.y = 0;
dest_rect.w = screen_width * zoom;
dest_rect.h = screen_height * zoom;
}
// Establim el tamany "logic", indepndent del tamany de finestra // Establim el tamany "logic", indepndent del tamany de finestra
SDL_RenderSetLogicalSize(sdl_renderer, screen_width, screen_height); //SDL_RenderSetLogicalSize(sdl_renderer, screen_width, screen_height);
} }
void setZoom(const int value) void setZoom(const int value)
@@ -203,6 +257,23 @@ namespace draw
return screen_zoom; return screen_zoom;
} }
void toggleScreenMode()
{
screen_mode++;
if (screen_mode == SCREEN_MODE_NUM_MODES) screen_mode = 0;
//reinit();
}
void setScreenMode(const int value)
{
screen_mode = value;
}
const int getScreenMode()
{
return screen_mode;
}
// Crea una superficie i torna un punter a ella // Crea una superficie i torna un punter a ella
surface *createSurface(const uint16_t w, const uint16_t h) surface *createSurface(const uint16_t w, const uint16_t h)
{ {
@@ -629,9 +700,35 @@ namespace draw
// Desbloquejem la textura // Desbloquejem la textura
SDL_UnlockTexture(sdl_texture); SDL_UnlockTexture(sdl_texture);
// Pintem la textura a pantalla if (screen_fullscreen)
SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); {
SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 255);
SDL_RenderClear(sdl_renderer);
}
// Pintem la textura a pantalla
SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, &dest_rect);
if (screen_mode & SCREEN_MODE_SCANLINES)
{
if (screen_zoom>=3 || screen_fullscreen)
{
int zoom = screen_fullscreen ? fullscreen_scale : screen_zoom;
SDL_SetRenderDrawBlendMode(sdl_renderer, SDL_BLENDMODE_BLEND);
for (int y=0; y<screen_height; ++y)
{
SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 192);
SDL_RenderDrawLine(sdl_renderer, dest_rect.x, dest_rect.y + y*zoom, dest_rect.x + dest_rect.w, dest_rect.y + y*zoom);
SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 96);
if (zoom>3) SDL_RenderDrawLine(sdl_renderer, dest_rect.x, 1+dest_rect.y + y*zoom, dest_rect.x + dest_rect.w, 1+dest_rect.y + y*zoom);
}
SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 16);
for (int x=0; x<screen_width; ++x)
{
SDL_RenderDrawLine(sdl_renderer, dest_rect.x + x*zoom, dest_rect.y, dest_rect.x + x*zoom, dest_rect.y + dest_rect.h);
}
}
}
// I ho presentem // I ho presentem
SDL_RenderPresent(sdl_renderer); SDL_RenderPresent(sdl_renderer);
} }

View File

@@ -13,6 +13,12 @@
#define FONT_ZOOM_HORIZONTAL 2 #define FONT_ZOOM_HORIZONTAL 2
#define FONT_ZOOM_BOTH 3 #define FONT_ZOOM_BOTH 3
#define SCREEN_MODE_NORMAL 0
#define SCREEN_MODE_SCANLINES 1
#define SCREEN_MODE_FOSFORO 2
#define SCREEN_MODE_SCANFOS 3
#define SCREEN_MODE_NUM_MODES 4
// Unitat per a la gestió dels recursos gràfics i dibuixat en pantalla // Unitat per a la gestió dels recursos gràfics i dibuixat en pantalla
namespace draw namespace draw
{ {
@@ -44,6 +50,10 @@ namespace draw
const bool getFullscreen(); const bool getFullscreen();
const int getZoom(); const int getZoom();
void toggleScreenMode();
void setScreenMode(const int value);
const int getScreenMode();
/// @brief Crea una superficie i torna un punter a ella /// @brief Crea una superficie i torna un punter a ella
/// @param w ample de la superficie /// @param w ample de la superficie
/// @param h alt de la superficie /// @param h alt de la superficie

View File

@@ -54,10 +54,10 @@ OFFSET CONTINGUT TAMANY DESCRIPCIÓ
25 4 4 tamany del primer axiu 25 4 4 tamany del primer axiu
29 13 1 tamany de la ruta al primer arxiu 29 13 1 tamany de la ruta al primer arxiu
30 "data/hola.txt" 13 la ruta al primer arxiu 30 "data/hola.txt" 13 la ruta al primer arxiu
43 16 4 offset al primer arxiu 43 16 4 offset al segon arxiu
47 4 4 tamany del primer axiu 47 4 4 tamany del segon axiu
51 13 1 tamany de la ruta al primer arxiu 51 14 1 tamany de la ruta al segon arxiu
52 "data/adios.txt" 14 la ruta al primer arxiu 52 "data/adios.txt" 14 la ruta al segon arxiu
- Es un exemple raro, perque ocupa mes la ruta al arxiu que l'arxiu en si, pero espere que la idea quede clara! - Es un exemple raro, perque ocupa mes la ruta al arxiu que l'arxiu en si, pero espere que la idea quede clara!
@@ -260,6 +260,7 @@ namespace file
if (!found) if (!found)
{ {
// [TODO] Donar mes informació de quin recurs no havem trobat // [TODO] Donar mes informació de quin recurs no havem trobat
printf("Arxiu: %s\n", resourcename.c_str());
perror("El recurs no s'ha trobat en l'arxiu de recursos"); perror("El recurs no s'ha trobat en l'arxiu de recursos");
exit(1); exit(1);
} }
@@ -340,7 +341,19 @@ namespace file
#elif __linux__ #elif __linux__
struct passwd *pw = getpwuid(getuid()); struct passwd *pw = getpwuid(getuid());
const char *homedir = pw->pw_dir; const char *homedir = pw->pw_dir;
config_folder = std::string(homedir) + "/." + foldername; config_folder = std::string(homedir) + "/.config/" + foldername;
{
// Intenta crear ".config", per si no existeix
std::string config_base_folder = std::string(homedir) + "/.config";
int ret = mkdir(config_base_folder.c_str(), S_IRWXU);
if (ret == -1 && errno != EEXIST)
{
printf("ERROR CREATING CONFIG BASE FOLDER.");
exit(EXIT_FAILURE);
}
}
#endif #endif
struct stat st = {0}; struct stat st = {0};

View File

@@ -17,12 +17,15 @@ namespace modules
void init() void init()
{ {
audio::playMusic("mus_gameover.ogg", 0); audio::playMusic("mus_gameover.ogg", 0);
if (gat == nullptr) gat = actor::createFromTemplate("GAT-NEGRE"); gat = actor::createFromTemplate("GAT-NEGRE");
} }
bool loop() bool loop()
{ {
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK)) { if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK))
{
if (gat) actor::remove(gat);
gat = nullptr;
return false; return false;
} }

View File

@@ -0,0 +1,72 @@
#include "m_intro.h"
#include "jgame.h"
#include "jdraw.h"
#include "jinput.h"
#include "jaudio.h"
#include "controller.h"
#include "config.h"
#include <SDL2/SDL.h>
#include "actor.h"
namespace modules
{
namespace end_prologo_sequence
{
int stage = 0;
uint32_t time = 0;
void init()
{
time = SDL_GetTicks();
stage = 0;
draw::restorecol(2);
draw::cls(2);
draw::swapcol(1, 7);
draw::setSource(draw::getSurface("prologo3.gif"));
draw::draw(96, 28, 128, 96, 0, 0);
draw::print2("ALE! QUE BON", 13, 17, WHITE, FONT_ZOOM_NONE);
draw::print2("TRABAJ HE HECH!", 11, 19, WHITE, FONT_ZOOM_NONE);
draw::render();
if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg");
actor::templates::load();
}
const bool shouldGoToNext()
{
if (SDL_GetTicks()-time < 1000) return false;
return (SDL_GetTicks()-time > (stage==15||stage==16?10000:5000)) ||
(controller::pressed(KEY_JUMP)) || (controller::pressed(KEY_PICK)) ||
(input::keyPressed(SDL_SCANCODE_SPACE)) || (input::keyPressed(SDL_SCANCODE_RETURN));
}
bool loop()
{
if (controller::pressed(KEY_MENU)) return false;
if (shouldGoToNext())
{
time = SDL_GetTicks();
stage++;
if (stage==2) return false;
switch (stage)
{
case 1:
draw::cls(2);
draw::swapcol(1, 8);
draw::setSource(draw::getSurface("prologo4.gif"));
draw::draw(96, 28, 128, 96, 0, 0);
draw::print2("PERO QUE...?", 12, 17, WHITE, FONT_ZOOM_NONE);
//draw::render();
break;
}
}
draw::render();
return true;
}
}
}

View File

@@ -0,0 +1,10 @@
#pragma once
namespace modules
{
namespace end_prologo_sequence
{
void init();
bool loop();
}
}

View File

@@ -17,10 +17,14 @@ namespace modules
actor::actor_t *act = nullptr; actor::actor_t *act = nullptr;
const char *actor_names[] = {"JAILDESIGNER", "BATMAN", "ROBIN", "EL ALTRE BATMAN", "EL ABAD", "LA ROOMBA", "EL OBRER", "BAMBOLLA DE CAFE", "EL YONKI", "LA PILOTA", "SAM", "LORD ABAD"}; const char *actor_names[] = {"JAILDESIGNER", "BATMAN", "ROBIN", "EL ALTRE BATMAN", "EL ABAD", "LA ROOMBA", "EL OBRER", "BAMBOLLA DE CAFE", "EL YONKI", "LA PILOTA", "SAM", "LORD ABAD"};
const char *actor_ids[] = {"JAILDES", "GAT-BATMAN", "GAT-ROBIN", "BATMAN", "ABAD", "ROOMBA2", "OBRER", "COFFEE", "YONKI", "PILOTA", "SAM", "LORD-ABAD"}; const char *actor_ids[] = {"JAILDES", "GAT-BATMAN", "GAT-ROBIN", "BATMAN", "ABAD", "ROOMBA2", "OBRER", "COFFEE", "YONKI", "PILOTA", "SAM", "LORD-ABAD"};
char time_text[7] = " 00:00";
void init() void init(bool go_direct_to_credits)
{ {
stage = go_direct_to_credits ? 2 : 0;
time = SDL_GetTicks(); time = SDL_GetTicks();
if (go_direct_to_credits) time += 5000;
draw::restorecol(2); draw::restorecol(2);
draw::cls(2); draw::cls(2);
@@ -33,10 +37,24 @@ namespace modules
if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg"); if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg");
actor::templates::load(); actor::templates::load();
int milliseconds = SDL_GetTicks()-actor::stats::getStartTime();
int seconds = milliseconds/1000;
int minutes = seconds / 60;
seconds = seconds % 60;
time_text[0] = minutes<100 ? ' ' : (minutes/100)+48;
time_text[1] = minutes<10 ? ' ' : ((minutes%100)/10)+48;
time_text[2] = (minutes%10)+48;
time_text[4] = (seconds/10)+48;
time_text[5] = (seconds%10)+48;
time_text[6] = 0;
} }
const bool shouldGoToNext() const bool shouldGoToNext()
{ {
if (SDL_GetTicks()-time < 1000) return false;
return (SDL_GetTicks()-time > (stage==15||stage==16?10000:5000)) || return (SDL_GetTicks()-time > (stage==15||stage==16?10000:5000)) ||
(controller::pressed(KEY_JUMP)) || (controller::pressed(KEY_PICK)) || (controller::pressed(KEY_JUMP)) || (controller::pressed(KEY_PICK)) ||
(input::keyPressed(SDL_SCANCODE_SPACE)) || (input::keyPressed(SDL_SCANCODE_RETURN)); (input::keyPressed(SDL_SCANCODE_SPACE)) || (input::keyPressed(SDL_SCANCODE_RETURN));
@@ -126,7 +144,17 @@ namespace modules
} }
case 16: case 16:
draw::cls(2); draw::cls(2);
draw::print2("GRACIES PER JUGAR!", 11, 15, PURPLE, FONT_ZOOM_NONE); draw::print2("GRACIES PER JUGAR!", 11, 9, PURPLE, FONT_ZOOM_VERTICAL);
draw::print2(actor::stats::getRoomsVisited(), 2, 8, 14, TEAL, FONT_ZOOM_NONE);
draw::print2("HABITACIONS VISITADES", 11, 14, GREEN, FONT_ZOOM_NONE);
draw::print2(actor::stats::getLivesLost(), 2, 11, 16, TEAL, FONT_ZOOM_NONE);
draw::print2("VIDES PERDUDES", 14, 16, GREEN, FONT_ZOOM_NONE);
draw::print2(time_text, 11, 18, TEAL, FONT_ZOOM_NONE);
draw::print2("TEMPS TOTAL", 18, 18, GREEN, FONT_ZOOM_NONE);
break; break;
} }

View File

@@ -4,7 +4,7 @@ namespace modules
{ {
namespace end_sequence namespace end_sequence
{ {
void init(); void init(bool go_direct_to_credits=false);
bool loop(); bool loop();
} }
} }

View File

@@ -24,7 +24,7 @@ namespace modules
void init(const bool prologo) void init(const bool prologo)
{ {
if (prologo) actor::hero::setPrologo(); actor::hero::setPrologo(prologo);
actor::clear(true); actor::clear(true);
::game::setUpdateTicks(64); ::game::setUpdateTicks(64);
actor::templates::load(); actor::templates::load();
@@ -289,8 +289,39 @@ namespace modules
return section; return section;
} }
char missatge[255] = "";
void mostra_missatge()
{
if ( (controller::pressed(KEY_MENU)) || (controller::pressed(KEY_PICK)) || (controller::pressed(KEY_JUMP)) )
{
missatge[0] = 0;
audio::resumeMusic();
return;
}
draw::color(BLACK);
draw::fillrect(56, 68, 208, 48);
draw::color(WHITE);
draw::rect(56, 68, 208, 48);
char text[2][25];
int i=0, j=0, k=0;
while (missatge[i]!=0)
{
if (missatge[i]=='-') { text[k][j]=0; i++; j=0; k++; }
text[k][j] = missatge[i];
i++; j++;
}
text[k][j]=0;
draw::print2(text[0], 8, 10, WHITE, FONT_ZOOM_NONE);
draw::print2(text[1], 8, 12, WHITE, FONT_ZOOM_NONE);
draw::render();
}
int loop() int loop()
{ {
if (missatge[0] != 0) { mostra_missatge(); return GAME_NONE; }
int return_value = GAME_NONE; int return_value = GAME_NONE;
if (actor::hero::isDead()) return GAME_DEAD; if (actor::hero::isDead()) return GAME_DEAD;
@@ -325,6 +356,7 @@ namespace modules
actor::update(actor::getFirst()); actor::update(actor::getFirst());
actor::hero::useBoostGod(); actor::hero::useBoostGod();
if ( (actor::hero::getParts()==0x3f) && (room::getCurrent()==45) ) return GAME_END; if ( (actor::hero::getParts()==0x3f) && (room::getCurrent()==45) ) return GAME_END;
if ( (actor::hero::getNumPrologoObjectsDone()==4) && (room::getCurrent()==64) ) return GAME_PROLOGO_END;
} }
} }
@@ -339,7 +371,9 @@ namespace modules
room::draw(); room::draw();
actor::actor_t *selected = actor::getSelected(); actor::actor_t *selected = actor::getSelected();
if (editor::isDevMode() && selected && input::keyPressed(SDL_SCANCODE_M)) actor::setFloatingEditing(true); const bool inside_room_zone = (draw::getLocalX(input::mouseX())>=0 && draw::getLocalY(input::mouseY())>=0 && draw::getLocalX(input::mouseX())<320 && draw::getLocalY(input::mouseY())<240);
if (editor::isDevMode() && selected && inside_room_zone && input::keyPressed(SDL_SCANCODE_M)) actor::setFloatingEditing(true);
if (editor::isDevMode() && actor::getFloatingEditing() && selected) { if (editor::isDevMode() && actor::getFloatingEditing() && selected) {
draw::swapcol(1, GREEN+LIGHT); draw::swapcol(1, GREEN+LIGHT);
@@ -396,12 +430,14 @@ namespace modules
draw::print2("no", 4, 25, col3, FONT_ZOOM_NONE); draw::print2("no", 4, 25, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getLives(), 2, 4, 26, col1, FONT_ZOOM_VERTICAL); draw::print2(actor::hero::getLives(), 2, 4, 26, col1, FONT_ZOOM_VERTICAL);
if (!actor::hero::isPrologo())
{
draw::print2("a", 9, 26, col1, FONT_ZOOM_NONE); draw::print2("a", 9, 26, col1, FONT_ZOOM_NONE);
draw::print2("b", 12, 26, col2, FONT_ZOOM_NONE); draw::print2("b", 12, 26, col2, FONT_ZOOM_NONE);
draw::print2("c", 15, 26, col3, FONT_ZOOM_NONE); draw::print2("c", 15, 26, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostJump(), 2, 8, 27, col3, FONT_ZOOM_NONE); draw::print2(actor::hero::getBoostJump(), 2, 8, 27, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostGod()/2, 2, 11, 27, col1, FONT_ZOOM_NONE); draw::print2(actor::hero::getBoostGod()/4, 2, 11, 27, col1, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostRun()/2, 2, 14, 27, col2, FONT_ZOOM_NONE); draw::print2(actor::hero::getBoostRun()/2, 2, 14, 27, col2, FONT_ZOOM_NONE);
draw::stencil::enable(); draw::stencil::enable();
@@ -437,6 +473,23 @@ namespace modules
room::cycleColor(1); room::cycleColor(1);
} }
} }
} else if (actor::hero::isCarryingPrologoObject())
{
draw::setSource(draw::getSurface("objectes.gif"));
if (actor::hero::getPrologoObjectState(PROLOGO_SHOES)==PROLOGO_OBJECT_PICKED)
{
draw::draw(276,166, 28, 22, 162, 0);
} else if (actor::hero::getPrologoObjectState(PROLOGO_PANTS)==PROLOGO_OBJECT_PICKED)
{
draw::draw(276,166, 18, 23, 167, 22);
} else if (actor::hero::getPrologoObjectState(PROLOGO_GLOVES)==PROLOGO_OBJECT_PICKED)
{
draw::draw(276,166, 21, 22, 165, 45);
} else if (actor::hero::getPrologoObjectState(PROLOGO_BAG)==PROLOGO_OBJECT_PICKED)
{
draw::draw(276,166, 20, 25, 145, 41);
}
}
} }
@@ -667,8 +720,7 @@ namespace modules
} }
draw::setViewport(420, 15, 100, 225); draw::setViewport(420, 15, 100, 225);
mx = draw::getLocalX(input::mouseX());
my = draw::getLocalY(input::mouseY());
bool changed = false; bool changed = false;
@@ -823,6 +875,9 @@ namespace modules
changed = true; changed = true;
} }
*/ */
mx = draw::getLocalX(input::mouseX());
my = draw::getLocalY(input::mouseY());
line+=10; line+=10;
ui::label("POS", 2, line, 48, 11); ui::label("POS", 2, line, 48, 11);
if (input::mouseClk(1) && mx>=2 && mx <=48 && my>=line && my<=line+10) return_value = GAME_EDITOR_BITMAP_POS; if (input::mouseClk(1) && mx>=2 && mx <=48 && my>=line && my<=line+10) return_value = GAME_EDITOR_BITMAP_POS;
@@ -898,7 +953,7 @@ namespace modules
draw::color(PAPER); draw::color(PAPER);
draw::rect(2, 0, 96, 204); draw::rect(2, 0, 96, 204);
if (ui::button("DUPLICATE", 2, line, 48, 11) || input::keyPressed(SDL_SCANCODE_D)) if (ui::button("DUPLICATE", 2, line, 48, 11) || ( input::keyPressed(SDL_SCANCODE_D) && inside_room_zone))
{ {
actor::actor_t *new_act = actor::duplicate(act); actor::actor_t *new_act = actor::duplicate(act);
actor::setUniqueName(new_act); actor::setUniqueName(new_act);
@@ -908,7 +963,7 @@ namespace modules
actor::setFloatingEditing(true); actor::setFloatingEditing(true);
changed = true; changed = true;
} }
if (ui::button("DELETE", 48, line, 48, 11) || input::keyPressed(SDL_SCANCODE_DELETE)) if (ui::button("DELETE", 48, line, 48, 11) || ( input::keyPressed(SDL_SCANCODE_DELETE) && inside_room_zone))
{ {
actor::remove(act); actor::remove(act);
act = nullptr; act = nullptr;
@@ -932,5 +987,13 @@ namespace modules
return return_value; return return_value;
} }
void setMissatge(const char *text)
{
actor::pauseWalkSound();
audio::pauseMusic();
strcpy(missatge, text);
}
} }
} }

View File

@@ -16,6 +16,7 @@ namespace modules
#define GAME_EDITOR_BITMAP_POS 6 #define GAME_EDITOR_BITMAP_POS 6
#define GAME_EDITOR_BITMAP_SIZE 7 #define GAME_EDITOR_BITMAP_SIZE 7
#define GAME_END 8 #define GAME_END 8
#define GAME_PROLOGO_END 9
enum sections { SECTION_GENERAL, SECTION_ROOM, SECTION_ACTOR }; enum sections { SECTION_GENERAL, SECTION_ROOM, SECTION_ACTOR };
@@ -26,5 +27,7 @@ namespace modules
const int getSection(); const int getSection();
std::vector<std::string> getGifs(); std::vector<std::string> getGifs();
void setMissatge(const char *text);
} }
} }

View File

@@ -19,7 +19,11 @@ namespace modules
{ {
if (audio::getCurrentMusic() != "mus_gameover.ogg") audio::playMusic("mus_gameover.ogg", 0); if (audio::getCurrentMusic() != "mus_gameover.ogg") audio::playMusic("mus_gameover.ogg", 0);
if (heroi == nullptr) heroi = actor::create("HERO", {16,32,8}, {6,6,12}, "test.gif", {0,32,20,32}, {-6,38}); if (actor::hero::isPrologo()) {
heroi = actor::create("HERO", {16, 32, 0}, {6, 6, 8}, "gat.gif", {0, 0, 24, 28}, {-4, 32});
} else {
heroi = actor::create("HERO", {16,32,8}, {6,6,12}, "test.gif", {0,32,20,32}, {-6,38});
}
heroi->flags = FLAG_ANIMATED; heroi->flags = FLAG_ANIMATED;
int milliseconds = SDL_GetTicks()-actor::stats::getStartTime(); int milliseconds = SDL_GetTicks()-actor::stats::getStartTime();
@@ -38,7 +42,12 @@ namespace modules
bool loop() bool loop()
{ {
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK)) { return false; } if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK))
{
if (heroi) actor::remove(heroi);
heroi = nullptr;
return false;
}
draw::cls(2); draw::cls(2);
draw::color(1); draw::color(1);
@@ -50,8 +59,16 @@ namespace modules
draw::print2("GAME OVER", 15, 7, YELLOW, FONT_ZOOM_VERTICAL); draw::print2("GAME OVER", 15, 7, YELLOW, FONT_ZOOM_VERTICAL);
if (actor::hero::isPrologo())
{
int num_objectes = 0;
for (int i=0;i<4;++i) if (actor::hero::getPrologoObjectState(i)==PROLOGO_OBJECT_LEFT) num_objectes++;
draw::print2(num_objectes, 2, 11, 12, TEAL, FONT_ZOOM_NONE);
draw::print2("OBJECTES DEJATS", 14, 12, GREEN, FONT_ZOOM_NONE);
} else {
draw::print2(actor::stats::getNumPartsCollected(), 2, 11, 12, TEAL, FONT_ZOOM_NONE); draw::print2(actor::stats::getNumPartsCollected(), 2, 11, 12, TEAL, FONT_ZOOM_NONE);
draw::print2("PARTS TROBADES", 14, 12, GREEN, FONT_ZOOM_NONE); draw::print2("PARTS TROBADES", 14, 12, GREEN, FONT_ZOOM_NONE);
}
draw::print2(actor::stats::getRoomsVisited(), 2, 8, 14, TEAL, FONT_ZOOM_NONE); draw::print2(actor::stats::getRoomsVisited(), 2, 8, 14, TEAL, FONT_ZOOM_NONE);
draw::print2("HABITACIONS VISITADES", 11, 14, GREEN, FONT_ZOOM_NONE); draw::print2("HABITACIONS VISITADES", 11, 14, GREEN, FONT_ZOOM_NONE);

View File

@@ -76,9 +76,17 @@ namespace modules
} }
} }
void cleanup()
{
for (int i=0; i<6; ++i) { actor::remove(parts[i]); parts[i]=nullptr;}
actor::remove(anbernic); anbernic=nullptr;
}
int loop() int loop()
{ {
if (controller::pressed(KEY_MENU)) { if (controller::pressed(KEY_MENU))
{
cleanup();
return INGAME_CONTINUAR; return INGAME_CONTINUAR;
} }
if (controller::pressed(KEY_DOWN) || input::keyPressed(SDL_SCANCODE_DOWN)) if (controller::pressed(KEY_DOWN) || input::keyPressed(SDL_SCANCODE_DOWN))
@@ -94,11 +102,7 @@ namespace modules
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK) || input::keyPressed(SDL_SCANCODE_RETURN)) if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK) || input::keyPressed(SDL_SCANCODE_RETURN))
{ {
audio::playSound("snd_push.wav", SOUND_BASIC); audio::playSound("snd_push.wav", SOUND_BASIC);
if (selected_option==INGAME_EIXIR) cleanup();
{
for (int i=0; i<6; ++i) { actor::remove(parts[i]); parts[i]=nullptr;}
actor::remove(anbernic); anbernic=nullptr;
}
return selected_option; return selected_option;
} }

View File

@@ -31,7 +31,7 @@ namespace modules
void init() void init()
{ {
srand(SDL_GetTicks()); srand(SDL_GetTicks());
anys = draw::getSurface("25anys.gif"); anys = draw::getSurface("25anys.gif"); // getSurface() no crea res, així que no fa falta destruir ni fer res al eixir
num_pixels = 0; num_pixels = 0;
draw::surface *surf = draw::getSurface("jailgames.gif"); draw::surface *surf = draw::getSurface("jailgames.gif");
for (int y=0; y<surf->h; ++y) for (int y=0; y<surf->h; ++y)

View File

@@ -24,7 +24,7 @@ namespace modules
if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg"); if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg");
selected_option = OPTION_JUGAR; selected_option = OPTION_JUGAR;
::game::setUpdateTicks(64); ::game::setUpdateTicks(64);
draw::loadPalette("test.gif"); //draw::loadPalette("test.gif");
surf = draw::getSurface("test.gif"); surf = draw::getSurface("test.gif");
draw::restorecol(2); draw::restorecol(2);
if (config::isProgoloDesbloquejat()) min_option=0; if (config::isProgoloDesbloquejat()) min_option=0;

View File

@@ -0,0 +1,92 @@
#include "m_prologo_intro.h"
#include "jdraw.h"
#include "jinput.h"
#include "jaudio.h"
#include "controller.h"
#include "config.h"
#include <SDL2/SDL.h>
#include "actor.h"
namespace modules
{
namespace prologo_intro
{
int stage = 0;
uint32_t time = 0;
void init()
{
time = SDL_GetTicks();
draw::restorecol(2);
draw::cls(2);
draw::swapcol(1, 9);
draw::setSource(draw::getSurface("prologo1.gif"));
draw::draw(96, 28, 128, 96, 0, 0);
draw::print2("ME ANE A ESCABUSSARME", 10, 17, WHITE, FONT_ZOOM_NONE);
draw::print2("EN LA NOVA PISCINA!", 11, 19, WHITE, FONT_ZOOM_NONE);
draw::render();
if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg");
}
const bool shouldGoToNext()
{
return (SDL_GetTicks()-time > (stage==8?10000:5000)) ||
(controller::pressed(KEY_JUMP)) || (controller::pressed(KEY_PICK)) ||
(input::keyPressed(SDL_SCANCODE_SPACE)) || (input::keyPressed(SDL_SCANCODE_RETURN));
}
void drawActorAt(const char* name, const int x, const int y)
{
draw::swapcol(1,PURPLE);
actor::actor_t *act = actor::createFromTemplate(name); act->flags &= ~FLAG_SPECIAL;
actor::drawAt(act, x, y); actor::remove(act);
}
bool loop()
{
if (controller::pressed(KEY_MENU)) return false;
if (shouldGoToNext())
{
time = SDL_GetTicks();
stage++;
if (stage == 4) return false;
switch (stage)
{
case 1:
draw::cls(2);
draw::swapcol(1, 9);
draw::setSource(draw::getSurface("prologo2.gif"));
draw::draw(96, 28, 128, 96, 0, 0);
draw::print2("MIRA, ESTE SA DEJAT", 10, 17, WHITE, FONT_ZOOM_NONE);
draw::print2("TOT TIRADO PER AI...", 10, 19, WHITE, FONT_ZOOM_NONE);
//draw::render();
break;
case 2:
draw::cls(2);
draw::swapcol(1, 9);
draw::setSource(draw::getSurface("prologo2.gif"));
draw::draw(96, 28, 128, 96, 0, 0);
draw::print2("BACH A DEJARO TOT", 12, 17, WHITE, FONT_ZOOM_NONE);
draw::print2("EN SU PUESTO!", 14, 19, WHITE, FONT_ZOOM_NONE);
//draw::render();
break;
case 3:
draw::cls(2);
draw::swapcol(1, 9);
draw::setSource(draw::getSurface("prologo2.gif"));
draw::draw(96, 28, 128, 96, 0, 0);
draw::print2("BORAS QUE FELIS", 12, 17, WHITE, FONT_ZOOM_NONE);
draw::print2("SE PONE!", 15, 19, WHITE, FONT_ZOOM_NONE);
//draw::render();
break;
}
}
draw::render();
return true;
}
}
}

10
source/m_prologo_intro.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
namespace modules
{
namespace prologo_intro
{
void init();
bool loop();
}
}

View File

@@ -28,7 +28,8 @@
#include "m_editor_bitmap_file.h" #include "m_editor_bitmap_file.h"
#include "m_editor_bitmap.h" #include "m_editor_bitmap.h"
#include "m_end_sequence.h" #include "m_end_sequence.h"
#include "m_prologo_intro.h"
#include "m_end_prologo_sequence.h"
#define M_LOGO 0 #define M_LOGO 0
#define M_INTRO 1 #define M_INTRO 1
@@ -46,6 +47,8 @@
#define M_EDITOR_BITMAP_FILE 13 #define M_EDITOR_BITMAP_FILE 13
#define M_EDITOR_BITMAP 14 #define M_EDITOR_BITMAP 14
#define M_END 15 #define M_END 15
#define M_PROLOGO_INTRO 16
#define M_PROLOGO_END 17
int current_module = M_LOGO; int current_module = M_LOGO;
@@ -73,6 +76,15 @@ void loadConfig()
std::string txt_fullscreen = file::getConfigValue("fullscreen"); std::string txt_fullscreen = file::getConfigValue("fullscreen");
if (txt_fullscreen=="yes") fullscreen = true; if (txt_fullscreen=="yes") fullscreen = true;
int screen_mode = SCREEN_MODE_NORMAL;
std::string txt_fosforo = file::getConfigValue("fosforo");
if (txt_fosforo=="yes") screen_mode |= SCREEN_MODE_FOSFORO;
std::string txt_scanlines = file::getConfigValue("scanlines");
if (txt_scanlines=="yes") screen_mode |= SCREEN_MODE_SCANLINES;
draw::setScreenMode(screen_mode);
static const char* nomtecles[6] = {"keyup", "keydown", "keyleft", "keyright", "keyjump", "keypick"}; static const char* nomtecles[6] = {"keyup", "keydown", "keyleft", "keyright", "keyjump", "keypick"};
for (int i=0; i<6; ++i) for (int i=0; i<6; ++i)
{ {
@@ -92,9 +104,10 @@ void game::init()
{ {
if (game::getParams(1) && strcmp(game::getParams(1), "editor")==0) editor::setDevMode(); if (game::getParams(1) && strcmp(game::getParams(1), "editor")==0) editor::setDevMode();
if (editor::isDevMode()) if (editor::isDevMode()) {
draw::init("The Pool", 520, 240, zoom); draw::init("The Pool", 520, 240, zoom);
else { SDL_ShowCursor(true);
} else {
loadConfig(); loadConfig();
draw::init("The Pool", 320, 240, zoom, fullscreen); draw::init("The Pool", 320, 240, zoom, fullscreen);
console::init(); console::init();
@@ -109,7 +122,11 @@ void game::init()
audio::loadSound("snd_boost.wav"); audio::loadSound("snd_boost.wav");
} }
if (draw::getScreenMode()&SCREEN_MODE_FOSFORO) {
draw::loadPalette("fosforo.gif");
} else {
draw::loadPalette("test.gif"); draw::loadPalette("test.gif");
}
if (editor::isDevMode()) { if (editor::isDevMode()) {
current_module = M_GAME; current_module = M_GAME;
@@ -136,6 +153,19 @@ bool game::loop()
fullscreen = draw::getFullscreen(); fullscreen = draw::getFullscreen();
file::setConfigValue("fullscreen", fullscreen?"yes":"no"); file::setConfigValue("fullscreen", fullscreen?"yes":"no");
} }
if (input::keyPressed(SDL_SCANCODE_F4)) {
draw::toggleScreenMode();
const int mode = draw::getScreenMode();
if (mode&SCREEN_MODE_FOSFORO) {
draw::loadPalette("fosforo.gif");
} else {
draw::loadPalette("test.gif");
}
file::setConfigValue("fosforo", mode&SCREEN_MODE_FOSFORO?"yes":"no");
file::setConfigValue("scanlines", mode&SCREEN_MODE_SCANLINES?"yes":"no");
}
if (input::keyPressed(SDL_SCANCODE_F12)) { if (input::keyPressed(SDL_SCANCODE_F12)) {
draw::reloadAll(); draw::reloadAll();
@@ -150,14 +180,20 @@ bool game::loop()
case M_INTRO: case M_INTRO:
if (!modules::intro::loop()) { modules::menu::init(); current_module = M_MENU; } if (!modules::intro::loop()) { modules::menu::init(); current_module = M_MENU; }
break; break;
case M_PROLOGO_INTRO:
if (!modules::prologo_intro::loop()) { modules::game::init(true); current_module = M_GAME; }
break;
case M_END: case M_END:
if (!modules::end_sequence::loop()) { modules::menu::init(); current_module = M_MENU; } if (!modules::end_sequence::loop()) { modules::menu::init(); current_module = M_MENU; }
break; break;
case M_PROLOGO_END:
if (!modules::end_prologo_sequence::loop()) { modules::end_sequence::init(true); current_module = M_END; }
break;
case M_MENU: case M_MENU:
option = modules::menu::loop(); option = modules::menu::loop();
if (option != OPTION_NONE) { if (option != OPTION_NONE) {
if (option == OPTION_EIXIR) return false; if (option == OPTION_EIXIR) return false;
if (option == OPTION_PROLOGO) { modules::game::init(true); current_module = M_GAME; } if (option == OPTION_PROLOGO) { modules::prologo_intro::init(); current_module = M_PROLOGO_INTRO; }
if (option == OPTION_JUGAR) { modules::game::init(); current_module = M_GAME; } if (option == OPTION_JUGAR) { modules::game::init(); current_module = M_GAME; }
if (option == OPTION_TECLES) { modules::menu_tecles::init(); current_module = M_MENU_TECLES; } if (option == OPTION_TECLES) { modules::menu_tecles::init(); current_module = M_MENU_TECLES; }
if (option == OPTION_GAMEPAD) { modules::menu_gamepad::init(); current_module = M_MENU_GAMEPAD; } if (option == OPTION_GAMEPAD) { modules::menu_gamepad::init(); current_module = M_MENU_GAMEPAD; }
@@ -191,7 +227,11 @@ bool game::loop()
modules::editor_bitmap::init(EDITING_BITMAP_POS); current_module = M_EDITOR_BITMAP; modules::editor_bitmap::init(EDITING_BITMAP_POS); current_module = M_EDITOR_BITMAP;
} else if (option==GAME_EDITOR_BITMAP_SIZE) { } else if (option==GAME_EDITOR_BITMAP_SIZE) {
modules::editor_bitmap::init(EDITING_BITMAP_SIZE); current_module = M_EDITOR_BITMAP; modules::editor_bitmap::init(EDITING_BITMAP_SIZE); current_module = M_EDITOR_BITMAP;
} else if (option==GAME_END) { modules::end_sequence::init(); current_module = M_END; } } else if (option==GAME_END) {
modules::end_sequence::init(); current_module = M_END;
} else if (option==GAME_PROLOGO_END) {
modules::end_prologo_sequence::init(); current_module = M_PROLOGO_END;
}
} }
break; break;

View File

@@ -283,6 +283,17 @@ namespace room
actor::remove(act); actor::remove(act);
act = nullptr; act = nullptr;
} }
} else if (act->name[0]=='X') { // Es un objecte del prólogo sense arreplegar
if (!::editor::isDevMode() && actor::hero::getPrologoObjectState(act->name[2]-48)!=PROLOGO_OBJECT_INITIAL)
{
actor::remove(act);
act = nullptr;
}
} else if (act->name[0]=='Y') { // Es un hueco on deixar un objecte del prólogo
if (!::editor::isDevMode() && actor::hero::getPrologoObjectState(act->name[2]-48)==PROLOGO_OBJECT_LEFT)
{
act->name[0] = 'Z';
}
} }
} }
if (act) actor::setDirty(act, true); if (act) actor::setDirty(act, true);