Skip to content

Commit

Permalink
Update some function signatures with proper types
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Jul 16, 2023
1 parent 8ce3c42 commit 01bcef3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3115,9 +3115,9 @@ int32_t card::check_unique_code(card* pcard) {
return TRUE;
return FALSE;
}
void card::get_unique_target(card_set* cset, int32_t controler, card* icard) {
void card::get_unique_target(card_set* cset, uint8_t controler, card* icard) {
cset->clear();
for(int32_t p = 0; p < 2; ++p) {
for(uint8_t p = 0; p < 2; ++p) {
if(!unique_pos[p])
continue;
const auto& player = pduel->game_field->player[controler ^ p];
Expand All @@ -3136,7 +3136,7 @@ void card::get_unique_target(card_set* cset, int32_t controler, card* icard) {
}
}
}
int32_t card::check_cost_condition(int32_t ecode, int32_t playerid) {
int32_t card::check_cost_condition(uint32_t ecode, uint8_t playerid) {
effect_set eset;
pduel->game_field->filter_player_effect(playerid, ecode, &eset, FALSE);
filter_effect(ecode, &eset);
Expand All @@ -3149,7 +3149,7 @@ int32_t card::check_cost_condition(int32_t ecode, int32_t playerid) {
}
return TRUE;
}
int32_t card::check_cost_condition(int32_t ecode, int32_t playerid, int32_t sumtype) {
int32_t card::check_cost_condition(uint32_t ecode, uint8_t playerid, uint32_t sumtype) {
effect_set eset;
pduel->game_field->filter_player_effect(playerid, ecode, &eset, FALSE);
filter_effect(ecode, &eset);
Expand Down
6 changes: 3 additions & 3 deletions card.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ class card : public lua_obj_helper<PARAM_TYPE_CARD> {
int32_t is_not_tuner(card* scard, uint8_t playerid);

int32_t check_unique_code(card* pcard);
void get_unique_target(card_set* cset, int32_t controler, card* icard = 0);
int32_t check_cost_condition(int32_t ecode, int32_t playerid);
int32_t check_cost_condition(int32_t ecode, int32_t playerid, int32_t sumtype);
void get_unique_target(card_set* cset, uint8_t controler, card* icard = nullptr);
int32_t check_cost_condition(uint32_t ecode, uint8_t playerid);
int32_t check_cost_condition(uint32_t ecode, uint8_t playerid, uint32_t sumtype);
int32_t is_summonable_card();
int32_t is_fusion_summonable_card(uint32_t summon_type);
int32_t is_spsummonable(effect* peffect);
Expand Down

0 comments on commit 01bcef3

Please sign in to comment.