Skip to content

Commit 8dbcac1

Browse files
committed
fixed origin on actor.json
1 parent 128ad28 commit 8dbcac1

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

bin/data/actors/actor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type" : "sprite",
33
"size" : [ 16, 16 ],
44
"tile-size" : [ 16, 16 ],
5-
"origin" : [ 8, 12 ],
5+
"origin" : [ 0.5, 0.75 ],
66
"mask" : [ 0.25, 0.5, 0.75, 1.0 ],
77
"animation" : {
88
"speed" : 10.0,

bin/data/audio/grampire-death.wav

19.9 KB
Binary file not shown.

bin/data/audio/grampire-hurt.wav

6.61 KB
Binary file not shown.

bin/profiles/default.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
"actor": "grampire",
44
"input": {
55
"binds": {
6-
"gamepad hat 0": "left",
7-
"gamepad hat 1": "right",
8-
"gamepad hat 2": "up",
9-
"gamepad hat 3": "down",
10-
"gamepad 0": [
6+
"left": "left",
7+
"right": "right",
8+
"up": "up",
9+
"down": "down",
10+
"z": [
1111
"shoot",
1212
"select"
1313
],
14-
"gamepad 12": "sprint",
15-
"gamepad 3": "strafe",
16-
"gamepad 1": "reload",
17-
"gamepad 4": [
14+
"left shift": "sprint",
15+
"x": "strafe",
16+
"v": "reload",
17+
"c": [
1818
"next_weapon",
1919
"back"
2020
],
21-
"gamepad 17": "previous_weapon",
22-
"gamepad 20": "action",
23-
"gamepad 21": "escape"
21+
"d": "previous_weapon",
22+
"a": "action",
23+
"escape": "escape"
2424
}
2525
}
2626
}

bin/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"audio" : {
3-
"music-volume" : 0,
4-
"sound-volume" : 0,
5-
"volume" : 0
3+
"music-volume" : 100,
4+
"sound-volume" : 100,
5+
"volume" : 100
66
},
77
"video" : {
88
"resolution" : "1920x1080",

src/Character.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ Character :: Character(
99
Cache<Resource, std::string>* resources,
1010
glm::vec3 pos = glm::vec3(0.0f)
1111
):
12+
Sprite(fn, resources, profile->config()->at<string>("actor"), pos),
1213
m_HP(100),
1314
m_MaxHP(100),
1415
m_Armor(0),
1516
m_MaxArmor(0),
16-
Sprite(fn, resources, profile->config()->at<string>("actor"), pos),
17+
m_Skin(profile->config()->at<string>("actor")),
1718
m_pSession(session),
1819
m_pProfile(profile),
1920
//m_pController(profile->controller().get()),

src/Character.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ class Character:
162162
std::vector<std::string> m_Items;
163163
kit::reactive<int> m_Weapon = 0;
164164

165+
std::string m_Skin;
165166
Session* m_pSession = nullptr;
166167
Profile* m_pProfile = nullptr;
167168
Controller* m_pController = nullptr;

src/Thing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void Thing :: init_thing()
9393
// so we offset
9494
move(glm::vec3(
9595
m_pSprite->origin().x * m_pSprite->size().x,
96-
m_pSprite->origin().y * m_pSprite->size().y,
96+
m_pSprite->origin().y * m_pSprite->size().y,
9797
0.0f
9898
));
9999
//m_pPlaceholder->detach(); // don't want to invalidate iterator

0 commit comments

Comments
 (0)