Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
José Pardo Madera
/
ProjectoMultimeda2025
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
43ca362e
authored
Mar 27, 2025
by
José Pardo Madera
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
El calendario se puede ver (Inicio -> CalendarioVisto)
parent
f06a79a5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
15 deletions
Executable
Historia.cpp
Historia.h
PantallaMundo.cpp
assets/MiedoCalendario1_es.vtt
Executable
View file @
43ca362e
No preview for this file type
Historia.cpp
View file @
43ca362e
...
@@ -17,17 +17,18 @@ void Historia::limpiarEstado(){
...
@@ -17,17 +17,18 @@ void Historia::limpiarEstado(){
};
};
static
void
iniciarInicio
()
{
static
void
iniciarInicio
()
{
Sprite
sprPlanta
(
"assets/plant
a.png"
);
Sprite
sprPantalla
(
"assets/pantall
a.png"
);
Hitbox
hitP
lanta
(
900
,
700
,
12
00
,
-
1000000000
);
Hitbox
hitP
antalla
(
300
,
200
,
5
00
,
-
1000000000
);
auto
funcionPlanta
=
[](
Objeto
*
Planta
)
->
bool
{
Agapito
.
inventario
[
Agapito
.
numObjetos
]
=*
Planta
;
auto
funcionPantalla
=
[](
Objeto
*
Pantalla
)
->
bool
{
Agapito
.
numObjetos
++
;
play_video
(
"assets/MiedoCalendario1"
,
"es"
)
;
play_video
(
"assets/videoPrueba"
,
"es"
);
historiaPrincipal
.
pasarDeEstadoA
(
Historia
::
Secuencia
::
Inicio
,
Historia
::
Secuencia
::
CalendarioVisto
);
return
tru
e
;
return
fals
e
;
};
};
Objeto
Planta
(
sprPlanta
,
sprPlanta
,
sprPlanta
,
hitPlanta
,
1200
,
400
,
300
,
400
,
normal
,
funcionPlanta
);
getPantalla1
()
->
anadirObjeto
(
Planta
);
Objeto
Pantalla
(
sprPantalla
,
sprPantalla
,
sprPantalla
,
hitPantalla
,
0
,
100
,
400
,
400
,
normal
,
funcionPantalla
);
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
}
}
void
Historia
::
siguienteEstado
(
Secuencia
estado
){
void
Historia
::
siguienteEstado
(
Secuencia
estado
){
...
...
Historia.h
View file @
43ca362e
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
class
Historia
{
class
Historia
{
enum
Secuencia
{
public
:
enum
Secuencia
{
Inicio
,
Inicio
,
CalendarioVisto
,
CalendarioVisto
,
CalendarioQuitado
,
CalendarioQuitado
,
...
@@ -13,12 +14,15 @@ class Historia{
...
@@ -13,12 +14,15 @@ class Historia{
LlaveConseguida
,
LlaveConseguida
,
PuedeSalir
PuedeSalir
};
};
private
:
Secuencia
estadoActual
=
Inicio
;
Secuencia
estadoActual
=
Inicio
;
void
limpiarEstado
();
void
limpiarEstado
();
void
siguienteEstado
(
Secuencia
estado
);
void
siguienteEstado
(
Secuencia
estado
);
public
:
public
:
void
pasarDeEstadoA
(
Secuencia
estadoAnterior
,
Secuencia
estadoPosterior
);
void
pasarDeEstadoA
(
Secuencia
estadoAnterior
,
Secuencia
estadoPosterior
);
Historia
();
Historia
();
};
};
...
...
PantallaMundo.cpp
View file @
43ca362e
...
@@ -97,19 +97,18 @@ void PantallaMundo::renderizar(SDL_Renderer *renderer, int tamx, int tamy) {
...
@@ -97,19 +97,18 @@ void PantallaMundo::renderizar(SDL_Renderer *renderer, int tamx, int tamy) {
Fondo1
.
renderizar
(
renderer
,
0
,
0
,
1920
,
1080
,
tamx
,
tamy
);
Fondo1
.
renderizar
(
renderer
,
0
,
0
,
1920
,
1080
,
tamx
,
tamy
);
for
(
int
i
=
0
;
i
<
objetos
.
size
();
i
++
){
objetos
[
i
].
renderizar
(
renderer
,
tamx
,
tamy
);
}
Agapito
.
renderizar
(
renderer
,
tamx
,
tamy
);
Agapito
.
renderizar
(
renderer
,
tamx
,
tamy
);
interfaz
.
renderizar
(
renderer
,
0
,
870
,
1920
,
216
,
tamx
,
tamy
);
interfaz
.
renderizar
(
renderer
,
0
,
870
,
1920
,
216
,
tamx
,
tamy
);
Ojo
[
ojo_abierto
?
0
:
1
].
renderizar
(
renderer
,
1300
,
890
,
400
,
170
,
tamx
,
tamy
);
Ojo
[
ojo_abierto
?
0
:
1
].
renderizar
(
renderer
,
1300
,
890
,
400
,
170
,
tamx
,
tamy
);
for
(
int
i
=
0
;
i
<
objetos
.
size
();
i
++
){
objetos
[
i
].
renderizar
(
renderer
,
tamx
,
tamy
);
}
Agapito
.
renderizar_inventario
(
renderer
,
tamx
,
tamy
);
Agapito
.
renderizar_inventario
(
renderer
,
tamx
,
tamy
);
texto
.
renderizar
(
renderer
,
50
,
50
,
tamx
,
tamy
);
texto
.
renderizar
(
renderer
,
50
,
50
,
tamx
,
tamy
);
}
}
...
...
assets/MiedoCalendario1_es.vtt
0 → 100755
View file @
43ca362e
WEBVTT
1
00:00:00.000 --> 00:00:01.000
¡Oh no!
2
00:00:01.000 --> 00:00:02.125
¡Un calendario!
3
00:00:02.125 --> 00:00:03.750
Desde que uno de estos mató
4
00:00:03.750 --> 00:00:05.125
a mi visabuelo me dan mucho miedo
5
00:00:05.125 --> 00:00:06.250
*Tono de telefono* aiaiai
6
00:00:06.250 --> 00:00:08.000
*Tono de telefono* I'm your little butterfly
7
00:00:07.250 --> 00:00:08.125
¿Que esta sonando?
8
00:00:08.000 --> 00:00:09.250
*Tono de telefono* aiaiai I'm your little
9
00:00:10.000 --> 00:00:11.000
Hola visabuelo
10
00:00:11.000 --> 00:00:13.000
¿Que tal te va en las bahamas?
11
00:00:13.500 --> 00:00:15.000
¡Ah! Me alegro
12
00:00:17.000 --> 00:00:19.000
Si hubiera alguna forma de quitarlo
13
00:00:19.000 --> 00:00:22.000
Quizas si cerrase los ojos
14
00:00:22.000 --> 00:00:22.750
es como si
15
00:00:22.750 --> 00:00:25.000
minimizase la pantalla de un ordenador
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment