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
a51d8578
authored
Apr 24, 2025
by
José Pardo Madera
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Objetos mas pequeños
parent
e4958635
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
Executable
Historia.cpp
Personaje.cpp
Executable
View file @
a51d8578
No preview for this file type
Historia.cpp
View file @
a51d8578
...
@@ -29,7 +29,7 @@ static Objeto generarObjetoCalendario() {
...
@@ -29,7 +29,7 @@ static Objeto generarObjetoCalendario() {
Sprite
sprCalendario
(
"assets/calendario.png"
);
Sprite
sprCalendario
(
"assets/calendario.png"
);
Hitbox
hitCalendario
(
-
100000
,
-
200000
,
-
10000
,
-
1000000000
);
// (Hitbox inacesible)
Hitbox
hitCalendario
(
-
100000
,
-
200000
,
-
10000
,
-
1000000000
);
// (Hitbox inacesible)
Objeto
Calendario
(
sprCalendario
,
sprCalendario
,
sprCalendario
,
hitCalendario
,
400
,
150
,
150
,
2
50
,
normal
,
nullptr
);
Objeto
Calendario
(
sprCalendario
,
sprCalendario
,
sprCalendario
,
hitCalendario
,
400
,
150
,
150
,
1
50
,
normal
,
nullptr
);
return
Calendario
;
return
Calendario
;
}
}
...
@@ -38,7 +38,7 @@ static Objeto generarObjetoCartera(bool (*funcion)(Objeto *, Handle&)) {
...
@@ -38,7 +38,7 @@ static Objeto generarObjetoCartera(bool (*funcion)(Objeto *, Handle&)) {
Sprite
sprCartera
(
"assets/cartera.png"
);
Sprite
sprCartera
(
"assets/cartera.png"
);
Hitbox
hitCartera
(
0
,
0
,
0
,
0
);
// Trivial, solo esta en el inventario
Hitbox
hitCartera
(
0
,
0
,
0
,
0
);
// Trivial, solo esta en el inventario
Objeto
Cartera
(
sprCartera
,
sprCartera
,
sprCartera
,
hitCartera
,
400
,
150
,
150
,
2
50
,
normal
,
funcion
);
Objeto
Cartera
(
sprCartera
,
sprCartera
,
sprCartera
,
hitCartera
,
400
,
150
,
150
,
1
50
,
normal
,
funcion
);
return
Cartera
;
return
Cartera
;
}
}
...
@@ -51,7 +51,7 @@ static Objeto generarObjetoIman() {
...
@@ -51,7 +51,7 @@ static Objeto generarObjetoIman() {
historiaPrincipal
.
pasarDeEstadoA
(
Historia
::
Secuencia
::
CarteraRecuperada
,
Historia
::
Secuencia
::
LlaveConseguida
);
historiaPrincipal
.
pasarDeEstadoA
(
Historia
::
Secuencia
::
CarteraRecuperada
,
Historia
::
Secuencia
::
LlaveConseguida
);
return
false
;
return
false
;
};
};
Objeto
Iman
(
sprIman
,
sprIman
,
sprIman
,
hitIman
,
400
,
150
,
150
,
2
50
,
normal
,
funcionIman
);
Objeto
Iman
(
sprIman
,
sprIman
,
sprIman
,
hitIman
,
400
,
150
,
150
,
1
50
,
normal
,
funcionIman
);
return
Iman
;
return
Iman
;
}
}
...
@@ -71,7 +71,7 @@ static Objeto generarObjetoCarne() {
...
@@ -71,7 +71,7 @@ static Objeto generarObjetoCarne() {
Sprite
sprCarne
(
"assets/carne.png"
);
Sprite
sprCarne
(
"assets/carne.png"
);
Hitbox
hitCarne
(
0
,
0
,
0
,
0
);
// Trivial, solo esta en el inventario
Hitbox
hitCarne
(
0
,
0
,
0
,
0
);
// Trivial, solo esta en el inventario
Objeto
Carne
(
sprCarne
,
sprCarne
,
sprCarne
,
hitCarne
,
400
,
150
,
150
,
2
50
,
normal
,
nullptr
);
Objeto
Carne
(
sprCarne
,
sprCarne
,
sprCarne
,
hitCarne
,
400
,
150
,
150
,
1
50
,
normal
,
nullptr
);
return
Carne
;
return
Carne
;
}
}
...
...
Personaje.cpp
View file @
a51d8578
...
@@ -76,8 +76,8 @@ void Personaje::renderizar(SDL_Renderer *renderer, int tamx, int tamy) {
...
@@ -76,8 +76,8 @@ void Personaje::renderizar(SDL_Renderer *renderer, int tamx, int tamy) {
void
Personaje
::
renderizar_inventario
(
SDL_Renderer
*
renderer
,
int
tamx
,
int
tamy
)
{
void
Personaje
::
renderizar_inventario
(
SDL_Renderer
*
renderer
,
int
tamx
,
int
tamy
)
{
for
(
int
i
=
0
;
i
<
inventario
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
inventario
.
size
();
i
++
)
{
if
(
inventario
[
i
])
{
if
(
inventario
[
i
])
{
inventario
[
i
]
->
setX
(
50
+
i
*
325
);
inventario
[
i
]
->
setX
(
100
+
i
*
330
);
inventario
[
i
]
->
setY
(
8
00
);
inventario
[
i
]
->
setY
(
9
00
);
inventario
[
i
]
->
renderizar
(
renderer
,
tamx
,
tamy
);
inventario
[
i
]
->
renderizar
(
renderer
,
tamx
,
tamy
);
}
}
...
...
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