Panic in the Park - The Interactive Game
Technical Analysis and Fan Page

Content for everyone

Technical stuff

Links

YouTube Videos

(German or English)

ANIMDLL.dll

Version 1a (download, full disasm)

BA Retail versions:
1994-10-05 14:32:34
Size: 1686 bytes
MD5 sum: fa91c98711e5d6ba89b5d0cfa438874a

Initial version with the following functions:

  • TIMERDLL_PROC: Possibly a TIMERPROC as required by the WinAPI function SetTimer, listens to nIDEvent = 'ANIM'.
  • TIMERDLL_TEST: Only displays a message box "Test Running" with caption "AnimDLL16" and does nothing else.
  • LOAD_SOUND: Loads a sound file and returns a memory handle
  • UNLOAD_SOUND: Unloads a sound identified by a memory handle
  • PLAY_SOUND: Plays a sound identified by a memory handle
  • OPEN_IPMA_DLL: Opens the codec
    ANIMDLL.OPEN_IPMA_DLL(arg0) calls
    MSVIDEO.ICOPEN(fccType=mmioMAKEFOURCC('v','i','d','c'), fccHandler=mmioMAKEFOURCC('I','P','M','A'), wMode=ICMODE_DECOMPRESS) followed by
    MSVIDEO.ICSENDMESSAGE(hic, msg=ICM_SETSTATE, dw1=arg0, dw=22h).
    arg0 is the configuration data block for the message ICM_SETSTATE and 22h is the size of this configuration data block.
  • CLOSE_IPMA_DLL: Closes the codec
    ANIMDLL.CLOSE_IPMA_DLL(arg0) calls
    MSVIDEO.ICSENDMESSAGE(hic, msg=ICM_SETSTATE, dw1=arg0, dw2=22h) followed by
    MSVIDEO.ICCLOSE(hic).
    arg0 is the configuration data block for the message ICM_SETSTATE and 22h is the size of this configuration data block.
  • TEST_VIDEO_DLL: Checks if the codecs "IV32" (requires Video for Windows) and "IPMA" (requires game setup) are installed.
  • WEP is the Windows Exit Procedure. It just returns the value 1.

Version 1b (download, full disasm)

BA Demo and Special Edition:
1994-11-29 15:44:00
Size: 1646
MD5 sum: 4c93de0157eb5ba9c42bf290249a2c3c

This DLL is fully compatible with the retail version and has small improvements. Therefore it should be used instead of the original DLL of October 1994.

Modified functions:

  • UNLOAD_SOUND
    • Returns AX<>0 if there was something available to unload, instead of always returning AX=0 (This bugfix also applies for the Retail version, because 1 of the 2 calls is actually checking eax<>0 for success, according to the disassembly. However, this fix might lead to the error message "Could not unload sound" in case there is a bug in BlownAway, i.e. a wrong reference)
  • PLAY_SOUND
    • The flag "SND_NODEFAULT" was added to the function call MMSYSTEM.SNDPLAYSOUND, which means if the sound cannot be found, PlaySound returns silently without playing the default sound. (It is very likely that this is a bugfix that would also be useful for the retail BA)

Version 2 (download, full disasm)

Panic in the Park + Waldo 1:
1995-05-10 17:14
Size: 1796 bytes
MD5 sum: 4dd2c6453cb3d5a7fb8a2b7e848a42f2

This DLL is NOT compatible with Blown Away and vice versa!

Modified functions:

  • LOAD_SOUND
    1. Argument added: BOOL bShowLoadErrorMessage that defines if message "Could not load sound" is shown
  • OPEN_IPMA_DLL
    1. Argument added: DWORD fccHandler that gets passed to MSVIDEO.ICOPEN instead of the hardcoded "IPMA"
    2. The compressor will receive
      MSVIDEO.ICSENDMESSAGE(hic, msg=ICM_SETSTATE, dw1=argument, dw2=3Ah) instead of
      MSVIDEO.ICSENDMESSAGE(hic, msg=ICM_SETSTATE, dw1=argument, dw2=22h)
      So, the size of the configuration data block of message MSVIDEO.ICSENDMESSAGE has been increased.
  • CLOSE_IPMA_DLL
    1. The compressor will receive
      MSVIDEO.ICSENDMESSAGE(hic, msg=ICM_SETSTATE, dw1=argument, dw2=3Ah) instead of
      MSVIDEO.ICSENDMESSAGE(hic, msg=ICM_SETSTATE, dw1=argument, dw2=22h)
      So, the size of the configuration data block of message MSVIDEO.ICSENDMESSAGE has been increased.
  • TEST_VIDEO_DLL
    1. Argument added: DWORD fccHandlerSecondary that gets passed to MSVIDEO.ICOPEN if checkmode bit 2 is set
    2. Argument added: DWORD dwCheckMode to control wheather IV32 gets checked or not
    3. Previous behavior: The function checked the codecs vidc:IV32 and then vidc:IPMA.
      New behavior:
      If dwCheckMode=0, then return 1.
      Else if mode bit #2 set, then check codecs vidc:IV32 and vidc:"X" (where "X" is the codec of argument fccHandlerSecondary)
      Else check only vidc:IV32.
      If codecs fail to load: Show message box and return 0. Otherwise return 1.

New functions (stubs that always return 0):

  • INIT_FLI: Unknown usage.
  • END_FLI: Unknown usage.
  • PLAY_FLI: Unknown usage.
  • STATUS_FLI: Unknown usage.
  • STOP_FLI: Unknown usage.

C-style Headers

// TODO: Return values unknown
// TODO: Order of arguments and calling convention unknown

// PIP = "Panic in the Park"
// otherwise, "Blown Away"
#define PIP

typedef tagIPMA_CONFIG_DATA {
	DWORD fccSignature; // "SUGR" set by game. Can also be "IPMA"
	#ifdef PIP
	// Unknown data structure. Size: 3Ah (including signature)
	#else
	// Unknown data structure. Size: 22h (including signature)
	#endif
} IPMA_CONFIG_DATA;

// Possibly a TIMERPROC as required by the WinAPI function SetTimer, listens to nIDEvent = 'ANIM'.
VOID CALLBACK TIMERDLL_PROC(HWND hWnd, UINT uMsg, UINT_PTR nIDEvent, DWORD dwTime);

// Only displays a message box "Test Running" with caption "AnimDLL16" and does nothing else.
// Returns the result of MessageBox()
int FAR PASCAL TIMERDLL_TEST();

// Loads a sound file and returns a memory handle
#ifdef PIP
HGLOBAL FAR PASCAL LOAD_SOUND(LPSTR pszFileName, BOOL bShowErrorMsg);
#else
HGLOBAL FAR PASCAL LOAD_SOUND(LPSTR pszFileName);
#endif

// Unloads a sound identified by a memory handle
WORD? FAR PASCAL UNLOAD_SOUND(HGLOBAL hMem);

// Plays a sound identified by a memory handle
WORD? FAR PASCAL PLAY_SOUND(HGLOBAL hMem, BOOL bLoop);

// Opens the codec
#ifdef PIP
WORD? FAR PASCAL OPEN_IPMA_DLL(IPMA_CONFIG_DATA* configData, DWORD fccHandler);
#else
WORD? FAR PASCAL OPEN_IPMA_DLL(IPMA_CONFIG_DATA* configData);
#endif

// Closes the codec
WORD? FAR PASCAL CLOSE_IPMA_DLL(DWORD dwSendMessageDw1);

// Checks if the codecs "IV32" (requires Video for Windows) and "IPMA" (requires game setup) are installed.
#ifdef PIP
#define CHECKMODE_VFW 1
#define CHECKMODE_SECONDARY 2
#define CHECKMODE_BOTH CHECKMODE_VFW|CHECKMODE_SECONDARY
BOOL FAR PASCAL TEST_VIDEO_DLL(DWORD dwCheckMode, DWORD fccHandlerSecondary);
#else
BOOL FAR PASCAL TEST_VIDEO_DLL();
#endif

#ifdef PIP
// Unknown usage. It always returns 0.
WORD? FAR PASCAL INIT_FLI();

// Unknown usage. It always returns 0.
WORD? FAR PASCAL END_FLI();

// Unknown usage. It always returns 0.
WORD? FAR PASCAL PLAY_FLI(WORD unknown1, WORD unknown2);

// Unknown usage. It always returns 0.
WORD? FAR PASCAL STATUS_FLI(WORD unknown1);

// Unknown usage. It always returns 0.
WORD? FAR PASCAL STOP_FLI(WORD unknown1);
#endif

// WEP is the Windows Exit Procedure.
// It always returns the value 1.
WORD? FAR PASCAL WEP(BOOL fSystemExit);


© 2024 Daniel Marschall - - www.daniel-marschall.de

Please also see my pages for other Imagination Pilots games:
Blown Away | Panic in the Park | Waldo at the Circus | Waldo Exploring Geography | Eraser Turnabout | Virtual K'Nex