Skip to content

Commit 99d67cd

Browse files
GBA: Add Social Skill Points + fix Social Move Offset.
1 parent d2a669c commit 99d67cd

File tree

7 files changed

+114
-112
lines changed

7 files changed

+114
-112
lines changed

include/Strings.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ namespace Strings {
3434
extern const std::vector<std::string> GBACastNames_DE, GBACastNames_EN; // GBA Casts.
3535
extern const std::vector<std::string> GBASocialMoveNames_DE, GBASocialMoveNames_EN; // GBA Social Moves.
3636
extern const std::vector<std::string> GBAEpisodeNames_DE, GBAEpisodeNames_EN; // GBA Episodes.
37+
extern const std::vector<std::string> GBASkillPointNames_DE, GBASkillPointNames_EN; // GBA Skill Points.
3738
};
3839

3940
#endif

include/gba/GBASlot.hpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,29 @@ class GBASlot {
4242
uint32_t Simoleons() const;
4343
void Simoleons(const uint32_t V);
4444

45+
uint16_t Ratings() const;
46+
void Ratings(const uint16_t V);
47+
4548
std::string Name() const;
4649
void Name(const std::string &V);
4750

48-
uint16_t Ratings() const;
49-
void Ratings(const uint16_t V);
51+
uint8_t Confidence() const;
52+
void Confidence(const uint8_t V);
53+
54+
uint8_t Mechanical() const;
55+
void Mechanical(const uint8_t V);
56+
57+
uint8_t Strength() const;
58+
void Strength(const uint8_t V);
59+
60+
uint8_t Personality() const;
61+
void Personality(const uint8_t V);
62+
63+
uint8_t Hotness() const;
64+
void Hotness(const uint8_t V);
65+
66+
uint8_t Intellect() const;
67+
void Intellect(const uint8_t V);
5068

5169
uint8_t Cans() const;
5270
void Cans(const uint8_t V);

source/gba/GBASlot.cpp

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,37 @@ void GBASlot::Time(const uint16_t V) { GBASAVUtils::Write<uint16_t>(this->Offs +
3636
uint32_t GBASlot::Simoleons() const { return GBASAVUtils::Read<uint32_t>(this->Offs + 0x5) >> 8; };
3737
void GBASlot::Simoleons(uint32_t V) { GBASAVUtils::Write<uint32_t>(this->Offs + 0x5, (std::min<uint32_t>(999999, V) << 8)); };
3838

39+
/* Get and Set Ratings. */
40+
uint16_t GBASlot::Ratings() const { return GBASAVUtils::Read<uint16_t>(this->Offs + 0xA); };
41+
void GBASlot::Ratings(const uint16_t V) { GBASAVUtils::Write<uint16_t>(this->Offs + 0xA, std::min<uint16_t>(9999, V)); };
42+
3943
/* Get and Set Name. */
4044
std::string GBASlot::Name() const { return SAVUtils::ReadString(GBASAVUtils::SAV->GetData(), this->Offs + 0xD, 0x8); };
4145
void GBASlot::Name(const std::string &V) { SAVUtils::WriteString(GBASAVUtils::SAV->GetData(), this->Offs + 0xD, 0x8, V); };
4246

43-
/* Get and Set Ratings. */
44-
uint16_t GBASlot::Ratings() const { return GBASAVUtils::Read<uint16_t>(this->Offs + 0xA); };
45-
void GBASlot::Ratings(const uint16_t V) { GBASAVUtils::Write<uint16_t>(this->Offs + 0xA, std::min<uint16_t>(9999, V)); };
47+
/* Get and Set the Confidence Skill Points. */
48+
uint8_t GBASlot::Confidence() const { return GBASAVUtils::Read<uint8_t>(this->Offs + 0x22); };
49+
void GBASlot::Confidence(const uint8_t V) { GBASAVUtils::Write<uint8_t>(this->Offs + 0x22, std::min<uint8_t>(5, V)); };
50+
51+
/* Get and Set the Mechanical Skill Points. */
52+
uint8_t GBASlot::Mechanical() const { return GBASAVUtils::Read<uint8_t>(this->Offs + 0x23); };
53+
void GBASlot::Mechanical(const uint8_t V) { GBASAVUtils::Write<uint8_t>(this->Offs + 0x23, std::min<uint8_t>(5, V)); };
54+
55+
/* Get and Set the Strength Skill Points. */
56+
uint8_t GBASlot::Strength() const { return GBASAVUtils::Read<uint8_t>(this->Offs + 0x24); };
57+
void GBASlot::Strength(const uint8_t V) { GBASAVUtils::Write<uint8_t>(this->Offs + 0x24, std::min<uint8_t>(5, V)); };
58+
59+
/* Get and Set the Personality Skill Points. */
60+
uint8_t GBASlot::Personality() const { return GBASAVUtils::Read<uint8_t>(this->Offs + 0x25); };
61+
void GBASlot::Personality(const uint8_t V) { GBASAVUtils::Write<uint8_t>(this->Offs + 0x25, std::min<uint8_t>(5, V)); };
62+
63+
/* Get and Set the Hotness Skill Points. */
64+
uint8_t GBASlot::Hotness() const { return GBASAVUtils::Read<uint8_t>(this->Offs + 0x26); };
65+
void GBASlot::Hotness(const uint8_t V) { GBASAVUtils::Write<uint8_t>(this->Offs + 0x26, std::min<uint8_t>(5, V)); };
66+
67+
/* Get and Set the Intellect Skill Points. */
68+
uint8_t GBASlot::Intellect() const { return GBASAVUtils::Read<uint8_t>(this->Offs + 0x27); };
69+
void GBASlot::Intellect(const uint8_t V) { GBASAVUtils::Write<uint8_t>(this->Offs + 0x27, std::min<uint8_t>(5, V)); };
4670

4771
/* Get and Set Empty Chug-Chug Cola Cans Amount. */
4872
uint8_t GBASlot::Cans() const { return GBASAVUtils::Read<uint8_t>(this->Offset(0xF6, 0xFC, 0x102)); };
@@ -113,7 +137,7 @@ std::unique_ptr<GBACast> GBASlot::Cast(const uint8_t CST) const {
113137

114138
/* Get a Social Move class. */
115139
std::unique_ptr<GBASocialMove> GBASlot::SocialMove(const uint8_t Move) const {
116-
return std::make_unique<GBASocialMove>(this->Offset(0x0, 0x3F0, 0x3F6) + (std::min<uint8_t>(14, Move)) * 0x8, Move);
140+
return std::make_unique<GBASocialMove>(this->Offset(0x3EA, 0x3F0, 0x3F6) + (std::min<uint8_t>(14, Move)) * 0x8, Move);
117141
};
118142

119143
/*

source/strings/GBACasts.cpp

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -27,59 +27,21 @@
2727
#include "Strings.hpp"
2828

2929
const std::vector<std::string> Strings::GBACastNames_DE = {
30-
"Imperator Xizzle",
31-
"Burpel",
32-
"Ara Fusilli",
33-
"Kulio Raubein",
34-
"Avra Kadavra",
35-
"Bigfoot",
36-
"Frankie Fusilli",
37-
"Eber-Eddie",
38-
"Bruno Mezzoalto",
39-
"Heinz Ehrlicher",
40-
"Siegfried Gülle",
41-
"Stiernacken-Jimmy",
42-
"Katie Wintergipfel",
43-
"Lutz G. Roßeklappe",
44-
"Mama Eber",
45-
"Wilma Welle",
46-
"Maulwurfkönig",
47-
"Mumie",
48-
"Alfred Optimus",
49-
"Penelope Rot",
50-
"Pfeffer-Paule",
51-
"Heini Stiesel",
52-
"Simon Paco Pancho",
53-
"Eugen Panza",
54-
"Tristan Legende",
55-
"Yeti"
30+
"Imperator Xizzle", "Burpel", "Ara Fusilli", "Kulio Raubein",
31+
"Avra Kadavra", "Bigfoot", "Frankie Fusilli", "Eber-Eddie",
32+
"Bruno Mezzoalto", "Heinz Ehrlicher", "Siegfried Gülle", "Stiernacken-Jimmy",
33+
"Katie Wintergipfel", "Lutz G. Roßeklappe", "Mama Eber", "Wilma Welle",
34+
"Maulwurfkönig", "Mumie", "Alfred Optimus", "Penelope Rot",
35+
"Pfeffer-Paule", "Heini Stiesel", "Simon Paco Pancho", "Eugen Panza",
36+
"Tristan Legende", "Yeti"
5637
};
5738

5839
const std::vector<std::string> Strings::GBACastNames_EN = {
59-
"Emperor Xizzle",
60-
"Burple",
61-
"Ara Fusilli",
62-
"Auda Sherif",
63-
"Ava Cadavra",
64-
"Bigfoot",
65-
"Frankie Fusilli",
66-
"Dusty Hogg",
67-
"Giuseppi Mezzoalto",
68-
"Honest Jackson",
69-
"Jebediah Jerky",
70-
"Jimmy the Neck",
71-
"Kayleigh Wintercrest",
72-
"Luthor L. Bigbucks",
73-
"Mamma Hogg",
74-
"Misty Waters",
75-
"Lord Mole",
76-
"Mummy",
77-
"Optimum Alfred",
78-
"Penelope Redd",
79-
"Pepper Pete",
80-
"Kent Hackett",
81-
"Sancho Paco Panza",
82-
"Tank Grunt",
83-
"Tristan Legend",
84-
"Yeti"
40+
"Emperor Xizzle", "Burple", "Ara Fusilli", "Auda Sherif",
41+
"Ava Cadavra", "Bigfoot", "Frankie Fusilli", "Dusty Hogg",
42+
"Giuseppi Mezzoalto", "Honest Jackson", "Jebediah Jerky", "Jimmy the Neck",
43+
"Kayleigh Wintercrest", "Luthor L. Bigbucks", "Mamma Hogg", "Misty Waters",
44+
"Lord Mole", "Mummy", "Optimum Alfred", "Penelope Redd",
45+
"Pepper Pete", "Kent Hackett", "Sancho Paco Panza", "Tank Grunt",
46+
"Tristan Legend", "Yeti"
8547
};

source/strings/GBAEpisodes.cpp

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,15 @@
2727
#include "Strings.hpp"
2828

2929
const std::vector<std::string> Strings::GBAEpisodeNames_DE = {
30-
"Wie alles begann",
31-
"Von Gangstern vergraben",
32-
"Plan eines Maulwurfs",
33-
"Ankunft der Außerirdischen",
34-
"Blackout!",
35-
"Ein brandneuer Duft",
36-
"Die neue Cola",
37-
"Da war diese Mumie",
38-
"Trias-Tumult",
39-
"Weltuntergangsstimmung",
40-
"Und alles ging zu Ende",
41-
"Eine ganz besondere Reunion",
30+
"Wie alles begann", "Von Gangstern vergraben", "Plan eines Maulwurfs", "Ankunft der Außerirdischen",
31+
"Blackout!", "Ein brandneuer Duft", "Die neue Cola", "Da war diese Mumie",
32+
"Trias-Tumult", "Weltuntergangsstimmung", "Und alles ging zu Ende", "Eine ganz besondere Reunion",
4233
"Inoffizielle Folge"
4334
};
4435

4536
const std::vector<std::string> Strings::GBAEpisodeNames_EN = {
46-
"It All Began",
47-
"Buried By the Mob",
48-
"What Digs Beneath",
49-
"Aliens Arrived",
50-
"Blackout!",
51-
"A Brand New Scent",
52-
"The New Cola",
53-
"There Was This Mummy",
54-
"Triassic Trouble",
55-
"The Doomed Earth",
56-
"It All Came to an End",
57-
"A Very Special Reunion",
37+
"It All Began", "Buried By the Mob", "What Digs Beneath", "Aliens Arrived",
38+
"Blackout!", "A Brand New Scent", "The New Cola", "There Was This Mummy",
39+
"Triassic Trouble", "The Doomed Earth", "It All Came to an End", "A Very Special Reunion",
5840
"Unofficial episode"
5941
};

source/strings/GBASkillPoints.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* This file is part of Sim2Editor-CPPCore
3+
* Copyright (C) 2020-2021 SuperSaiyajinStackZ, Universal-Team
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*
18+
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
19+
* * Requiring preservation of specified reasonable legal notices or
20+
* author attributions in that material or in the Appropriate Legal
21+
* Notices displayed by works containing it.
22+
* * Prohibiting misrepresentation of the origin of that material,
23+
* or requiring that modified versions of such material be marked in
24+
* reasonable ways as different from the original version.
25+
*/
26+
27+
#include "Strings.hpp"
28+
29+
const std::vector<std::string> Strings::GBASkillPointNames_DE = {
30+
"Vertrauen", "Mechanik", "Stärke", "Persönlichkeit",
31+
"Attraktivität", "Intellekt"
32+
};
33+
34+
const std::vector<std::string> Strings::GBASkillPointNames_EN = {
35+
"Confidence", "Mechanical", "Strength", "Personality",
36+
"Hotness", "Intellect"
37+
};

source/strings/GBASocialMoves.cpp

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,15 @@
2727
#include "Strings.hpp"
2828

2929
const std::vector<std::string> Strings::GBASocialMoveNames_DE = {
30-
"Plaudern",
31-
"Unterhalten",
32-
"Umarmen",
33-
"Prahlen",
34-
"Entschuldigen",
35-
"Schmeicheln",
36-
"Flirten",
37-
"Kuss zuwerfen",
38-
"Küssen",
39-
"Körper Präsentieren",
40-
"Ärgern",
41-
"Beleidigen",
42-
"Bedrohen",
43-
"Unfeine Geste",
44-
"Karatebewegungen"
30+
"Plaudern", "Unterhalten", "Umarmen", "Prahlen",
31+
"Entschuldigen", "Schmeicheln", "Flirten", "Kuss zuwerfen",
32+
"Küssen", "Körper Präsentieren", "Ärgern", "Beleidigen",
33+
"Bedrohen", "Unfeine Geste", "Karatebewegungen"
4534
};
4635

4736
const std::vector<std::string> Strings::GBASocialMoveNames_EN = {
48-
"Chit-Chat",
49-
"Entertain",
50-
"Hug",
51-
"Brag",
52-
"Apologize",
53-
"Sweet Talk",
54-
"Flirt",
55-
"Blow Kiss",
56-
"Kiss",
57-
"Show Off Body",
58-
"Annoy",
59-
"Insult",
60-
"Threaten",
61-
"Rude Gesture",
62-
"Karate Moves"
37+
"Chit-Chat", "Entertain", "Hug", "Brag",
38+
"Apologize", "Sweet Talk", "Flirt", "Blow Kiss",
39+
"Kiss", "Show Off Body", "Annoy", "Insult",
40+
"Threaten", "Rude Gesture", "Karate Moves"
6341
};

0 commit comments

Comments
 (0)