CHEWY: Work on CppCheck warnings in Object, rename a couple of functions

This commit is contained in:
Strangerke 2022-02-20 00:44:24 +01:00 committed by Paul Gilbert
parent 7d9cd2b8ad
commit 7f85d2d5b0
23 changed files with 104 additions and 139 deletions

View File

@ -674,7 +674,7 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
case GBUCH_INV:
ret = del_invent_slot(GBUCH_INV);
_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
_G(obj)->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
_G(obj)->changeInventory(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
ret_val = true;
break;

View File

@ -1715,7 +1715,7 @@ void set_ani_screen() {
}
void del_inventar(int16 nr) {
_G(obj)->del_inventar(nr, &_G(room_blk));
_G(obj)->delInventory(nr, &_G(room_blk));
_G(spieler).inv_cur = false;
_G(menu_item) = CUR_WALK;
_G(spieler).AkInvent = -1;

View File

@ -328,7 +328,7 @@ void cur_2_inventory() {
}
void inventory_2_cur(int16 nr) {
if (_G(spieler).AkInvent == -1 && _G(obj)->check_inventar(nr)) {
if (_G(spieler).AkInvent == -1 && _G(obj)->checkInventory(nr)) {
del_invent_slot(nr);
_G(menu_item) = CUR_USE;
_G(spieler).AkInvent = nr;
@ -339,7 +339,7 @@ void inventory_2_cur(int16 nr) {
void new_invent_2_cur(int16 inv_nr) {
cur_2_inventory();
_G(obj)->add_inventar(inv_nr, &_G(room_blk));
_G(obj)->addInventory(inv_nr, &_G(room_blk));
inventory_2_cur(inv_nr);
}
@ -351,7 +351,7 @@ void invent_2_slot(int16 nr) {
ok = true;
}
}
_G(obj)->add_inventar(nr, &_G(room_blk));
_G(obj)->addInventory(nr, &_G(room_blk));
}
int16 del_invent_slot(int16 nr) {
@ -371,7 +371,7 @@ void remove_inventory(int16 nr) {
if (nr == _G(spieler).AkInvent) {
del_inventar(nr);
} else {
_G(obj)->del_inventar(nr, &_G(room_blk));
_G(obj)->delInventory(nr, &_G(room_blk));
del_invent_slot(nr);
}
}

View File

@ -71,34 +71,34 @@ Object::~Object() {
int16 Object::load(const char *fname_, RoomMovObject *rmo) {
Common::File f;
bool valid = true;
if (f.open(fname_)) {
if (!iib_datei_header.load(&f)) {
error("objekt::load error");
} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
error("Object::load error");
}
if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
if (iib_datei_header.Size) {
assert(iib_datei_header.Size % RoomMovObject::SIZE() == 0);
for (uint i = 0; i < iib_datei_header.Size / RoomMovObject::SIZE() && valid;
++i, ++rmo) {
bool valid = true;
for (uint i = 0; i < iib_datei_header.Size / RoomMovObject::SIZE() && valid; ++i, ++rmo) {
valid = rmo->load(&f);
}
if (!valid) {
error("objekt::load error");
} else {
max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObject::SIZE();
}
if (!valid)
error("Object::load error");
max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObject::SIZE();
} else
max_inventar_obj = 0;
} else {
error("objekt::load error");
error("Object::load error");
}
f.close();
} else {
error("objekt::load error");
error("Object::load error");
}
return max_inventar_obj;
@ -106,31 +106,32 @@ int16 Object::load(const char *fname_, RoomMovObject *rmo) {
int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
Common::File f;
bool valid = true;
if (f.open(fname_)) {
if (!sib_datei_header.load(&f)) {
error("objekt::load error");
} else if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
error("Object::load error");
}
if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
if (sib_datei_header.Anz) {
bool valid = true;
for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++rsi) {
valid = rsi->load(&f);
}
if (!valid) {
error("objekt::load error");
} else {
max_static_inventar = sib_datei_header.Anz;
}
if (!valid)
error("Object::load error");
max_static_inventar = sib_datei_header.Anz;
} else
max_static_inventar = 0;
} else {
error("objekt::load error");
error("Object::load error");
}
f.close();
} else {
error("objekt::load error");
error("Object::load error");
}
return max_static_inventar;
@ -138,42 +139,42 @@ int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
int16 Object::load(const char *fname_, RoomExit *RoomEx) {
Common::File f;
bool valid = true;
if (f.open(fname_)) {
if (!eib_datei_header.load(&f)) {
error("objekt::load error");
} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
error("Object::load error");
}
if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
if (sib_datei_header.Anz) {
bool valid = true;
for (int i = 0; i < eib_datei_header.Anz && valid; ++i, ++RoomEx) {
valid = RoomEx->load(&f);
}
if (!valid) {
error("objekt::load error");
} else {
max_exit = eib_datei_header.Anz;
}
if (!valid)
error("Object::load error");
max_exit = eib_datei_header.Anz;
} else
max_exit = 0;
} else {
error("objekt::load error");
error("Object::load error");
}
f.close();
} else {
error("objekt::load error");
error("Object::load error");
}
return max_exit;
}
void Object::sort() {
short i;
mov_obj_room[0] = 0;
spieler_invnr[0] = 0;
for (i = 0; i < MAX_MOV_OBJ; i++) {
for (short i = 0; i < MAX_MOV_OBJ; i++) {
if (Rmo[i].RoomNr != -1) {
if (Rmo[i].RoomNr == 255) {
++spieler_invnr[0];
@ -187,8 +188,7 @@ void Object::sort() {
}
void Object::free_inv_spr(byte **inv_spr_adr) {
int16 i;
for (i = 0; i < MAX_MOV_OBJ; i++)
for (int16 i = 0; i < MAX_MOV_OBJ; i++)
if (inv_spr_adr[i] != 0) {
free(inv_spr_adr[i]);
inv_spr_adr[i] = 0;
@ -196,10 +196,8 @@ void Object::free_inv_spr(byte **inv_spr_adr) {
}
int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
int16 i;
int16 ret;
ret = -1;
for (i = 0; i < max_static_inventar && ret == -1; i++) {
int16 ret = -1;
for (int16 i = 0; i < max_static_inventar && ret == -1; i++) {
if (Rsi[i].RoomNr == Player->PersonRoomNr[P_CHEWY] && Rsi[i].HideSib == false) {
if (mouse_x >= Rsi[i].X &&
mouse_x <= (Rsi[i].X + Rsi[i].XOff) &&
@ -212,10 +210,8 @@ int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
}
int16 Object::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
int16 i;
int16 ret;
ret = -1;
for (i = 1; i < mov_obj_room[0] + 1 && ret == -1; i++) {
int16 ret = -1;
for (int16 i = 1; i < mov_obj_room[0] + 1 && ret == -1; i++) {
if (Rmo[mov_obj_room[i]].X != -1 &&
mouse_x >= Rmo[mov_obj_room[i]].X &&
mouse_x <= (Rmo[mov_obj_room[i]].X + Rmo[mov_obj_room[i]].XOff) &&
@ -235,40 +231,34 @@ int16 Object::sib_txt_nr(int16 sib_nr) {
}
int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
int16 ret;
int16 i, j;
int16 ok;
int16 tmp1, tmp2;
int16 action_flag;
ret = NO_ACTION;
int16 ret = NO_ACTION;
tmp1 = maus_obj_nr;
tmp2 = test_obj_nr;
action_flag = 0;
int16 tmp1 = maus_obj_nr;
int16 tmp2 = test_obj_nr;
bool actionFl = false;
for (j = 0; j < 2 && !action_flag; j++) {
for (int16 j = 0; j < 2 && !actionFl; j++) {
if (j) {
tmp1 = test_obj_nr;
tmp2 = maus_obj_nr;
}
if (Rmo[tmp1].ActionObj != -1) {
if (Rmo[tmp1].ActionObj < 30000 &&
Rmo[tmp1].ActionObj == tmp2) {
action_flag = 1;
if (Rmo[tmp1].ActionObj < 30000 && Rmo[tmp1].ActionObj == tmp2) {
actionFl = true;
} else if (Rmo[tmp1].ActionObj >= 30000) {
i = 0;
int16 i = 0;
while (ACTION_OBJ_TBL[i] != Rmo[tmp1].ActionObj &&
ACTION_OBJ_TBL[i] != 32000) {
++i;
}
if (ACTION_OBJ_TBL[i] != 32000) {
++i;
ok = 0;
int16 ok = 0;
while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
if (ACTION_OBJ_TBL[i] == tmp2 + 5000) {
ok = 1;
action_flag = 1;
actionFl = true;
}
++i;
}
@ -277,39 +267,28 @@ int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
}
}
if (action_flag == 1) {
if (!calc_rmo_flip_flop(tmp2)) {
action_flag = NO_ACTION;
} else {
if (tmp2 == test_obj_nr)
ret = OBJEKT_2;
else
ret = OBJEKT_1;
}
}
if (actionFl && calc_rmo_flip_flop(tmp2))
ret = (tmp2 == test_obj_nr) ? OBJEKT_2 : OBJEKT_1;
return ret;
}
int16 Object::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
int16 action_flag;
int16 i;
int16 ok;
action_flag = NO_ACTION;
int16 action_flag = NO_ACTION;
if (Rmo[maus_obj_nr].ActionObj != -1) {
if (Rmo[maus_obj_nr].ActionObj < 30000 &&
Rmo[maus_obj_nr].ActionObj == test_obj_nr) {
action_flag = OBJEKT_2;
} else if (Rmo[maus_obj_nr].ActionObj >= 30000) {
i = 0;
int16 i = 0;
while (ACTION_OBJ_TBL[i] != Rmo[maus_obj_nr].ActionObj &&
ACTION_OBJ_TBL[i] != 32000) {
++i;
}
if (ACTION_OBJ_TBL[i] != 32000) {
++i;
ok = 0;
int16 ok = 0;
while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
if (ACTION_OBJ_TBL[i] == test_obj_nr) {
ok = 1;
@ -341,20 +320,17 @@ void Object::show_sib(int16 nr) {
}
void Object::calc_all_static_detail() {
int16 i;
for (i = 0; i < max_static_inventar; i++) {
for (int16 i = 0; i < max_static_inventar; i++) {
calc_static_detail(i);
}
}
void Object::calc_static_detail(int16 det_nr) {
int16 nr;
int16 i;
int16 n;
AniDetailInfo *adi;
if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
nr = Rsi[det_nr].StaticAk;
int16 nr = Rsi[det_nr].StaticAk;
if (nr != -1) {
if (nr >= 30000) {
i = 0;
@ -368,7 +344,7 @@ void Object::calc_static_detail(int16 det_nr) {
if (nr >= 40) {
n = nr - 40;
adi = _G(det)->get_ani_detail(n);
AniDetailInfo *adi = _G(det)->get_ani_detail(n);
if (adi->repeat)
_G(det)->start_detail(n, 0, ANI_VOR);
else
@ -380,7 +356,7 @@ void Object::calc_static_detail(int16 det_nr) {
}
} else if (nr >= 40) {
n = nr - 40;
adi = _G(det)->get_ani_detail(n);
AniDetailInfo *adi = _G(det)->get_ani_detail(n);
if (adi->repeat)
_G(det)->start_detail(n, 0, ANI_VOR);
else
@ -445,11 +421,9 @@ int16 Object::calc_static_use(int16 nr) {
}
int16 Object::calc_rsi_flip_flop(int16 nr) {
int16 tmp;
int16 ret;
ret = true;
int16 ret = true;
if (Rsi[nr].ZustandFlipFlop > 0 && Rsi[nr].HideSib == false) {
tmp = Rsi[nr].ZustandAk;
int16 tmp = Rsi[nr].ZustandAk;
Rsi[nr].ZustandAk = Rsi[nr].ZustandOff;
Rsi[nr].ZustandOff = tmp;
tmp = Rsi[nr].StaticAk;
@ -472,11 +446,10 @@ void Object::set_rsi_flip_flop(int16 nr, int16 anz) {
}
int16 Object::calc_rmo_flip_flop(int16 nr) {
int16 tmp;
int16 ret;
if (Rmo[nr].ZustandFlipFlop > 0) {
ret = true;
tmp = Rmo[nr].ZustandAk;
int16 tmp = Rmo[nr].ZustandAk;
Rmo[nr].ZustandAk = Rmo[nr].ZustandOff;
Rmo[nr].ZustandOff = tmp;
if (Rmo[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
@ -502,30 +475,26 @@ int16 Object::del_obj_use(int16 nr) {
return ret;
}
void Object::add_inventar(int16 nr, RaumBlk *Rb) {
void Object::addInventory(int16 nr, RaumBlk *Rb) {
Player->room_m_obj[nr].RoomNr = 255;
sort();
_G(room)->calc_invent(Rb, Player);
}
void Object::del_inventar(int16 nr, RaumBlk *Rb) {
void Object::delInventory(int16 nr, RaumBlk *Rb) {
Player->room_m_obj[nr].RoomNr = -1;
sort();
}
void Object::change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
void Object::changeInventory(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
Player->room_m_obj[old_inv].RoomNr = -1;
Player->room_m_obj[new_inv].RoomNr = 255;
sort();
_G(room)->calc_invent(Rb, Player);
}
void Object::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
RaumBlk *Rb) {
void Object::setInventory(int16 nr, int16 x, int16 y, int16 automov, RaumBlk *Rb) {
++mov_obj_room[0];
mov_obj_room[mov_obj_room[0]] = nr;
Player->room_m_obj[nr].RoomNr = Player->PersonRoomNr[P_CHEWY];
@ -536,11 +505,9 @@ void Object::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
sort();
}
int16 Object::check_inventar(int16 nr) {
int16 i;
int16 ret;
ret = false;
for (i = 0; i < spieler_invnr[0] && !ret; i++) {
bool Object::checkInventory(int16 nr) {
bool ret = false;
for (int16 i = 0; i < spieler_invnr[0] && !ret; i++) {
if (spieler_invnr[i + 1] == nr)
ret = true;
}
@ -548,10 +515,8 @@ int16 Object::check_inventar(int16 nr) {
}
int16 Object::is_exit(int16 mouse_x, int16 mouse_y) {
int16 ret;
int16 i;
ret = -1;
for (i = 0; i < max_exit && ret == -1; i++) {
int16 ret = -1;
for (int16 i = 0; i < max_exit && ret == -1; i++) {
if (Re[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
if (mouse_x >= Re[i].X &&
mouse_x <= (Re[i].X + Re[i].XOff) &&

View File

@ -49,7 +49,7 @@ namespace Rooms {
#define KOPF3 48
void Room0::entry() {
if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->check_inventar(0))
if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->checkInventory(0))
_G(det)->hide_static_spr(6);
if (!_G(flags).LoadGame) {

View File

@ -45,7 +45,7 @@ void Room1::gedAction(int index) {
if (_G(spieler).AkInvent == KABEL_INV) {
flag = true;
del_inventar(_G(spieler).AkInvent);
} else if (_G(obj)->check_inventar(KABEL_INV)) {
} else if (_G(obj)->checkInventory(KABEL_INV)) {
flag = true;
_G(obj)->del_obj_use(KABEL_INV);
remove_inventory(KABEL_INV);

View File

@ -133,7 +133,7 @@ bool Room8::gips_wurf() {
wait_detail(5);
_G(spieler).R8GipsWurf = true;
_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
_G(obj)->set_inventar(MASKE_INV, 181, 251, 8, &_G(room_blk));
_G(obj)->setInventory(MASKE_INV, 181, 251, 8, &_G(room_blk));
_G(det)->del_taf_tbl(116, 30, nullptr);
auto_move(8, P_CHEWY);
_G(flags).AtsAction = false;

View File

@ -179,7 +179,7 @@ void Room11::get_card() {
if (_G(spieler).R11CardOk) {
cur_2_inventory();
_G(spieler).R11CardOk = false;
_G(obj)->add_inventar(_G(spieler).R11IdCardNr, &_G(room_blk));
_G(obj)->addInventory(_G(spieler).R11IdCardNr, &_G(room_blk));
_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
cursor_wahl(CUR_AK_INVENT);

View File

@ -329,7 +329,7 @@ int16 Room17::get_oel() {
start_detail_wait(13, 1, ANI_VOR);
_G(spieler).PersonHide[P_CHEWY] = false;
del_inventar(_G(spieler).AkInvent);
_G(obj)->add_inventar(BECHER_VOLL_INV, &_G(room_blk));
_G(obj)->addInventory(BECHER_VOLL_INV, &_G(room_blk));
inventory_2_cur(BECHER_VOLL_INV);
}

View File

@ -96,7 +96,7 @@ void Room21::calc_laser() {
}
if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
if (!_G(obj)->check_inventar(SEIL_INV) && !_G(spieler).R17Seil) {
if (!_G(obj)->checkInventory(SEIL_INV) && !_G(spieler).R17Seil) {
_G(obj)->show_sib(SIB_SEIL_R21);
_G(atds)->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
}

View File

@ -59,7 +59,7 @@ void Room25::entry() {
if (!_G(spieler).R25FirstEntry) {
hide_cur();
if (_G(obj)->check_inventar(TRANSLATOR_INV)) {
if (_G(obj)->checkInventory(TRANSLATOR_INV)) {
_G(obj)->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
_G(atds)->set_ats_str(113, 0, ATS_DATEI);
@ -119,7 +119,7 @@ int16 Room25::gleiter_loesch() {
start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
del_inventar(_G(spieler).AkInvent);
_G(obj)->add_inventar(MILCH_WAS_INV, &_G(room_blk));
_G(obj)->addInventory(MILCH_WAS_INV, &_G(room_blk));
inventory_2_cur(MILCH_WAS_INV);
start_aad_wait(253, -1);
}

View File

@ -61,7 +61,7 @@ void Room29::entry() {
}
void Room29::xit() {
if (_G(obj)->check_inventar(PUMPE_INV))
if (_G(obj)->checkInventory(PUMPE_INV))
del_inventar(PUMPE_INV);
}

View File

@ -163,7 +163,7 @@ int16 Room31::use_topf() {
start_ani_block(3, ABLOCK30);
_G(spieler).PersonHide[P_CHEWY] = false;
del_inventar(_G(spieler).AkInvent);
_G(obj)->add_inventar(MILCH_LEER_INV, &_G(room_blk));
_G(obj)->addInventory(MILCH_LEER_INV, &_G(room_blk));
inventory_2_cur(MILCH_LEER_INV);
ani_nr = CH_TALK6;
dia_nr = 151;

View File

@ -331,7 +331,7 @@ void Room37::use_hahn() {
_G(det)->hide_static_spr(8);
start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
start_aad_wait(141, -1);
_G(obj)->add_inventar(EIER_INV, &_G(room_blk));
_G(obj)->addInventory(EIER_INV, &_G(room_blk));
inventory_2_cur(EIER_INV);
show_cur();
}

View File

@ -107,7 +107,7 @@ void Room40::xit(int16 eib_nr) {
_G(spieler).PersonRoomNr[P_HOWARD] = 28;
} else if (eib_nr == 72) {
if ((_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
if ((_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
|| _G(spieler).R40TrainOk) {
_G(spieler).R40TrainOk = true;
_G(spieler).PersonRoomNr[P_HOWARD] = 45;
@ -344,7 +344,7 @@ int16 Room40::use_mr_pumpkin() {
_G(out)->ausblenden(1);
Room43::catch_pg();
remove_inventory(LIKOER_INV);
_G(obj)->add_inventar(LIKOER2_INV, &_G(room_blk));
_G(obj)->addInventory(LIKOER2_INV, &_G(room_blk));
inventory_2_cur(LIKOER2_INV);
switch_room(40);
start_aad_wait(236, -1);

View File

@ -53,10 +53,10 @@ void Room42::entry() {
_G(atds)->set_ats_str(264, 1, ATS_DATEI);
}
if (_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && !_G(spieler).R42BriefOk)
if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && !_G(spieler).R42BriefOk)
start_aad_wait(302, -1);
if (_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk)
if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk)
start_aad_wait(301, -1);
}
}

View File

@ -58,13 +58,13 @@ void Room48::calc_pic() {
_G(spieler).R48Auswahl[1] = 1;
_G(spieler).R48Auswahl[2] = 1;
if (_G(obj)->check_inventar(VCARD_INV)) {
if (_G(obj)->checkInventory(VCARD_INV)) {
_G(spieler).R48Auswahl[3] = 1;
_G(atds)->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
_G(det)->show_static_spr(4);
}
if (_G(obj)->check_inventar(KAPPE_INV)) {
if (_G(obj)->checkInventory(KAPPE_INV)) {
_G(spieler).R48Auswahl[4] = 1;
_G(atds)->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
_G(det)->show_static_spr(4);

View File

@ -195,7 +195,7 @@ void Room49::use_boy_cigar() {
start_aad_wait(264, -1);
_G(room)->set_zoom(zoom);
_G(obj)->add_inventar(GUM_INV, &_G(room_blk));
_G(obj)->addInventory(GUM_INV, &_G(room_blk));
inventory_2_cur(GUM_INV);
_G(atds)->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);

View File

@ -218,7 +218,7 @@ int16 Room50::use_gum() {
_G(det)->del_static_ani(10);
go_page();
_G(obj)->add_inventar(KEY_INV, &_G(room_blk));
_G(obj)->addInventory(KEY_INV, &_G(room_blk));
inventory_2_cur(KEY_INV);
_G(atds)->set_ats_str(323, 1, ATS_DATEI);
_G(atds)->set_ats_str(327, 1, ATS_DATEI);

View File

@ -86,7 +86,7 @@ int16 Room53::use_man() {
_G(room)->set_timer_status(1, TIMER_STOP);
_G(det)->del_static_ani(1);
start_ani_block(7, ABLOCK35);
_G(obj)->add_inventar(JMKOST_INV, &_G(room_blk));
_G(obj)->addInventory(JMKOST_INV, &_G(room_blk));
inventory_2_cur(JMKOST_INV);
_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
show_cur();

View File

@ -215,7 +215,7 @@ void Room54::talk_verkauf() {
auto_move(4, P_CHEWY);
start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
_G(obj)->add_inventar(BURGER_INV, &_G(room_blk));
_G(obj)->addInventory(BURGER_INV, &_G(room_blk));
inventory_2_cur(BURGER_INV);
} else {
start_aad_wait(313, -1);

View File

@ -318,7 +318,7 @@ int16 Room56::use_kneipe() {
_G(SetUpScreenFunc) = setup_func;
_G(flags).NoScroll = false;
if (_G(obj)->check_inventar(SACKGELD_INV)) {
if (_G(obj)->checkInventory(SACKGELD_INV)) {
remove_inventory(SACKGELD_INV);
start_aad_wait(309, -1);
}

View File

@ -2203,13 +2203,13 @@ void calc_inv_use_txt(int16 test_nr) {
cursor_wahl(_G(menu_item));
ret = del_invent_slot(test_nr);
_G(spieler).InventSlot[ret] = ANGEL2_INV;
_G(obj)->change_inventar(test_nr, ANGEL2_INV, &_G(room_blk));
_G(obj)->changeInventory(test_nr, ANGEL2_INV, &_G(room_blk));
break;
case KUERBIS1_INV:
ret = del_invent_slot(KUERBIS1_INV);
_G(spieler).InventSlot[ret] = K_MASKE_INV;
_G(obj)->change_inventar(KUERBIS1_INV, K_MASKE_INV, &_G(room_blk));
_G(obj)->changeInventory(KUERBIS1_INV, K_MASKE_INV, &_G(room_blk));
invent_2_slot(K_FLEISCH_INV);
invent_2_slot(K_KERNE_INV);
break;
@ -2235,7 +2235,7 @@ void calc_inv_use_txt(int16 test_nr) {
_G(spieler).R42BriefMarke = true;
ret = del_invent_slot(BRIEF_INV);
_G(spieler).InventSlot[ret] = BRIEF2_INV;
_G(obj)->change_inventar(BRIEF_INV, BRIEF2_INV, &_G(room_blk));
_G(obj)->changeInventory(BRIEF_INV, BRIEF2_INV, &_G(room_blk));
break;
case FLASCHE_INV:
@ -2257,7 +2257,7 @@ void calc_inv_use_txt(int16 test_nr) {
cursor_wahl(_G(menu_item));
ret = del_invent_slot(test_nr);
_G(spieler).InventSlot[ret] = B_MARY2_INV;
_G(obj)->change_inventar(test_nr, B_MARY2_INV, &_G(room_blk));
_G(obj)->changeInventory(test_nr, B_MARY2_INV, &_G(room_blk));
break;
case 13:
@ -2283,7 +2283,7 @@ void calc_inv_use_txt(int16 test_nr) {
ret = del_invent_slot(test_nr);
_G(spieler).InventSlot[ret] = 110;
_G(obj)->change_inventar(104, 110, &_G(room_blk));
_G(obj)->changeInventory(104, 110, &_G(room_blk));
break;
case 105: