Difference between revisions of "Harem Adventures format"

From Princed Wiki
Jump to: navigation, search
(Created page with "== JAR == The [https://en.wikipedia.org/wiki/JAR_(file_format) Java ARchive] (JAR) of ''Prince of Persia: Harem Adventures'' is a [https://en.wikipedia.org/wiki/MIDlet MID...")
 
(Potions)
Line 184: Line 184:
 
Potions are (# Potions) times 5 bytes:
 
Potions are (# Potions) times 5 bytes:
  
1 byte: type
+
1 byte: type (0 = 5 HP, 1 = hurt, 2 = 3 HP, 3 = checkpoint animation)
  
 
2 bytes: X
 
2 bytes: X

Revision as of 17:03, 2 June 2018

JAR

The Java ARchive (JAR) of Prince of Persia: Harem Adventures is a MIDlet for the Java ME (J2ME/phoneME) environment. The file is a ZIP-compressed archive. Many different feature phones exist, and (thus) many different versions of Prince of Persia: Harem Adventures. This article describes the format of the version that ships with pophale, which targets a 176x208 screen, does not use the Nokia UI API, includes unpacked PNG files and unpacked levels.

Levels

This section describes the format of the .lvl files.

# Bytes Contents
1 Level width
1 Level height
Back tiles
2 # Unknown
Unknown
2 0x00 0x00
2 # Front types
Front types
2 # Front tiles
Front tiles
4 Prince X, Y
4 Exit trigger X, Y
4 Save trigger X, Y
4 Entrance image X, Y
4 Exit image X, Y
2 # Chompers
Chompers
2 # Spikes
Spikes
2 # Gates
Gates
2 # Raise
Raise
2 # Guards
Guards
2 # Potions
Potions
2 # Loose
Loose
2 0x00 0x00
2 # Text
Text

Back tiles

The back tiles are (level width x level height) bytes.

Their hex values range from 0x00 to 0x37.

Unknown

Unknown are (# Unknown) times 4 bytes:

1 byte: unknown

1 byte: unknown

1 byte: unknown

1 byte: unknown

Front types

Front types are (# Front types) times 3 bytes:

1 byte: unknown

1 byte: unknown

1 byte: number

Front tiles

Front tiles are (# Front tiles) times 7 bytes:

2 bytes: X

2 bytes: Y

1 byte: front type

1 byte: unknown

1 byte: unknown

Chompers

Chompers are (# Chompers) times 5 bytes:

2 bytes: X

2 bytes: Y

1 byte: unknown

Spikes

Spikes are (# Spikes) times 5 bytes:

2 bytes: X

2 bytes: Y

1 byte: right

Gates

Gates are (# Gates) times 6 bytes:

2 bytes: X

2 bytes: Y

2 bytes: time open

Raise

Raise are (# Raise) times 6 bytes:

2 bytes: gate

2 bytes: X

2 bytes: Y

Guards

Guards are (# Guards) times 12 bytes:

2 bytes: X

2 bytes: Y

1 byte: direction

1 byte: HP

1 byte: unknown

1 byte: imp. block

1 byte: unknown

1 byte: unknown

1 byte: unknown

1 byte: strike delay

Potions

Potions are (# Potions) times 5 bytes:

1 byte: type (0 = 5 HP, 1 = hurt, 2 = 3 HP, 3 = checkpoint animation)

2 bytes: X

2 bytes: Y

Loose

Loose are (# Loose) times 5 bytes:

2 bytes: X

2 bytes: Y

1 byte: right

Text

Text are (# Text) bytes.