-
Notifications
You must be signed in to change notification settings - Fork 105
Notes about the source
this is just a dump of some of the things I’ve noticed in the source code, if someone wants to turn this into a more proper form of documentation, please feel free, god knows I’m not going to. also I apologise in advance if this seems rather rambly and rude
for new items (such as weapons) the following seems to be the bare minimum:
1) an enum entry in eGameItemType in GameTypes.h of the penumbra overture source,
2) an else if clause in cEntityLoader_GameItem::ToItemType in GameItem.cpp of the overture source
2.A) the string here is whats reference in the .ent file as ItemType
3) an entry in mvItemTypes in cInventory::cInventory in inventory.cpp
3.A) (on second thought this next bit doesnt seem entirely correct) I think its done this way to avoid the creation of unnecessary object and to help aid in garbage collection and memory management, as realistically you’ll only really ever be dealing with one item at a time, might as well reuse the object.
4) a .ent file (I’m not entirely sure at the moment what the bare minimum of the contents of one of these is, perhaps I’ll check it out later)
5) and a class derived from cGameItemType
for equippable entities this seems to be the bare minimum (on top of those for regular items):
1) an enum entry in ePlayerState in GameTypes.h
2) an enum entry in ePlayerHandType in GameTypes.h
3) an elseif clause in ToHandType in PlayerHands.cpp
4) a case entry in cPlayerHands::AddModelFromFile in PlayerHands.cpp
5) an entry in mvStates in cPlayer::cPlayer in Player.cpp
6) modify a couple of the if statements in PlayerState_Misc.cpp
6.a) two in cPlayerState_UseItem::OnStartInteract
6.b) one in cPlayerState_UseItem::OnStartExamine
6.c) this may not actually be strictly necessary, I’m adding it for completeness
7) addition to if statements in the onleave events of various other player states, this could probably be simplified by adding some sort of boolean to the base player state class
8) a class deriving from iHudModel
9) a class deriving from iPlayerState
TODO: more stuff.
please dont take anything I’ve written here as the gospel truth, this is just what I’ve found to work for me