mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-19 14:11:15 +00:00
Add mapper_inven_unwield
This commit is contained in:
parent
e68c2a4784
commit
1366b050b0
@ -1,6 +1,9 @@
|
||||
#include "mapper/mapper.h"
|
||||
|
||||
#include "animation.h"
|
||||
#include "art.h"
|
||||
#include "game_mouse.h"
|
||||
#include "inventory.h"
|
||||
#include "object.h"
|
||||
#include "proto.h"
|
||||
|
||||
@ -12,6 +15,32 @@ static void mapper_mark_all_exit_grids();
|
||||
// 0x559748
|
||||
MapTransition mapInfo = { -1, -1, 0, 0 };
|
||||
|
||||
// 0x48C604
|
||||
int mapper_inven_unwield(Object* obj, int right_hand)
|
||||
{
|
||||
Object* item;
|
||||
int fid;
|
||||
|
||||
reg_anim_begin(ANIMATION_REQUEST_RESERVED);
|
||||
|
||||
if (right_hand) {
|
||||
item = critterGetItem2(obj);
|
||||
} else {
|
||||
item = critterGetItem1(obj);
|
||||
}
|
||||
|
||||
if (item != NULL) {
|
||||
item->flags &= ~OBJECT_IN_ANY_HAND;
|
||||
}
|
||||
|
||||
animationRegisterAnimate(obj, ANIM_PUT_AWAY, 0);
|
||||
|
||||
fid = buildFid(OBJ_TYPE_CRITTER, obj->fid & 0xFFF, 0, 0, (obj->fid & 0x70000000) >> 28);
|
||||
animationRegisterSetFid(obj, fid, 0);
|
||||
|
||||
return reg_anim_end();
|
||||
}
|
||||
|
||||
// 0x48C678
|
||||
int mapper_mark_exit_grid()
|
||||
{
|
||||
|
@ -2,11 +2,14 @@
|
||||
#define FALLOUT_MAPPER_MAPPER_H_
|
||||
|
||||
#include "map.h"
|
||||
#include "obj_types.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
extern MapTransition mapInfo;
|
||||
|
||||
int mapper_inven_unwield(Object* obj, int right_hand);
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
#endif /* FALLOUT_MAPPER_MAPPER_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user