Skip to content

PC Differences: GUI, Camera and Input

The counts and mapping states on this page are from the run of 24 November 2026, before the rerun with tools/pccompare/overrides.tsv and the comparison fixes; see PC Differences.

This page lists what the PC release does differently from the PS2 build in hitman3/gui, hitman3/camera and engine/zwindows, and how the PC handles keyboard, mouse and pad prompts. The pairs come from build/pc-compare/diffs.tsv (see PC Comparison). The review covered every pair in these three subsystems whose category is constants, strings, calls, structure or stub-on-one-side (90 pairs). It also covered the 15 largest minor pairs by PS2 size. For each pair, the Ghidra C and the PS2 source were read side by side with show_pair.py, and callers and callees were read where needed. PC data values were read from the unpacked executable. PC font and text data were read from the Steam install. Of the 105 pairs, 68 are real differences, 31 are noise, 6 are wrong pairs and none is left unsure. The 90 flagged pairs split into 66 real, 18 noise and 6 wrong; the 15 minor pairs into 2 real and 13 noise. Per pair verdicts are in build/pc-compare/review/gui-and-input-verdicts.tsv.

"Real" includes layout values, platform adaptations and PC-only features as well as gameplay changes. Each entry says which kind it is.

Keyboard, mouse and pad prompts

This section brings together what the PC does with button prompts. The SDL port shows no pad glyphs when it runs from PC data, and this section explains why.

The pad flag is a start-up option

ZSysInterface::m_bUseGameController is at offset 0x5b on the PS2 and 0x7b on the PC. The PC ZSysInterface has 0x20 more bytes before m_lResolution: offset 0x64 on the PS2 and 0x84 on the PC. Any PC code that reads *(char *)(g_pSysInterface + 0x7b) is testing this flag.

  • The PC sets the flag only when the ini file has the option UseGameController. The option is parsed in ZSysInterfaceWintel's option parser at PC 0x4531c0; ZSysInterface::Initialize clears the flag. The PC never detects a connected pad, and configure.exe does not write the key. The shipped HitmanBloodMoney.ini does not have it.
  • About 30 PC functions test the flag. Among them: ZGameData::GetIcon, ZWINDOWS::SetShowMouse, ZGUIXMLReader2::XMLParse, ZXMLGUISystem::ActivateMenu, ZComponentWindow::OpenWindow, CIngameMap::FrameUpdate and OnWindowOpen, ZUpgradeSelector::Setup and Click, ZHM3TrainingPrev/ZHM3TrainingNext::Click and Update, and the Hitman control and weapon code.

The PS2 ZWINDOWSKEYS string binds the menu actions to the pad:

  • ZW_SELECT=hold(gc,cross), ZW_SELECT2=hold(gc,circle), ZW_SELECT3=hold(gc,triangle), ZW_SELECT4=hold(gc,square);
  • ZW_CANCEL=hold(gc,triangle), ZW_START=tap(gc,start), ZW_L1 and ZW_R1;
  • Analog_Horizontal=ana(gc0,leftx) and Analog_Vertical=ana(gc0,lefty).

The PC string, at 0x77c288, has keyboard and mouse bindings only:

ZWINDOWSKEYS_1={ZW_DOWN=hold(kb,down);ZW_UP=hold(kb,up);ZW_LEFT=hold(kb,left);
ZW_RIGHT=hold(kb,right);ZW_SELECT=hold(kb,return);ZW_CANCEL=hold(kb,esc);
ZW_LBUTTON=hold(ms,left);ZW_RBUTTON=hold(ms,right);ZW_MBUTTON=hold(ms,middle);
ZW_MWHEELUP=tap(ms,wheelup);ZW_MWHEELDOWN=tap(ms,wheeldown);};

ZW_SELECT2 to ZW_SELECT4, ZW_START, ZW_L1, ZW_R1 and ZW_MISC1 have no binding on the PC. The PC ZWinInput class has no analog handles, and the PC ZWinInput::Update (PC 0x551800, unmatched) has no loop that turns the left stick into arrow keys.

Key names of the PC devices

ZActionMapTree::GetSystemKeyName is the same on both builds. It returns the device's DigitalSystemName for the action's first control. The PC devices give these names:

  • Keyboard (ZKeyboardWintel, PC 0x44f410): the DirectInput key name, from GetProperty(DIPROP_KEYNAME), converted from wide characters into a static buffer at 0x8b3ba8.
  • Mouse (ZMouseWintel, PC 0x450190): the button name from the device table, looked up as localised text under AllLevels/Interface/Mouse.
  • Pad (ZGameControlWintel, constructor PC 0x4501c0): IOI's PS2 button names, in a table at 0x75ded0 indexed by the DirectInput button number. Button 0 is triangle, then circle, cross, square, left2, right2, left1, right1, select, leftstick, rightstick, start, and up, right, down, left for buttons 12 to 15. The axes are leftx, lefty, rightx and righty, from a table at 0x75df58.

So a PC pad bound in the gameplay control map does produce the names GetIcon turns into glyphs.

ZGameData::GetIcon

ZGameData::GetIcon is PS2 0x14adb0 and PC 0x4635d0, in src/engine/enginedata/gamedata.cpp. Both builds start the same way: the name is Action::instance->GetSystemKeyName(icon, true), or the tag name itself when that is empty. Then the PC code goes on as follows.

  1. When bUpperCase is set, the PC copies the upper-cased name into a 32-byte static buffer at 0x8b90dc.
  2. bullet_square gives U+E008 whatever the flag.
  3. With the pad flag clear, the PC returns the key name as plain text. For FireWeapon2 it returns the string "Thumb Button or X". It never reaches the glyph table.
  4. With the flag set, the PC uses the PS2 table unchanged:
    • cross U+E007, circle U+E004, square U+E005, triangle U+E006, start U+E009;
    • select "SELECT", left2 and Map "L2", left1 "L1", right1 "R1", leftstick "L3", rightstick "R3";
    • left, right, up and down as words.

ZGameData::InsertIconsInText (PC 0x463a20) and AddIconToText (PC 0x463c90, a virtual at +0x80 on the PC) are the same as on the PS2.

Four element types drop their prompts

The PC adds a helper at PC 0x463b30, next to InsertIconsInText in gamedata.cpp. It copies the text and deletes every {...} tag without inserting anything:

if (c == '{') { while (*p && *p != '}') p++; p++; }   /* tag dropped */
else zstring_append(dest, start, p);

Four PS2 callers of InsertIconsInText call this helper on the PC instead:

  • ZNavigator::SetText (PS2 0x2183c8, PC 0x55f960);
  • ZTextBlock::SetText (PS2 0x2193d4, PC 0x560610);
  • ZShowVar::SetText (PS2 0x3c2864, PC 0x67b5f0);
  • IUpgradeInterface::GetButtonText (PS2 0x3c7ef8, PC 0x67f020).

On the PC, menu legends and navigator buttons therefore never show a prompt, with or without a pad. The localisation text "Buttons/Select2", which is {ZW_SELECT} SELECT, shows as " SELECT".

Seven PC callers still expand tags:

  • InsertIcons in the in-game map (PC 0x6672d0);
  • ZStatisticsTest::OnWindowOpen;
  • ZNewsPaperMissingCable::OnWindowOpen;
  • ZMissingSpaceGameSizeTextBlock::SetText;
  • ZUpgradeInfo::SetupTextGraphic and ZUpgradeInfo::Setup;
  • ZHM3LevelControlM00::GetLocalisedText.

The PC fonts have no pad glyphs

The fonts are ZTTFONT prim data. Each font holds a sorted table of 20-byte SGlyph records, looked up by bsearch in ZTTFONT::GetCharInfo. That function is the same on both builds (PC 0x55a770). A character the font lacks is drawn as a space.

In the Steam data no value from 0xE004 to 0xE009 occurs anywhere in Scenes/HitmanBloodMoney.PRM. The same is true of the PRM files of Scenes/M00 and saveandcontinue. The three front-end font tables (209, 257 and 257 glyphs) have Latin-1, U+2022 (•) and three private-use glyphs, U+F000 to U+F002, but none of the PS2 prompt glyphs.

So on the real PC game, even with UseGameController, every {cross}-style prompt that reaches GetIcon comes out as a blank. {bullet_square} (U+E008), which the PC text uses 196 times, is also drawn as a space.

The PC text still uses tags

Scenes/HitmanBloodMoney.LOC keeps the PS2 tag scheme: {bullet_square} 196 times, {ZW_SELECT} 38, {ZW_CANCEL} 15, {ZW_SELECT2} 11, {ZW_SELECT4} 10, {start} 6, {ZW_SELECT3} 3, {MapLegend} 2, and {cross}, {square}, {Start} and {MapSelect} once each. menu/online.xml has one {ZW_SELECT} and one {ZW_CANCEL}.

The PC asks for some locale keys of its own. CIngameMap::SetCurrentMap uses Legend_PC and Legend_Back_PC in /AllLevels/Map, where the PS2 uses Legend_PS2_Xbox and Legend_Back_PS2_Xbox. The tutorial texts fall back to m00/Tutorials/<key>_PC where the PS2 uses _PS2 (ZInfoDisplay::Add, ZHM3LevelControlM00::GetLocalisedText).

ZGUIXMLReader2::XMLParse (PS2 0x21c1ec, PC 0x562c30) sets the platform name. The PS2 always uses "PS2". The PC uses "PS2" when the pad flag is set and "PC" otherwise, after a dead store of "NONE". startElement reads <Platform PS2="True"> or <Platform PC="True"> blocks by this name. The PC menu/frontend.xml has 40 PS2, 32 PC and 38 XBOX blocks; menu/online.xml has 24, 69 and 74.

  • The PS2 blocks carry the 512x448 window templates and the Legend to Legend6 text blocks ("Buttons/Select2", "Buttons/Back", ...).
  • The PC blocks replace the legends with clickable CloseWindow buttons ("Buttons/Back", "Buttons/Accept"). They open RenderOptionMenu and ButtonConfiguration instead of AdjustScreenMenu and the turn-speed slider.

A PC player with the pad flag gets the PS2 layout, with legends whose tags the PC strips.

Prompts the PC adds

  • Key names in the action, pickup and drop prompts. The PS2 headers already declare m_rBigButtonSymbol_PcOnly, m_rButtonSymbolChar_PcOnly and ..._PcOnlyOutline in ZActionMenuBase and ZDropDisplay, but the PS2 code never resolves them.
    • The PC ConvertInputRefs resolves them, and the PC-only function 0x66d9e0 fills them. That function is called from the PC ZOSD::ClassFrameUpdate (0x661350).
    • It takes GetSystemKeyName of PickupFast, ActionMenuFast or DropItem, chosen by the menu's geom name, and falls back to GetKeyName.
    • It writes the upper-cased name inside the button symbol. A one-character name uses the small symbol. A longer name uses the big symbol and is cut to three characters, except that the pickup prompt can use AllLevels/Interface/KeyConfiguration / PickupSPC instead.
    • This path never tests the pad flag.
  • Mouse pointer. PS2 ZWINDOWS::SetShowMouse (0x207d7c) ignores its argument and always hides the pointer. PC 0x551c00 computes show = bShow && !m_bUseGameController and hides the pointer when show is false. This pair is minor, so the comparison does not flag it. The PC also gives the pointer its own camera: ZXMLGUISystem::SetupCameras reads the scene value MouseCam and uses view 0xb3.

What this means for the SDL port

The port runs the PS2 code with the PS2 bindings, so {ZW_SELECT} with a pad resolves to cross and GetIcon returns U+E007. The port's prompt override (port/engine/enginedata/_sdl/gamedataoverridesdl.cpp, port/engine/system/_sdl/inputpromptsdl.cpp) does the same for a PlayStation pad, or when the launcher asks for PlayStation glyphs. The PC font has no glyph at U+E007, so ZTTFONT::GetCharInfo draws a space. The bindings and the tags are not the cause; the missing glyphs are.

There are two ways to fix it:

  • Use text labels for every pad when the data is the PC install. The InputPromptPadLabel path already does this for other pads ("[A]"); it would need PlayStation names such as "[CROSS]".
  • Add glyph records and an icon texture for U+E004 to U+E009 to the PC fonts when they are loaded.

{bullet_square} (U+E008) needs a fix as well. U+2022, which the PC font has, is the obvious replacement.

Port status. The second way is done for the PC-data mode: every scene gets an icon texture (id 2040) drawn from vector shapes, and the port's ZTTFONT::GetCharInfo answers U+E004 to U+E007 and U+E009 with records in the PS2 fonts' metrics that point at it. {bullet_square} gives U+2022, and the action, pickup and drop menus draw the glyph in place of the PC's blank key cap. The XML reader selects the PC checkbox and Exit Game controls. The converter removes the EAX option. See Playing from a PC installation.

Behaviour differences

hitman3/gui: ZGui (src/hitman3/gui/gui.cpp)

  • ZGui::ClassFrameUpdate (PS2 0x3b5350, PC 0x670fc0). Gameplay and input.
    • Weapon hotkeys. With no menu open, PC-only 0x65c100 tests seven PC actions: CycleCCs, CyclePistols, CycleSmgs, CycleAssaultRifles, CycleSnipers, CycleBinoculars and CycleCoins, bound to keys 1 to 7.
    • The hotkeys do nothing during link actions, in camera state 9 (binoculars) and in scope mode (+call ZHitman3::IsInScopeMode).
    • Otherwise the index goes to the inventory quick select (PC 0x680ff0, in inventorymenu.cpp). Index 6 equips the coin (item 300), adding it with ZHM3InventoryMenu::AddCoin when it is missing. Index 5 equips the binoculars (item 0x10a). The others cycle through their weapon category with ZHitman3::UseItem.
    • Escape. With the in-game menu open, the PS2 closes it when IngameMenu fires. The PC closes it only when GetKeyName("IngameMenu") is not "esc" (+str "esc"). Both IngameMenu and Back are bound to esc on the PC, so the window's own Back handling closes it and the game does not close it a second time. The port binds Esc to ZW_CANCEL in both HMControl and ZWINDOWSKEYS_1. The original PC menu-binding check is separate from those bindings.
    • Cheat menu. When the cheat menu is open (state bit 0x10), the PC sends it the menu directions.
    • Bindings. The PC HMControl binding string moves PauseNoOSD from key 2 to key 8 and adds CycleCCs=tap(kb,1) to CycleCoins=tap(kb,7).

hitman3/gui: OSD and HUD (osd.cpp, infodisplay.cpp)

  • ZOSD::ZOSD (PS2 0x3a2ae0, PC 0x65f6c0). Platform. The PS2 sets the TV safe border m_fConsoleBorderSafe = 15; the PC value is zero.
  • ZOSD::LoadInit3 (PS2 0x3a30d4, PC 0x660ad0). PC-only feature. The PC also finds the "CheatMenu" event and stores it in m_pCheatsMenu (+0x1ac). The PS2 never sets that pointer.
  • ZOSD::DrawBufferViewUpdate (PS2 0x3a43c4, PC 0x661bb0; a minor row). PC-only feature. The PC draws the cheat menu (PC 0x65ae80, cheatmenu.cpp) while m_bDrawCheatsMenu is set.
  • ZOSD::DrawDisguiseBar (PS2 0x3a3904, PC 0x661070) and ZOSD::SetHitpoints (PS2 0x3a549c, PC 0x661860). Layout. The disguise and health bars are 8 pixels wide on the PC and 6 on the PS2 (RecalcSprite(..., 6.0f, ..., 38.0f); PC constant 8.0 at 0x766208). The first DrawBufferViewUpdate (PC 0x661bb0, at 0x661c88 and 0x661d5b) and InitElementPositions use 8 as well.
  • ZOSD::InitElementPositions (PS2 0x3a3188, PC 0x660c00). Layout. The comparison did not pair it: PC 0x660c00 is called from ZOSD::LoadInit2 (PC 0x661a00, the +call FUN_00660c00 of that minor row). Read from the disassembly, the PC places, in pixels of its window:

    Element PS2 PC
    health bar x 51 61
    disguise bar x 75 86
    bar width (scale) 6 8
    weapon display x W - 48 - 124 W - 48 - 164
    weapon symbol x W - 48 - 124 + 64 W - 48 - 164 + 104 (the same place)
    subtitles (48, H - border - 76), W - 48 wide (48, H - 100), W - 144 wide
    m_pCheatsPos (+0x198) not set (200, 100)

    The health frame (48, H - 101), the crosshair, the compass, the corners, the info position and the four menu positions (-200, -100) are computed the same way, but from a console border of 0 (m_fConsoleBorderSafe, PC +0x24, cleared by the constructor 0x65f6c0; the PS2's constructor sets 15), so the objective text and the compass are 15 higher. The PC never sets m_bIsM00AndConsole (PC +0x35; the constructor clears it and nothing writes it), so the compass shows in M00 and the objective keeps its usual place there; the PS2 sets it in M00, hides the compass and moves the info position by (+38, -16). The PC's m_lResolution is its window's client size (PC 0x480000.c: *(LONG *)(DAT_0081f820 + 0x84) = right - left), so these are pixels of its window, and its ZWINOBJ::CalcPosScale (0x54f7d0) sizes pictures and text from the same draw-buffer size, so the HUD keeps one texture pixel per window pixel at any resolution; the PS2's and the port's are 512 x 448 scaled to the screen. - Port: pc_layout (the flag and the border) and pc_hud_size (window pixels); Enhancements: PC HUD size.

  • ZOSD::EnableOSDElement (PS2 0x3a5d60, PC 0x660780). The same on both: for OSDELEM_HINT it adds the hint m00/Tutorials/H01_GetToPier when no text shows, and it sets m_bShowOSDElement and m_fLastOSDElemShow, which start the element's blinking. (An earlier port copy ended with the tail of ZOSD::LoadInit instead, storing m_rWestOutline in m_aCornersOutline[3], East's slot after CompassInvertHack, so the compass read "W S W N"; the PS2 disassembly has no such store. Fixed in the review of 26 November 2026.)

  • Action, pickup and drop key caps (ZActionMenuBase::ConvertInputRefs PC 0x668ad0, Draw 0x66a850, ZDropDisplay::ConvertInputRefs 0x668e80, Init2 0x66a3e0, Draw 0x668d30, the name 0x66d9e0). The PC reads three more references, a wide cap (+0x3c) and the key's name with its shadow (+0x40, +0x44; priority 13 and 12, alignment 1), draws the button picture, a blank cap, at (x, y - 1), or the wide cap when the name has two or more letters, the name at (x + 4, y + 13) and the shadow at (x + 5, y + 14) (the drop display one lower), and moves the entries 20 to the right (m_fAddActionMenuOffsetFromSymbol = 20). The name is the bound key's in capitals, cut to three letters, or AllLevels/Interface/KeyConfiguration/PickupSPC for the pick-up menu while its binding is the default. The PS2 class has the references (m_rBigButtonSymbol_PcOnly, m_rButtonSymbolChar_PcOnly, m_rButtonSymbolChar_PcOnlyOutline) but never reads them. Port: pc_layout, with the keyboard (port/hitman3/gui/_sdl/ingamemenusoverridesdl.cpp).
  • The HUD frames are different pictures. The PC scenes' health frame (m_pHealthFrame) has its two bar slots at the PC's x 61 and 86 and 8 pixels wide, and its item frame is wider than the disc's. Captures in the port (M01, OPENBLOOD_PCLAYOUT_TEST=hud): with the PC installation's data and the PS2 numbers, the bars sit at the left edges of their slots and only fill three quarters of them, and the item frame reaches 19 pixels (of 512) past the right margin; with the PC numbers both fit. With the disc's frame the PC numbers put the bars between the slots. The bar and weapon-display numbers belong to the frames they were drawn for.
  • ZOSD::PIPTriedToStartUp (PS2 0x3a5d34, PC 0x660740). The PC shows the picture-in-picture exclamation mark only when ZLevelLinking::GetCurrentLevelNum() != 0, so not in the training level. The PS2 always shows it.
    • Port: pc_tuning (port/hitman3/gui/_sdl/pctuningguioverridesdl.cpp); in M00 the mark's target visibility after the call is 0.0 with it and 1.0 without; Enhancements: PC version tuning.
  • ZWeaponDisplay::Draw (PS2 0x3b325c, PC 0x66deb0). Layout of the weapon HUD:

    Element PS2 x PC x
    item frame -36 -16
    ammo count +75 - belt feed +108 - belt feed
    bullet info, single text +122 +162

    The PS2 source writes the frame and the count as - 26 - 10 and + 85 - 10; the PC adds the same 10 (fsub [0x7619e8], -10.0), so a shared offset changed sign. With the display 40 further left (InitElementPositions), the PC's frame is 20 pixels further left on the screen, the count 7, and the bullet text is where it was.

  • ZInfoDisplay::Add (PS2 0x3b43e0, PC 0x66fd50). When the tutorial text m00/Tutorials/<key> is empty, the PC adds the suffix "_PC" and the PS2 the suffix "_PS2". The suffix is used for the text and for the speech resource.

hitman3/gui: in-game map (ingamemap.cpp)

  • CIngameMap::FrameUpdate (PS2 0x3a8d18, PC 0x6677a0). Input.
    • Mouse path. The PS2 handles input only when the pad flag is set. The PC adds an else branch for the mouse and keyboard.
    • It shows the mouse and maps its position to a 640 by -480 map space: (x / resX - 0.5) * 640 and (y / resY - 0.5) * -480.
    • It pans while the mouse is dragged more than one pixel (+call v2dist), by the delta times the scale times -1/420.
    • It shows the pan and zoom cursors only over four screen boxes. The boxes are in 800x600 layout coordinates, in a table at 0x79f5f8.
    • Correction (from the disassembly, PC 0x667963 to 0x667bd5). The four boxes are the frame around the map, where the pointer stays: PC 0x662e00 tests x from 730, x up to 70, y from 508 and y up to 88 of an 800 by 600 screen (table 0x79f5f4: (-70, 600), (70, 600), (800, -92), (800, 88); a negative value counts from the right or bottom), and the open map list counts as frame everywhere. Elsewhere, or while a drag goes on, the function calls ShowMouse(false), hides the pointer geom (GetMouseGeom, vtable +0x2b4), shows the pan cursor (m_rPanCursor, +0xdc) at the mouse in the 640 by -480 space and sets m_bMouseInside. The zoom cursor (m_rZoomCursor, +0xd8) is hidden in every frame of this path; only the pan cursor is ever shown. The drag starts when v2dist(m_v2MouseStartPosition, m_v2MousePosition) > 1 while m_bLMouseDown is set, hides the zoom box and sets m_bMouseMoving. The click zoom is the shared OnKeyDown/OnKeyUp on ZW_LBUTTON and ZW_RBUTTON (PC 0x666610, 0x666710): a left click without a drag halves the scale, a right click doubles it, both centred on the point under the mouse (mouse * scale / 520). The PS2 has those two functions but never sets m_bMouseInside or the mouse position, so they do nothing there.
    • Port. With pc_mouse the port's CIngameMap::FrameUpdate has this branch, the menu mouse sends ZW_LBUTTON (held as long as the button is) and ZW_RBUTTON while the map is open, and the system cursor stands in for the pointer geom, which stays hidden (Enhancements: PC mouse controls).
    • Pad speed. Pad pan and zoom are half as fast on the PC. The PS2 multiplies the stick deltas by m_fCurrentScale / 30, the PC by m_fCurrentScale * (1/60).
    • Both steps are per frame. The PS2 draws the map at 60 frames a second (SetMaxFrameInterval(1) in OnWindowOpen), so it pans 2 map scales a second. The SDL port keeps the PS2's speed at any frame rate (step times PS2FieldFraction()) and does not adopt the PC's half speed (Frame rate).
    • MapSelect. On the PC, MapSelect also closes the map list when it is open. On the PS2 it only opens the list.
  • CIngameMap::UpdateMapPosition (PS2 0x3aac40, PC 0x664c40) and CIngameMap::OnWindowClose (PS2 0x3a9eb0, PC 0x6647e0). Sound and input.
    • The PS2 plays OSDSND_Inventory_Scroll when panning starts and OSDSND_Scroll when panning or zooming stops.
    • While the map is open, the PS2 also runs a looped OSDSND_Binocular_ZoomIn/ZoomOut moving sound, which OnWindowClose fades out over 0.4 s (-call ZSoundObject::SetFadeOut, -const 0.4).
    • The PC plays only OSDSND_Map_Zoom when the zoom changes.
    • For a zoom with bResetMouse, the PC moves the system mouse and shows the zoom cursor at it. The PS2 ignores bResetMouse.
    • Correction (PC 0x664e37 to 0x664ed7). With bResetMouse the PC puts the system mouse in the centre (SetMousePos(resX >> 1, resY >> 1), vtable +0x298); a click zoom has just centred the map on the point clicked, so the point stays under the pointer. It then shows the zoom box (m_rZoomBox) and starts it from the mouse: m_vOldZoomBoxPos is the mouse position plus the box's own position, which PositionUpdate moves back to the centre while it scales the box. The PS2 never sets m_vOldZoomBoxPos or shows the box there. The zoom cursor is not involved. The port does this in keyboard and mouse play with pc_mouse (UpdateMapPosition in ingamemapoverridesdl.cpp).
    • The zoom box (ZoomBox) is a filled quad on both versions, not an outline: a noise texture at a quarter to a half opacity, tinted by the map's light. From the PC installation it was drawn twice as opaque until the converter's vertex alpha for source-alpha blended materials was corrected (Playing from a PC installation: Blended surfaces).
    • The PC plays OSDSND_Map_Zoom on every call that changes the scale and has no pan or zoom flags (0x664dfc: fucompp of the scale, then push 6; call 0x4c3130). The pad's zoom changes the scale every frame it is held, so on the PC the sound starts again each frame. OnWindowClose needs no change: without the moving sound m_sound_Moving stays 0.
    • Port: pc_tuning (port/hitman3/gui/_sdl/ingamemapoverridesdl.cpp, the pad's half-speed pan in the same file's FrameUpdate); Enhancements: PC version tuning.
  • CIngameMap::OnWindowOpen (PS2 0x3a9424, PC 0x667c60; a minor row). The PC centres the mouse (SetMousePos(resX / 2, resY / 2)) before the first UpdateMapPosition. The port centres it in the map's first FrameUpdate with pc_mouse.
  • MapSelect (PC 0x66791a to 0x667957). The list toggle is in the pad branch: with the pad flag, MapSelect opens the list or, when it is open, closes it. Not adopted: it changes pad play only. With the keyboard and mouse the list opens and closes with its button (OnCommand(1), the same on both).
  • CIngameMap::SetCurrentMap (PS2 0x3aba48, PC 0x6673e0).
    • The legend text comes from Legend_PC and Legend_Back_PC, not Legend_PS2_Xbox and Legend_Back_PS2_Xbox. Neither side tests for a pad.
    • Both the PS2 disc's and the PC's locale have all four keys: Legend_PS2_Xbox is "{MapLegend}Legend" and Legend_PC is "Legend" (and "{MapLegend}Back" against "Back"), so the PC only drops the button in front of the word: its legend is a button for the mouse. The port keeps the PS2 text, whose {MapLegend} becomes the pad button or the bound key; it is a prompt and not layout.
    • The map-group "type check" is two compiled-in assertions, not a branch: after RefToPtr(rMapGroup) and after RefToPtr(m_rLegendButton) the PC tests for a null pointer and for (GetObjectId() & mask) != id (the IsGeomType test, masks at 0x971388/0x971384) and executes int3 (PC 0x667447, 0x6674bb, 0x6675fd), then carries on. This corrects the earlier reading that the rest of the function is skipped. Nothing to port.
  • CMapIconDraw::AllocIconSprites (PS2 0x3a6928, PC 0x662ae0). Platform. The PC takes the icon texture from the prim's D3D material parameter "mapDiffuse"; the PS2 reads SPrims::lTextureId.

hitman3/gui: action, drop and container menus (ingamemenus.cpp)

The key-name prompts are described under Prompts the PC adds.

  • ZActionMenuBase::ConvertInputRefs (PS2 0x3ad3ec, PC 0x668ad0) and ZDropDisplay::ConvertInputRefs (PS2 0x3b0de8, PC 0x668e80).
    • The PC resolves the _PcOnly big symbol and the key text and its outline: priority 13 and 12, colours 0xffececec and 0, alignment ALIGNMENT_Top_Right.
    • It sets m_fAddActionMenuOffsetFromSymbol = 20 (+const 20).
  • ZActionMenuBase::Draw (PS2 0x3ad09c, PC 0x66a850).
    • For key names longer than one character (flag +0x48), the PC draws the big symbol. It draws the key text at (x + 4, y + 13) and its outline at (x + 5, y + 14).
    • The button symbol is at y - 1 and the focus bar at y - 1 + 16 * focused. On the PS2 they are at y and y - 2.
  • ZDropDisplay::Init2 (PS2 0x3b07f4, PC 0x66a3e0).
    • The key texts get alpha 140 and the big symbol alpha 0.
    • The PC has no m_bScalePS2_512_448.
    • The focus bar is at y (PS2 y - 1), the text at x + 52 (PS2 x + 32), and the key text at (x + 4, y + 14).
  • ZContainerMenu::UpdateAllEntryPos (PS2 0x3b1f28, PC 0x66b0a0). Layout. The entries are at (m_fXPos + 20, m_fYPos + 12 + 16 * i); the PS2 has no +20.
  • ZContainerMenu::Draw (PS2 0x3b1404, PC 0x66af60). Layout. The focus bar is at (x + 20, y - 1 + 16 * i); the PS2 has (x, y - 2 + 16 * i).

hitman3/gui: newspaper and statistics (newspapermissingcontroller.cpp, statisticsscreen.cpp)

  • ZNewsPaperMissingController::OnWindowOpen (PS2 0x3a2140, PC 0x65f200). Platform. On builds that are not SLUS, the PS2 replaces the ControllerLossMessage text with AllLevels/Interface/Dialog / ControllerLossPS2_SCEE. The PC has no such swap and only centres the frame.
  • ZStatisticsParser::ParseArticle (PS2 0x39f164, PC 0x65ee40).
    • The PC output buffer is at least 500 bytes (max(len + 1, 500)).
    • A C++ handler writes "Error in line %d:\n%s" or "Unknown error in line %d" into it. The line is counted from the newlines before the failure point.
    • The PS2 has no exceptions and keeps the error in m_szError.
  • ZStatisticsTest::ControlMoveSmooth (PS2 0x3a15e4, PC 0x65e080). The newspaper zoom factor is powf(..., DeltaFrameTime * 8) on the PC and * 2 on the PS2, so the zoom is four times faster per second on the PC. Both are time-based, so this is a speed choice and not a frame-rate fix; the SDL port keeps the PS2's, and makes the PC's with pc_tuning (port/hitman3/gui/_sdl/pctuningguioverridesdl.cpp). The pan factor, DeltaFrameTime * 5 / zoom, is the same (0x79e04c).

hitman3/gui/menu: briefing (src/hitman3/gui/menu/elements/briefingmenu.cpp)

The PC briefing has its own layout. It upper-cases text with setlocale(LC_ALL, "danish"), then ZGameData::ZStringToUpper, then setlocale(LC_ALL, "C"), where the PS2 calls zstring::to_upper. So the PC also upper-cases accented Latin-1 letters (+str "danish", +call ZGameData::ZStringToUpper).

Function PS2 PC PS2 value PC value
ZHM3Objectives::Setup 0x3cd754 0x684b40 rows 16 apart, x +0, "Completed" column +205 rows 18 apart, x +8, column +220
ZHM3ObjectivesBrief::Setup 0x3cddd8 0x685040 y start -37, rows 16 apart y start -35, rows 18 apart (x 155 on both)
ZHM3InfoList::Setup 0x3ce2c8 0x685370 x 0, short-list y -45, rows 16 apart, line width 330 x 70 (short list 10), y -46, rows 18 apart, line width 260
ZHM3BriefingDetail::Setup 0x3cefd8 0x686c30 details column +218, 9 slider lines beside a picture column +258, 10 lines; the who/what line and slider move 2 px left
ZHM3BriefingDetail::AppendDetail 0x3cf814 0x686a40 to_upper danish-locale upper-casing only
ZHM3TrainingInfo::Invalidate 0x3d1758 0x685e10 hint width 480 hint width 540; header upper-cased under the danish locale

Read again from the disassembly: ZHM3Objectives::Setup moves the arrow 20 left and 12 up from the "Completed" column on both (PC 0x684ead fsub 20.0 and 0x684ebe fsub 12.0, the second into the y element; the decompilation lost it). ZHM3InfoList::Setup starts the full list at y - 55 on both and only the short list at - 46; its line-count test (2 to 4 lines) is the same. ZHM3BriefingDetail::Setup subtracts the 2 from x after the picture (PC 0x686eb2) whether or not there is one.

These numbers come with the PC's own briefing windows. briefing.xml has <Platform PC> blocks for nearly every window, and the PC's HM3Briefing template is 640 x 480 where the PS2's is 512 x 448. The PC block moves the details panel (BriefingDetailsBackground) to x 450 (PS2 368), the briefing's objectives to x 151 (PS2 103), and makes TrainingBriefing 640 wide (PS2 460). In the disc's windows, which the port reads (<Platform PS2>), the PC's details column (x + 258) runs past the DETAILS panel and off the screen, and the 10 slider lines run over the panel's bottom edge, with the disc's fonts and with the PC's, and the PC's 540-wide training hints run past the right edge of the 460-wide training window; the port keeps the PS2's ZHM3BriefingDetail::Setup and ZHM3TrainingInfo::Invalidate (captures in Enhancements: PC HUD and menu layout).

hitman3/gui/menu: text blocks, inventory, profiles (hm3textblocks.cpp, inventorymenu.cpp, loadsave.cpp)

  • ZShowVar::SetText (PS2 0x3c2864, PC 0x67b5f0) and IUpgradeInterface::GetButtonText (PS2 0x3c7ef8, weaponupgradeselector.cpp, PC 0x67f020). The PC strips the tags; see Four element types drop their prompts.
  • ZHM3InventoryMenu::UpdateItemInfo (PS2 0x3cac28, PC 0x6815f0). Layout. The item description is 300 pixels wide on the PC and 360 on the PS2 (PC 0x681e65 push 0x12c). The position (76, 36) and the line spacing -4 are the same. inventor.xml's PC block keeps the window 370 wide and moves the left arrow from x -121 to -25.
  • ZEnterProfileName::Click (PS2 0x3d336c, PC 0x687780). A refactor with a small change.
    • After Done(), the PS2 opens the empty-name window (with DisableInputTimer(0.3)) or the create-profile window.
    • The PC moves that choice into a new virtual (slot +0x3c, PC 0x688a90). That function tests the edit field's text for emptiness, not the stored profile name.

hitman3/gui/menu: key rebinding (optionsinterfaces.cpp)

  • ZButtonConfigurationList::Setup (PS2 0x3d53d4, PC 0x68a600).
    • The PS2 rebuilds its 32 key names only when invalidated or on the first call.
    • The PC first copies the 32 bindings (device and control, 8 bytes each) from the profile into the list once, guarded by a flag at +0x290. It then rebuilds the names on every call and converts each one with zstring::CStrToUTF8, because Windows key names are code-page text.
    • The lookup is the same on both: GetSystemKeyName(name, true), then GetKeyName(name) when that is empty.
  • ZNewButton::Update (PS2 0x3d56a4, PC 0x68a840). Both wait for CheckForKeyPress, reset the input tables, call ZLevelLinking::OverrideAction and close the window. The PC adds conflict resolution (the details below are from the disassembly):
    • It walks every other action. For each one in the same action set that has the same key name, it calls OverrideAction(j, -1, -1, false) and clears the list's copy of that binding.
    • The action set is column 5 of the action table: ingame or menu. * matches every set, and an empty set is skipped.
    • So binding a key that another action already uses unbinds that action.
    • MoveLeft is row 0 of the table.
    • The walk starts at the row after the rebound one and wraps ((j + 1) & 31). It compares the first action's key name of each row (GetSystemKeyName(name, true), else GetKeyName), and only when both names are not empty. The PC's OverrideAction here gets false as its fourth argument, so nothing is stored in the profile yet: the list keeps a copy of each row's binding (+0x184, 8 bytes a row), and its Close (PC 0x68a470, unmatched; the PS2's is empty) writes the rows that are not -1 to the profile with true, unless Cancel (+0x293, PC 0x68a320) or Default (+0x292) asked to revert. On a conflict the PC clears the list's copy at m_iId (+0x294), the row just rebound, not at the row it unbound (PC 0x68aae7: mov eax, [ebp+0x294]), so after closing the window the profile keeps neither change.
    • Port. ZNewButton::Update with pc_mouse takes the key from the other rows of the set by device and control (the PS2 table's menu rows are pad buttons whose names, such as down, are also key names), takes only that key, skips the rows the PC folds into one, and marks the row in the profile (aButtonConfigInfo, device -2 - device) so that ZLevelLinking::ReassignButtons takes the key again when the profile loads (Enhancements: PC mouse controls). Measured: binding Reload Weapon to E takes E from Use Action, ActionMenuFast and ActionMenuOpen (OPENBLOOD_TRACE_PCMOUSE=1).
    • Port fixes. ZSysInput::CheckForKeyPress returns any control that is down. The PC's DirectInput devices change state on press events, so after ResetTables the key that opened the dialog stays up; the port's devices read the current state, and the dialog took that key (and Return as the pad's emulated Cross, device 0 comes first) at once. The port's version ignores what is held when the dialog opens until it is let go and asks the keyboard and mouse first. The list showed no key for 47's merged actions, whose "or" node has no device of its own (GetSystemKeyName returns ""); the port's ZButtonConfigurationList::Setup names the first key or mouse button in the binding. The dialog's PRESS NEW BUTTON text (ButtonConfigurationDialog, a TextBlock of Options/PressNewButton) was not drawn over the in-game list: the disc's in-game scenes have 96 line objects in the menu pool (LineObjs, ZResourceManager::GetLineObj), the PC's 116, and the list used the rest. ZResourceManager::SetupResourceGroups tops the pool up to
    • The key column ends at the PS2 in-game window's right edge (x 385, right-aligned) instead of the PC block's x 350 of a 600-wide window (Enhancements: PC mouse controls).
  • Action table. The PC table ZLevelLinking::s_asActionNames (PC 0x816f50) has 32 rows of 6 strings: five action names and an action set. The PS2 table has 32 rows of 3 names.
    • The PC adds the seven weapon-cycle actions and FireWeapon2b.
    • It folds Holster, UseAction, Enter and Accept into other rows.
    • It drops DropVideo and DropCutSequence.
    • The PC OverrideAction (PC 0x6b0950) takes a fourth argument. When it is true, the binding is stored in the profile (+0x5c94) and the dataProfile block is written through the global com.

hitman3/gui/menu: credits (textcredits.cpp)

  • ZTextCredits::Update (PS2 0x3c4a9c, PC 0x67cd70). A copy-protection check.
    • Where the PS2 clears an empty or past-the-end credit line with SetText(""), the PC first formats "v7_%04d" with GetCurrentProcessId() ^ 0x19ea3fd3 and calls OpenEventA(2, 0, name).
    • It sets the line to "" when the event exists and to "." when it does not.
    • The event name matches SecuROM 7. Without the protection layer, the blank credit lines show dots.

hitman3/gui/menu: weapon screens (weapondetails.cpp, weaponselector.cpp, weaponupgradeselector.cpp)

  • ZWeaponDetails::ZWeaponDetails (PS2 0x3d4584, PC 0x689730). Mouse input. The PC creates two more action handles, WeaponDetailsPan and WeaponDetailsRotate. ZWeaponDetails::Update (PC 0x689f30) reads the rotate axes only while WeaponDetailsRotate is held and the pan axes only while WeaponDetailsPan is held, so they work as mouse drags. The PS2 reads the sticks every frame. The PC binds them to the mouse only (WEAPONDETAILS_1: WeaponDetailsPan=hold(ms,middle), WeaponDetailsRotate=hold(ms,left), the axes rel(ms,x) and rel(ms,y), WeaponDetailsZoomIn=tap(ms,wheelup), WeaponDetailsZoomOut=tap(ms,wheeldn)), with no pad test. Port: with pc_mouse the port's ZWeaponDetails::Update adds the free cursor's motion while the left or middle button is held, and the wheel, to the PS2's stick reading.
  • ZWeaponSelector::SetupGraphics (PS2 0x3cca20, PC 0x683470). Mouse UI.
    • For every weapon row, the PC creates a second button at x + 290 (+const 290), with sub id item + 1000, and stores it in m_apDetailButtons.
    • It links the detail buttons vertically, and each one horizontally to its row button.
    • The PS2 releases m_apDetailButtons but never creates them.
    • The call (PC 0x683680): GetButton(pos, m_pColorSet, m_pParent, GenerateSubId(item + 1000), 0, 0, alignment 0, m_pButtonGraphicUpgrade, 9, font 1, shadow true, false). LinkHorizontal (PC 0x5634d0) is left->SetNextFocus(right, Right) and right->SetNextFocus(left, Left). The vertical loop runs to the last displayed button and links it to the array's next slot: with ten rows that is m_pUpButton (+0x4c0).
    • The PS2's own Click and Update already handle the sub ids 1000 and up. The graphic, ButtonGraphicUpgrade (DetailsEyeFocus, DetailsEyeNormal), is defined in a <Platform PC XBOX XENON> block of premiss.xml on both discs; the PS2 block's WeaponSelector element has no ButtonGraphicUpgrade.
    • Port: with pc_mouse the buttons are created and linked as on the PC, 247 right of the row instead of 290 (in the PS2 layout 290 is inside the selected-weapons panel), and hidden and unlinked from the rows while the pad is in use.
  • ZUpgradeSelector::Setup (PS2 0x3c69e0, PC 0x67f760).
    • Layout: the arrow buttons are at x 27 and 519 on the PC and at 44 and 476 on the PS2.
    • Without the pad flag, the PC links both arrows to the upgrade button (vtable +0x2b8, directions 2 and 1). ZUpgradeSelector::Click (PC 0x67fad0) also tests the flag.
    • Click without the pad flag: Select on sub id 0 buys, on 1 (the left arrow) calls PC 0x67fa60 (m_iFocus--, the PS2's MoveLeft) and on 2 calls 0x67fa10 (m_iFocus++, MoveRight); ZW_LEFT or ZW_MWHEELUP move left, ZW_RIGHT or ZW_MWHEELDOWN right. There is no Cancel and no ZW_SELECT2 in that branch. With the pad flag the PC calls 0x67fa10 for ZW_LEFT and 0x67fa60 for ZW_RIGHT, the opposite of the PS2.
    • Port: with pc_mouse the arrows' clicks and links, and the wheel: the menu mouse sends a notch as Up or Down, which the port's Click takes as ZW_MWHEELUP or ZW_MWHEELDOWN when it came from the wheel; the arrows stay at the PS2's x positions, and Cancel and the details key stay (the PS2 windows have no buttons for them).

hitman3/gui/menu: menu system and options (hm3menuelements.cpp, hm3menufactory.cpp, hm3options.cpp)

  • ZHM3MenuElements::ZHM3MenuElements (PS2 0x3d6008, PC 0x68f9c0). PC-only online code.
    • The PC creates the PC save interface (PC 0x6751c0) instead of ZHM3SavePS2.
    • It creates a global online object (0x1bc bytes, PC 0x6d33c0, stored at 0x9b2464).
    • It registers a second menu factory (PC 0x695630) with AddFactory. That factory is in hitman3/gui/menu/system/onlineelements.cpp, a file the PS2 build lacks.
  • ZHM3MenuElements::ReadXML (PS2 0x3d61dc, PC 0x68fb40). The PC appends online.xml to the XML list of every scene.
  • ZHM3MenuFactory::WindowFactory (PS2 0x3d67b0, PC 0x690f90). The PC adds the windows OnlineWindowFriends1000 and OnlineWindowFriendsOperationInProgress.
  • ZHM3MenuFactory::GUIElementFactory (PS2 0x3d6850, PC 0x691480). Every other element type is on both sides.
    • Only on the PC: ZToggleStats, ZDownLoadStatsErrorString, OnlineFriends1010.header and .reply, OnlineFriends1011.header, OnlineFriends1021.header and .reply, OnlineFriends1030.header and .reply, OnlineWindow712.Overwrite, CloseWindowOptions and ResetRenderDefault.
    • Only on the PS2: LaunchDemo (ZLaunchDemo).
  • ZHM3Options::ZHM3Options (PS2 0x3d86f0, PC 0x693fc0). The PS2 options are AutoAim, PipCam and AutoCrouchWhenTighteningFiberWire. The PC has 14 options:
    • it keeps PipCam and AutoCrouchWhenTighteningFiberWire;
    • it drops AutoAim;
    • it adds TextureResolution, GammaValue, Resolution, LevelOfDetail, PostFilterLOD, GfxRenderQuality, ShadowDetail, SelfShadows, BlurShadows, Anisotropy, EnableVSync and Antialias.

hitman3/camera (src/hitman3/camera/)

  • ZHM3Camera::ActivateCurrentCameraMode (PS2 0x305618, PC 0x5dfb00, hm3camera.cpp). Gameplay. In the binocular case, the PC also calls ZGui::Disable(0). The PS2 only calls DisableInventory. DeactivateCurrentCameraMode (PC 0x5df320) calls ZGui::Enable() after ShowWeaponDisplay(1).
    • What ZGui::Disable(0) does: ZOSD::Disable hides the pickup, action and drop displays; ZHitman3::ControlActions returns at once (no drop or throw); and ZGui::ClassFrameUpdate in its disabled branch opens menus only in a closet or keyhole (the PC tests the same status bit 18 there), so Start, the map and the inventory do nothing in the binocular view. The compass and the health display stay. Measured in the port with pc_tuning: the in-game menu stayed closed after Start (OPENBLOOD_PCTUNING_TEST=binoculars).
    • In the keyhole and closet cases the PC also calls 0x5e4e00 with ±0.1745 (±10°) and ±0.4363/±0.3491 (25° and 20°), probably limits for its mouse look (not checked); not adopted, as mouse input.
    • Port: pc_tuning (port/hitman3/camera/_sdl/pctuningcameraoverridesdl.cpp); Enhancements: PC version tuning.
  • ZHM3Camera::SelectScope (PS2 0x3066ac, PC 0x5df790). Widescreen.
    • After GetViewport, the PC reads the screen size from the renderer.
    • When height / width is not 0.75, it scales the viewport width by ratio * 4/3, centres it again (factor 0.5) and clamps it to 0..1 (+const 0.5, +const 0.75).
    • This corrects the sniper scope view for screens that are not 4:3.
  • ZHM3CameraScope::Activate (PS2 0x30c5ac, PC 0x5e5b70, hm3camerascope.cpp). Platform.
    • In the centre-camera branch, the PS2 adds the PS2 renderer globals g_CamPosOffsetY and g_CamSizeOffsetY to the viewport, calls SetFar and sets g_CancelMaterialBreak.
    • The PC does none of this. It calls the PC-only scope post-filter setup PC 0x5e5220, which finds InventoryPFCollection/PostFilterCollection and InventoryPFSet/PostFilterSet and sets prim index 2, priority 2 and blend 1.0, like ZHM3CameraBinocular::SetupPostFilters.
    • The FOV constants are the same values, folded differently.
  • ZHM3OverlayCameraClass::DeactivateOverlay (PS2 0x309080, PC 0x5e2860, hm3overlaycameraclass.cpp).
    • The PS2 reads the scene value USECENTER and, for the sniper overlay, removes the camera from view 0x32. The PC always calls WindowFirst->RemoveCamera(this, 0).
    • ActivateOverlay (PC 0x5e24d0) matches this. The entry in pc-comparison.md is right.
  • ZHM3ScopeNumberDisplay::ClassInit (PS2 0x309864, PC 0x5e2bb0). Platform. The PC takes the digit texture from the material parameter "mapDiffuse"; the PS2 uses SPrims::lTextureId.
  • ZHM3CameraEventCameraClass::ZHM3CameraEventCameraClass (PS2 0x30fdfc, PC 0x5e9470, hm3cameraeventcameraclass.cpp).
    • The PS2 reads m_bEnabled from GetGenericBool("PipCamEnabled", true).
    • The PC copies a global byte (0x7f40a9, initially 1) that the PC ZHM3Options treats as option 0 and passes on through Enable. The PC still fetches the configuration value but ignores it.
  • ZHM3CameraEventCameraClass::ClassFrameUpdate (PS2 0x310184, PC 0x5e9880). Platform.
    • While 0x909f04 is set, the PC deactivates the event camera and returns.
    • 0x909f04 is the Direct3D device-lost flag. ZRenderWintelD3D sets it, also when Present returns D3DERR_DEVICELOST, and clears it after the reset.
  • ZHM3CameraEventCameraClass::PushEvent (PS2 0x310fd0, PC 0x5ea630). Gameplay.
    • The PC checks events of type eEventCameraType_BombTrigger (8) before it queues them. It tests whether the geom is a ZHM3ItemBomb (type test 0x53e490) and whether GetOwnerRoom() equals the room at g_pSysInterface + 0xb8 (+0x90) (+call ZBaseGeom::GetOwnerRoom). g_pSysInterface + 0xb8 is g_pEngineData and +0x90 its m_pRoot, as in ZDllSound::ParentRoom (PC 0x4c7a00), so the test is for a bomb outside every room.
    • When both hold, it calls ZOSD::PIPTriedToStartUp(8) and returns 0. So on the PC, a remote bomb in that room does not open the picture-in-picture camera.
    • Port: pc_tuning (port/hitman3/camera/_sdl/pctuningcameraoverridesdl.cpp). In M11 47's Equip_Bomb_01 and the two Item_WW_roofbombs lie in the root room and get no event camera with it; Enhancements: PC version tuning.

engine/zwindows: ZWINOBJ and ZWINDOWS (interface.cpp, winsys.cpp, wininput.cpp)

  • ZWINOBJ::ClassInit (PS2 0x202d30, PC 0x54e170). PC only, without effect.
    • The PC asks the renderer for its name (g_pSysInterface + 0x97c, vtable +0x128) and stores stristr(name, "Direct3D") != 0 in a byte at 0x9a11c0.
    • That write is the only reference to 0x9a11c0 in the image, so nothing reads the flag.
  • ZWINOBJ::CalcPosScale (PS2 0x204004, PC 0x54f7d0). Platform. The PS2 adds 0.05 to x and y (a half-texel offset for the GS); the PC does not.
  • ZWINDOWS::ZWINDOWS (PS2 0x207418, PC 0x5521f0). Platform. The PS2 sets m_fBgScale = 0.8 when m_lResolution[0] == 512, the PS2 half-width video mode. The PC keeps 1.0. ZFRAME::CreateGeometry multiplies the frame width by this value.
  • ZWinInput::ZWinInput (PS2 0x206c4c, PC 0x551650). Input. The PC has no Analog_Horizontal/Analog_Vertical handles and no stick-to-arrow code. The PS2 sends eZW_LEFT/RIGHT/UP/DOWN when the left stick passes 0.3, and repeats after 0.2 s every 0.15/|x| s.

engine/zwindows: XML interface (src/engine/zwindows/xmlinterface/)

  • ZNavigator::SetText (PS2 0x2183c8, PC 0x55f960) and ZTextBlock::SetText (PS2 0x2193d4, PC 0x560610). The PC strips the tags; see Four element types drop their prompts.
  • ZNavigator::readParams (PS2 0x218544, PC 0x55f5f0). The PC reads one more bool, MouseColiOnHiddenObjects (+0x90), and ZNavigator::Setup (PC 0x55f6c0) passes it to the button. The shipped PC XML never sets it.
    • Correction. The PC's briefing.xml sets it 150 times across the scenes, on the briefing's "mega" buttons (Objectives, InfoList, OpenHint, ObjectivesBrief and OpenWindow with ButtonGraphic="BriefingMega…") in its <Platform PC> blocks; the PS2 disc's briefing.xml has it nowhere. The button keeps it in a byte at +0x50 (vtable +0x26c), and the PC's ZWINGROUP::GetMouseColi (PC 0x54ec90) then also tests the group's children that are hidden (BASEGEOM_Hidden 0x800; inactive ones, 0x400, never), so the whole panel takes the mouse and not only its visible title. Measured in the port: with the cursor inside the Replay mission briefing panel of M01's premission, away from its title, the panel does not take the focus without it and does with it.
    • Port: with pc_mouse the port reads the attribute (ZNavigator::readParams), adds it to the PS2 blocks' mega buttons when the menus load (pcmenublockssdl.cpp), and the menu mouse's hit walk (PortMouseHit) tests the hidden children of those buttons.
  • ZGUISlider::SetValue (PS2 0x21a58c, PC 0x5614f0).
    • The PS2 formats the value with "%%%i". The PC uses "%i", or "%.1f" of value * FloatMultiplier when DisplayAsFloat is set.
    • The PC writes the option back (SetOptionValue) only while a flag at +0xb4 is set. ZGUISlider::Setup clears that flag around its first SetValue, so building the menu no longer writes the option.
  • ZGUISlider::readParams (PS2 0x21a858, PC 0x561660). New attributes DisplayAsFloat and FloatMultiplier (default 1.0; ReadBool(..., "DisplayAsFloat", false) and ReadFloat after SliderOffset, PC 0x5616c0). The PC frontend.xml and every ingame.xml use them once, on the gamma slider (GammaValue, bounds 5 to 15, FloatMultiplier="0.1") of the PC-only RenderOptionMenu.
  • What the slider shows. ZSlider::SetExtraText (PS2 0x211874, PC 0x55a210, the same code) shows a text that starts with % as it is, without the %, and otherwise looks it up as a locale key and shows the key when there is none (ResourceCollection::GetResourceText). The PS2's "%%%i" gives "%50" and shows 50; the PC's "50" is no key and shows 50 too. Only DisplayAsFloat changes what is seen ("1.0" for gamma 10), and only on the PC's render options, which the disc's menus do not have.
  • ZGUIXMLReader2::XMLParse (PS2 0x21c1ec, PC 0x562c30). The platform name is chosen by the pad flag; see Menu layout depends on the pad flag.
  • ZDefaultOptions::ZDefaultOptions (PS2 0x224594, PC 0x569ad0) and ZDefaultOptions::SetOption (PS2 0x224b58, PC 0x569d40).
    • The PC inserts the option UseEAX at index 5, so MouseSensitivity to Vibration move from 5..10 to 6..11.
    • Bug fix. For InvertHorizontal, the PS2 calls SetInvertHorizontal(iPlayerNum, iPlayerNum) (defaultoptions.cpp line 111). The menu value is ignored, and player 0 is never inverted. The PC passes (iValue != 0, iPlayerNum).
  • ZStandardMenuFactory::GUIElementFactory (PS2 0x223ff0, PC 0x569120).
    • The PC has no AdjustScreen, ResetScreenOffset, CloseTestWindowTimeout or OpenRenderTestTimer, the PS2 elements for TV position and the video-mode test.
    • It adds CheckBox (built by 0x5626b0).
    • The PC frontend.xml still has AdjustScreen and ResetScreenOffset elements inside <Platform PS2> blocks, which the PC factory cannot build.
  • ZXMLGUISystem::SetupCameras (PS2 0x222794, PC 0x566580). After TRCCam (view 0xb2), the PC sets up the MouseCam camera in view 0xb3 for the mouse pointer. The PC scenes have MouseCam, Mouse and MouseBackLight geoms; the PS2 scenes have none of them (both have the map's CrosshairCursor_Pan and CrosshairCursor_Zoom). Not adopted: the port shows the system cursor in every menu, in both modes, and keeps the PC's Mouse geom hidden.

PS2 stubs and PC-only code paths

  • ZHM3Options::GetSize (PS2 0x3d8bb0, PC 0x6942d0, hm3options.cpp). The only real stub pair here. The PS2 returns the constant NumOfHM3Options + NumOfDefaultOptions (3 + 11). The PC counts those of its 14 options whose type (vtable +0x10) is 1, and adds 12 (the PC ZDefaultOptions has one more option).
  • ZListDataInterface::SetWindow (PS2 0x46b688, PC 0x68a530). Not a stub difference. Both bodies are empty. The PC one only frees the by-value zstring argument, because MSVC destroys by-value arguments in the callee.
  • IGUIElement::Use (PS2 0x44da28). A wrong pair; see below.

PC-only functions found on the way:

PC address What it is
0x463b30 tag stripper next to InsertIconsInText (gamedata.cpp)
0x65c100 weapon-hotkey test: seven Cycle* actions, returns 0 to 7
0x680ff0 inventory quick select for the weapon hotkeys (inventorymenu.cpp)
0x66d9e0 key-name text for the action, pickup and drop prompts
0x65ae80, 0x65b500 cheat menu draw and command handler (cheatmenu.cpp)
0x5e5220 ZHM3CameraScope post-filter setup
0x695630 online menu factory (onlineelements.cpp)
0x551c00 ZWINDOWS::SetShowMouse with the pad test (paired, minor)
0x551800 ZWinInput::Update without stick handling (unmatched; PS2 0x206fec)
0x4501c0 ZGameControlWintel constructor (pad button names at 0x75ded0)

Wrong pairs found

PS2 PS2 address Mapped PC What the PC function is Correct partner
ZGui::SetupPostFilters 0x3b6a48 0x5e5220 PC-only ZHM3CameraScope post-filter setup, called by ZHM3CameraScope::Activate PC 0x670630, tail-called by ZGui::ClassInit2 (0x670ea0); the run had mapped it to ZHM3LevelControlM13::SetupPostFilters (PS2 0x3fe5cc), which was wrong as a result
ZActionMenuBase::GetLineObject 0x3ad6f8 0x669db0 ZActionMenu::MakeRetrieveActionAsDefaultAction (PS2 0x3aef10, unmatched in that run) none; MSVC inlined GetLineObject everywhere
ZOSD::ShowWeaponDisplay 0x3a5b90 0x6605d0 PC-only forwarder to the cheat menu (m_pCheatsMenu->Command) PC 0x6605c0 (mov [ecx+0x1a], al), which the run had mapped to ZHM3Camera::Hitman (PS2 0x305458)
ZMissionBreakDown::GetExpenses 0x3c1304 0x67a410 std::string::insert(pos, const char *) (throws "basic_string") not found; probably inlined into ZMissionBreakDown::SetText (PC 0x67aa30)
ZTextSlider::GetTotalNumOfLines 0x3c47f4 0x67c400 ZTextSlider::SetText with GetTotalNumOfLines inlined PS2 0x3c4980 ZTextSlider::SetText should map to PC 0x67c400; GetTotalNumOfLines has no PC copy
IGUIElement::Use 0x44da28 0x695ce0 slot 6 of the PC-only ZGraphicRankingArrow vtable (0x7a7238) PC 0x4d5cf0 (mov al, 1; ret, folded), slot 6 of the IGUIElement RTTI vtable (0x77f63c)
  • ZListDataInterface::SetWindow. This is noise, not a stub.

Missing pairs and wrong labels found while reading:

  • ZMoneySystem::CalculateDamageControlExpense, CalculateRetrieveWeaponsExpense and CalculateReplacemenSuitExpense (PS2 0x405a3c, 0x405a84, 0x405aac) are PC 0x6cf0f0, 0x6cf140 and 0x6cf170. The code is identical; both sides were unmatched.
  • PC 0x5e0de0 is MSVC folding of ZHM3CameraBaseFunc::LoadObject (PS2 0x306e00) with SaveObject (PS2 0x306e94, unmapped). The row should be folded. Because of this, ZHM3CameraBase::SaveObject looks as if it calls LoadObject.
  • The zsimplehtml.cpp helpers at PC 0x557590 to 0x558150 were unmatched, but their PS2 partners were in unmatched_ps2.tsv. By size: GetTagType is 0x5575d0, FillJustify 0x557bb0, RightJustify 0x558020 and CenterJustify 0x557e80, and the SHtmlState getters are the 22-byte functions.
  • ZWinInput::Update: PS2 0x206fec against PC 0x551800.

Noise patterns

These false positives repeat. Most can be fixed in compare_pairs.py.

  • Phantom PS2 strings from the luihist rule. The PS2 records report strings that the function never references: "ZEditorEnvironmentLight" (ZInfoDisplay::Add), "CAMERA_ASPECT_NORMAL" (CMapIconDraw::DrawIcons, ZUpgradeSelector::Backup), "ClothBundles!HMAs!HMASCivilianPatientMale_02" (ZStatisticsParser::FindValue, ZHM3Objectives::Setup), "ZSNDOBJ" (ZFRAME::CreateGeometry) and "/Drag/Ambient".
    • They come from a lui/addiu whose high half is stale, or that ends an initialiser copy, or that points into a constant pool.
    • Fix: forget a register's high half once another instruction writes the register. Accept a PS2 string only when the address is passed or stored.
  • PS2 "" merged into a longer literal. "" passed to GetResourceText is the NUL of another literal, so the record shows the whole literal. An address that points at a NUL should read as "".
  • Tails on the same side. "tList" in CIngameMap::ScaleSubs is a tail of the PS2's own "MapSelectionList". Drop a one-sided string that is a tail of another string on the same side.
  • Strings through static tables and initialisers.
    • ZStatisticsParser::GetVariableValue: g_aVars names.
    • ZDefaultOptions::Init: "SFX_User" from m_pAudioGroupNames.
    • ZGUIBase::ReadType: a {name, mask} table copied from .rodata.
    • ZWeaponDetails::GetItemTemplate: a const char *pszGroups[] initialiser.
    • Fix: extend the static-table rule from floats to strings, and read .rodata pointer tables that are copied by stores.
  • PC instruction bytes read as a string. "hd.w" in ZSelectedWeapons::SetText is 68 64 2e 77 00, the instruction push 0x772e64. Reject PC strings whose address is inside a disassembled instruction.
  • Integers that are not literals.
    • __chkstk frame sizes (+int 16588, +int 17612, from mov eax, N; call __alloca_probe).
    • __LINE__ pushes in long factories (ZHM3MenuFactory::GUIElementFactory: 66, 70, ..., 106, 4 apart, against PS2 object sizes).
    • memset sizes turned into rep stos (-int 120).
    • PC loop bounds in bytes (cmp eax, 0x168: 9 sprites of 0x28 bytes).
    • PC compares against a float bit pattern (cmp [x], 0xc59c4000 is -5000.0).
  • Constants of inlined callees. In CMapIconDraw::CalcAnimValues, GetAnimTime is inlined. 10.47, 8.98 and 2.99 are 2π/0.6, 2π/0.7 and 2π/2.1, and 0.25 and 115 are half ranges. Fold against the callee's arguments: 2π/x and (b - a)/2.
  • Folding with factor 2 and degrees. curAngle * 2 * k against curAngle * k' * DegToRad (ZHM3CameraScope::Activate). Also try 2 * a * b and a * b / 2.
  • Folding that hides a real change. In CIngameMap::FrameUpdate, the PC 1/60 was explained away as 1/30 × 0.5, with the 0.5 taken from elsewhere in the body. The PS2 1/30 was not reported at all. Accept a fold only when the factor is used next to the constant.
  • PC constant initialisers as immediates. ZStatisticsTest::ZoomPanClamp builds its clamp vectors with mov [esp+n], imm, while the PS2 copies a global with v3copy.
  • Dead PS2 locals. ZWINDOWS::SetMousePos stores -5 to a stack local that is never read. Treat a PS2 value that is stored only to the stack and never loaded as weak.
  • Ghidra stops at a lone int3. A ZDebugBreak that no trap jump targets ends the PC body, so the calls after it are missing (ZCloseAndDeleteVoiceMessage::Click: the CloseWindow call at 0x55fbe0). Disassemble past an int3 that the previous instruction falls into.
  • By-value class arguments. A PC body that only destroys its by-value argument (ZListDataInterface::SetWindow) should count as empty.
  • MSVC folding of load/save pairs. It makes callers look as if they call the wrong function (ZHM3CameraBase::SaveObject).
  • Wrong low-band call-graph pairs. These carry most of the calls and structure flags in these subsystems: tiny setters and forwarders, and functions MSVC inlined everywhere, so that the slot went to a neighbour.
  • PS2 x * 2 written as x + x. In ZStatisticsTest::ControlMoveSmooth only +const 8 showed, because the PS2 2.0 is missing.

The 15 largest minor pairs were clean apart from two real differences, in ZOSD::DrawBufferViewUpdate and CIngameMap::OnWindowOpen. Their weak items are unmapped helpers of the same file, inlined link helpers and serializer Exchange<T> calls that MSVC inlines (ZHM3CameraEventCameraClass::LoadSave: 166 virtual calls).

Recurring patterns

  • The pad flag splits the PC code. Most PC-only behaviour in these subsystems is an else for keyboard and mouse under m_bUseGameController. Examples: map panning, the upgrade-selector links, the mouse pointer, the XML platform blocks, GetIcon. Because the flag comes from the ini file, a PC player gets either the full PS2 pad path or the keyboard path, never a mix.
  • Mouse affordances. These are clickable detail buttons, mouse-drag pan and rotate, cursors, a MouseCam layer and MouseColiOnHiddenObjects.
  • Layout values for a 640-wide, square-pixel screen. The PC drops the PS2 TV corrections (the 0.05 half texel, m_fBgScale 0.8, m_fConsoleBorderSafe 15, g_CamPosOffsetY). It spreads the menus out: rows 18 apart instead of 16, wider text boxes, bars 8 px wide instead of 6, and many shifted x offsets.
  • PC-only features hang off existing classes. Examples: the cheat menu in ZOSD, the online factory in ZHM3MenuElements, the weapon hotkeys in ZGui, and the graphics options in ZHM3Options. The PS2 headers often already declare the members (m_pCheatsMenu, _PcOnly references, m_apDetailButtons), so the PS2 source was compiled from the same headers with the PC code compiled out.
  • Platform locale keys. The PC uses the _PC suffix where the PS2 uses _PS2 and _PS2_Xbox.

Unresolved

  • ZGui::SetupPostFilters guard. PC 0x670630 adds a guard: vtable slot +0x44, or a float at 0x8aba30+0x84 that is not 0. Not identified.
  • Key-text refresh flag. The writer of the PC-only ZOSD flag +0x1d remains unidentified. The flag triggers the refresh in PC 0x66d9e0.
  • Alpha packing. CMapIconDraw::CalcAnimValues packs the alpha differently: PC a << 24, PS2 (a & 0xfc) << 22. The survey classified this as platform colour packing. The renderer behavior still needs verification.
  • Values the decompilation lost.
    • (Resolved 25 November 2026: the ZHM3Objectives::Setup arrow offset is x - 20, y - 12 on both; see briefing.)
    • The y values of the PC ZUpgradeSelector arrows.
    • What ZBUTTON vtable slot +0x2b8 does. It is taken here to be a navigation link.
  • PS2-only element types in the PC XML. The PC factory’s handling of AdjustScreen and ResetScreenOffset in <Platform PS2> blocks is unknown.
  • The PS2 fonts. Whether the PS2 fonts mark U+E004 to U+E009 with SGlyph::bIcon was not checked in the survey. GetIcon shows that the PS2 fonts must contain the glyphs.