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
08afde94
authored
May 08, 2025
by
José Pardo Madera
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UML
parent
6bbe86cf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
278 additions
and
0 deletions
doc/UML.png
doc/UML.pu
doc/UML.png
0 → 100644
View file @
08afde94
409 KB
doc/UML.pu
0 → 100644
View file @
08afde94
@
startuml
package
"Utils"
{
class
Fuente
{
Permite
cargar
la
fuente
de
manera
lazy
y
con
RAII
..
-
camino
:
string
-
tamano_pt
:
int
-
fuente
:
TTF_Font
*
--
+
Fuente
(
camino
:
string
,
tamano_pt
:
int
)
+
operator
*()
:
TTF_Font
*
+
~
Fuente
()
}
class
Hitbox
{
+
xMaximo
:
int
+
xMinimo
:
int
+
zMaximo
:
int
+
zMinimo
:
int
+
colisiona
(
x
,
z
)
:
bool
}
class
Sprite
{
-
camino
:
string
-
texture
:
SDL_Texture
*
-
get_textura
(
SDL_Renderer
*)
:
SDL_Texture
*
--
+
Sprite
(
camino
:
string
)
+
Sprite
(
Sprite
)
+
renderizar
(
SDL_Renderer
*)
+
getCamino
()
:
string
}
class
Sonido
{
-
archivo
:
Mix_Music
*
-
tocada
:
bool
-
acaba
:
bool
--
+
Sonido
(
ruta
:
string
)
+
play
()
+
pausar
()
+
tocada
()
:
bool
+
acabado
()
:
bool
}
class
Texto
{
-
texto
:
string
-
fg
:
SDL_Color
-
surface
:
SDL_Surface
*
-
texture
:
SDL_Texture
*
--
+
renderizar
(
SDL_Renderer
*)
}
Texto
--*
"1"
Fuente
class
Video
{
{
static
}
+
play_video
(
nombre
:
string
,
idioma
:
string
)
}
}
package
"GestorPantallas"
{
class
Handle
{
-
idPantalla
:
int
-
tamx
:
int
-
tamy
:
int
-
Handle
(
GestorPantallas
&)
--
+
reemplazamePor
(
Pantalla
)
+
addPantalla
(
Pantalla
)
+
removeme
()
+
removeAll
()
+
getTamX
()
:
int
+
getTamY
()
:
int
+
pantallaMinimizada
()
:
bool
}
class
GestorPantallas
{
-
renderer
:
SLD_Renderer
*
-
window
:
SDL_Window
*
-
inicializarSDL
()
:
bool
--
+
GestorPantallas
(
pantallaInicial
:
Pantalla
)
+
mainLoop
()
:
void
}
interface
Pantalla
{
+
manejarEntrada
(
Handle
)
+
renderizar
(
SDL_Renderer
*)
+
transparente
()
:
bool
+
init
()
}
GestorPantallas
--*
"1..*"
Pantalla
:
"pantallas"
Handle
-->
GestorPantallas
}
class
colPantallas
<<
Singleton
>>
{
+
operator
[](
int
)
:
Pantalla
..
+
getPantallaPrincipal
()
:
PantallaPrincipal
+
getPantallaPrincipal2
()
:
PantallaPrincipal2
+
getPantallaFecha
()
:
PantallaFecha
+
getPantallaCama
()
:
PantallaCama
+
getPantallaTutorial
()
:
PantallaTutorial
+
getPantallaGracias
()
:
PantallaGracias
}
colPantallas
--
o
Pantalla
class
Historia
<<
Singleton
>>
{
-
limpiarEstado
()
-
siguienteEstado
(
Secuncia
)
--
+
getEstadoActual
()
:
Secuencia
+
pasarDeEstadoA
(
estadoActual
:
Secuencia
,
siguienteEstado
:
Secuencia
)
+
soltarCartera
:
bool
}
enum
Secuencia
{
PreInicio
Inicio
CalendarioVisto
CalendiarioQuitado
PuzlePantallaResuleto
CajaVista
CajonAbierto
CajaAbierta
LlaveVista
CarteraRecuperada
ImanSacado
LlaveConseguida
}
Historia
--*
"1"
Secuencia
:
"estadoActual"
package
"Personaje"
{
enum
Facing
{
Frente
=
0
Derecha
=
1
Izquierda
=
2
Fondo
=
3
}
class
Personaje
<<
Singleton
>>
{
-
momento_ultimo_movimiento
:
Instant
-
x
:
int
-
profundidades
:
int
-
paso
:
bool
-
primerPaso
:
bool
--
+
move
(
direcion
:
Facing
)
+
renderizar
(
SDL_Renderer
*)
+
renderizarInventario
(
SDL_Renderer
*)
+
comprobarColision
(
Hitbox
)
+
comprobarColisionPasiva
(
Hitbox
)
:
bool
+
unsetInventario
(
pos
:
unsigned
)
+
numObjetos
()
:
unsigned
}
Personaje
--*
"16"
Sprite
Personaje
--*
"1"
Facing
Personaje
--*
Utils
}
package
"Mano"
{
class
Mano
{
-
x
:
int
-
profundidades
:
int
--
+
move
(
direcion
:
Facing
)
+
renderizar
(
SDL_Renderer
*)
+
renderizarCola
(
SDL_Renderer
*)
+
comprobarColision
(
Hitbox
)
+
comprobarColisionPasiva
(
Hitbox
)
:
bool
+
reiniciar
()
}
class
Cola
{
+
x
:
int
+
profundidades
:
int
}
Mano
--*
"4"
Sprite
:
"manos"
Mano
--*
"4"
Sprite
:
"brazos"
Mano
--*
"0..*"
Cola
:
"cola"
Mano
--*
"1"
Facing
:
"estado"
Cola
--*
"1"
Sprite
:
"sprite"
}
class
Objeto
{
-
x
:
int
-
y
:
int
-
w
:
int
-
h
:
int
-
funcionInteracion
:
bool
fn
(
Objeto
*,
Handle
)
--
+
renderizar
(
SDL_Renderer
*)
+
interactuar
(
Handle
)
:
bool
+
colisionarObjeto
(
Hitbox
)
:
bool
}
Objeto
--*
"1"
Sprite
:
"sprite"
Objeto
--*
"1"
Hitbox
:
"hitbox"
package
"Pantallas"
{
class
PantallaCama
{
-
carteraTocada
:
bool
-
movimiento
:
bool
--
+
comprobarColisionesPasivas
(
Handle
)
+
comprobarColisionesActivas
()
}
PantallaCama
..|>
Pantalla
PantallaCama
--*
"1"
Mano
.
Mano
class
PantallaFecha
{
-
combinacionActual
:
int
[
4
]
-
combinacionBuena
:
int
[
4
]
-
AgapitoTieneCarne
:
bool
}
PantallaFecha
..|>
Pantalla
class
PantallaGracias
{}
PantallaGracias
..|>
Pantalla
class
PantallaInicio
{
-
iniciar
(
Handle
)
}
PantallaInicio
..|>
Pantalla
class
PantallaMundo
{
-
siguientePantalla
:
size_t
-
ojoAbierto
:
bool
-
indiceColision
:
int
-
comprobarColisionesPasivas
()
-
comprobarColisionesActivas
()
-
comprobarColisionSiguientePantalla
(
Handle
)
-
hooks
:
Hook
[]
--
#
PantallaMundo
(
posInicioPersonaje
:
int
[
2
])
+
borrarElementos
()
+
anadirObjeto
(
Objeto
)
+
anadirHook
(
Hook
)
+
setOjoAbierto
(
bool
)
}
PantallaMundo
..|>
Pantalla
class
PantallaPrincipal
{}
class
PantallaPrincipal2
{}
PantallaPrincipal
--|>
PantallaMundo
PantallaPrincipal2
--|>
PantallaMundo
class
PantallaTutorial
{}
PantallaTutorial
..|>
Pantalla
}
Pantallas
-->
Utils
Personaje
--*
"3"
Objeto
@
enduml
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