Type nine pass-through parameters held as integers as the unit, room, grid, skill or skill row pointer they carry
Nine int or uint32_t parameters are only null-checked, read at one field or handed on as a pointer, and callers pass that pointer. NPCMENU_FindMenuIndexByNpcId and OBJECT_RemapClassIdFromParm read and write nClassId (0x4) of a D2UnitStrc * their caller passes. INVENTORY_FillGridRect stores pFillItem into the grid's D2UnitStrc * cells. INV_DrawGridPlacementHighlight casts pGridCoords to D2GridScreenCoordinates * at all three calls. MONSTER_InitMonsterUnit and CLIENT_LoadOrCreatePlayerUnit pass their room on as D2RoomStrc * (AllocDynamicPath, CLIENT_LoadPlayerFromDisk); SERVER_LoadPlayerFromSaveFile's pRoom is the same value one call down. SKILLDESC_DescLine16_MissileDamage hands pSkillsTxt to the mastery helpers, whose row is D2SkillsTxt * (1086). SKILLDESC_DrawSkillDmgPhysical passes pSkillRecord on cast to D2SkillStrc *, as all its callers pass.
Changes 9, applied together
Retype variable
win 0x004b2e30 EAXtypeint32_t→D2UnitStrc *Retype variable
win 0x00552ac0 ESItypeint32_t→D2UnitStrc *Retype variable
win 0x0063a910 Stack[0xc]typeuint32_t→D2UnitStrc *Retype variable
win 0x00483c50 Stack[0x8]typeint32_t→D2GridScreenCoordinates *Retype variable
win 0x004ae8d0 EDXtypeuint32_t→D2RoomStrc *Retype variable
win 0x00534330 Stack[0x10]typeundefined4→D2RoomStrc *Retype variable
win 0x005345a0 Stack[0x10]typeundefined4→D2RoomStrc *Retype variable
win 0x004ec620 EDXtypeint32_t→D2SkillsTxt *Retype variable
win 0x004e99f0 ECXtypeint32_t→D2SkillStrc *