Pokemon& Pokemon::operator=(Base::Pokemon const& other) {
	if (LIBPKMGC_IS_GBA(Pokemon, &other)) {
		if (this == &other) return *this;
		deleteFields();
		initWithEmptyData();
		Base::Pokemon::operator=(other);
		if (GCUnk > 31) GCUnk = 31;
		return *this;
	}
	else return operator=((Pokemon const&)other);
}
Pokemon& Pokemon::operator=(Base::Pokemon const& other) {
	if (LIBPKMGC_IS_GBA(Pokemon, &other)) return operator=((Pokemon const&)other);
	else {
		if (this == &other) return *this;
		deleteFields();
		_flags = 1;
		initWithEmptyData(1);
		Base::Pokemon::operator=(other);

		setTradedFromGCFlag(true);
		GCFlags &= 7;
		if (GCUnk > 31) GCUnk = 31;
		GCFlags |= GCUnk << 3;
		return *this;
	}
}
Pokemon::Pokemon(GC::Pokemon const& other) : Base::Pokemon(100) {
	_flags = 1;
	initWithEmptyData(1);
	*this = other;
}
Example #4
0
PCData::PCData(void) : GC::PCData(0x7198, 3) {
	initWithEmptyData();
}
Example #5
0
PlayerData::PlayerData(void) : GC::PlayerData(0x978) {
	initWithEmptyData();
}
Example #6
0
Save::Save(void) : GC::SaveEditing::Save(0x56000, 2) {
	initWithEmptyData();
}
Example #7
0
DaycareData::DaycareData(void) : GC::DaycareData(0x140) {
	initWithEmptyData();
}
GroupBattleRule::GroupBattleRule(void) : GC::GroupBattleRule(0x90, 62) {
	initWithEmptyData();
}