Level editor for the SNES version

A modern Prince of Persia 1 for SNES level editor for Windows.

Moderator: English Moderator Team

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3083
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Level editor for the SNES version

Post by Norbert » December 22nd, 2015, 12:37 am

David, I just wondered how Pr1SnesLevEd detects the ROM's region.
apoplexy does this by checking the byte at 0x7fd9 (0x00: JP, 0x01: US, 0x02: EU).
I just did a case-insensitive grep for "7fd9" in all files of your package, but it yielded no results.

David
The Prince of Persia
The Prince of Persia
Posts: 1447
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Level editor for the SNES version

Post by David » December 22nd, 2015, 10:12 am

It does not detect the region itself.

The closest thing is that it detects the number of resources in the first table:
(This is needed because the last resource, the Konami logo is not present in the Japanese version. See here.)

Code: Select all

		if(!i){
			ndata=(ad-0x20000)/3;
			sa=new unsigned __int32[ndata+1];
		}
This relies on that the first resource (i==0) starts immediately after the address table.
So, "ad" contains the end of the table, 0x20000 is the beginning, and 3 is the length of a single address.
"ndata" is the number of resources.

This is not displayed to the user, it is used only internally.

David
The Prince of Persia
The Prince of Persia
Posts: 1447
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Level editor for the SNES version

Post by David » January 1st, 2016, 11:54 am

Here is the new version.

Changes:
* Renamed the old readme.txt to ChangeLog.txt .
* Made the source more readable:
- Replaced many short identifiers with better ones.
- Added typedefs for byte and word.
- Added comments.
- Moved variable declarations to the innermost block.
* Added Hacks editor:
- Here you can change things that otherwise require hex-editing. For example, level-specific special events.
- The hacks are in the Hacks.txt and Hacks_lists.txt files. You can add new hacks to them, and the changes appear when you reopen the Hacks editor.
* Shift + arrow keys move between rooms. Shift + page up/down move to the previous/next room.
* Door events disappear when the current tile is not a button.
* When opening Jaffar's level, the editor jumps to room 0.
* Added File -> Quit.
* Added "Quit?" dialog.
* Removed "Guard skill" menu item. This setting didn't do anything.
* When you select a background tile, the animation group textbox will update itself.
* When you change a property of the current foreground tile, the new foreground tile will appear in the first dropdown.
* Added a "Room links" right-click menu to the room link buttons.
* You can select an item from pop-up lists by double-click. (level, guard type)
* Renamed "girl" to "amazon".
Attachments
Pr1SnesLevEd_2016-01-01.zip
(415.21 KiB) Downloaded 40 times

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3083
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Level editor for the SNES version

Post by Norbert » January 1st, 2016, 2:43 pm

Very cool, the new hacks editor (and other changes too).
Also, small things like a quit option/dialog and being able to use Shift for room navigation have a big, positive usability impact.
(I'll make sure to announce your new release later today. [Edit: Done.])

salvadorc17
Calif
Calif
Posts: 517
Joined: August 27th, 2011, 2:04 am

Re: Level editor for the SNES version

Post by salvadorc17 » January 1st, 2016, 9:27 pm

New version for new year!! Thanks!!

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3083
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Level editor for the SNES version

Post by Norbert » August 8th, 2016, 1:53 pm

I suggest the following.
If "floor" is checked and the user checks "wall", remove the check from "floor".
Similarly, if "wall" is checked and the user checks "floor", remove the check from "wall".

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3083
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Level editor for the SNES version

Post by Norbert » August 23rd, 2016, 1:06 am

Another small suggestion: if one of the four room-change buttons has a broken room link, make it a different color.
This will allow users to quickly see that a link isn't the same up/down or left/right.

Post Reply