REDIVIVUS

Proposals / #704

Name the gamma parameter of the skill draw helpers, plus forwarded thunk parameters

stale · by dtchitt · submitted 2026-11-01, stale 2026-11-01

At Stack[0x10] the parameter is already named nSubIndex (uint16_t), applied from another proposal in this round, so the name this one expects is no longer there.

SKILL_DrawUnitAtRotatedAngle's EDX reaches DRAW_WORLD_Unit_1's nGamma, which doubles the low byte for some units and passes it as D2GFX_DrawImage's fourth argument, where MINIPANEL_DrawButton passes -1. The two PLRSKILLS wrappers pass EDX on to that helper and to SKILL_DrawChargeTrail, so they take nGamma too. The chosen nParticleType on SKILL_DrawChargeTrail looks wrong for the same reason: it is saved at 004c999b and loaded at 004c9af2 as nGamma. The rest are forwarded unchanged and follow the callee, except nRequestHandle on SFILE_CancelAsyncRequestWithStatus, because the checks refuse the callee's hFileHandle and its plate calls the value the request's handle.

Changes 8, applied together

  1. Rename variable win 0x004c9060 EDX

    namenParam→nGamma
  2. Rename variable win 0x004d8520 EDX

    namenParam→nGamma
  3. Rename variable win 0x004d85c0 EDX

    namenParam→nGamma
  4. Rename variable win 0x00557fc0 EAX

    namedwParam→pArgs
  5. Rename variable win 0x0051b1b6 CL

    namebParam→nPacketId
  6. Rename variable win 0x006272a0 Stack[0x10]

    namenParam2→nSubIndex
  7. Rename variable win 0x0052b640 DX

    namenParam→nSize
  8. Rename variable win 0x0041a960 Stack[0x4]

    namenParam→nRequestHandle