If anybody here has Python and Pygame installed, here is the code to load an MXS file on the screen with a Palette file:
Code:
from struct import *
import pygame
from pygame.locals import *
import sys
pygame.init()
screen = pygame.display.set_mode((320,200),0,8)
pygame.display.set_caption('MXS Loader')
screen.set_at((100,100),100)
f = open('palettes.bin', 'rb')
hdr = unpack('hh',f.read(4))
pal = []
for i in range(0,256):
pal.append(unpack('BBB',f.read(3)))
f.close()
screen.set_palette(pal)
peek = Struct('B')
f = open('splash.mxs','rb')
for j in range(0,4):
for y in range(0,200):
for x in range(j,320,4):
screen.set_at((x,y), peek.unpack(f.read(1))[0])
f.close()
while 1:
for event in pygame.event.get():
if event.type in (QUIT, KEYDOWN):
sys.exit()
pygame.display.update()
pygame.time.delay(100)
from struct import *
import pygame
from pygame.locals import *
import sys
pygame.init()
screen = pygame.display.set_mode((320,200),0,8)
pygame.display.set_caption('MXS Loader')
screen.set_at((100,100),100)
f = open('palettes.bin', 'rb')
hdr = unpack('hh',f.read(4))
pal = []
for i in range(0,256):
pal.append(unpack('BBB',f.read(3)))
f.close()
screen.set_palette(pal)
peek = Struct('B')
f = open('splash.mxs','rb')
for j in range(0,4):
for y in range(0,200):
for x in range(j,320,4):
screen.set_at((x,y), peek.unpack(f.read(1))[0])
f.close()
while 1:
for event in pygame.event.get():
if event.type in (QUIT, KEYDOWN):
sys.exit()
pygame.display.update()
pygame.time.delay(100)
At the moment, this involves extracting the PAL and MXS file from your RPG lump, however you can easily change the file loading locations to your working.tmp file for example.
I hope to port my old map editor over to Python and implement some new features into it, as Python and Pygame can offer more than the other language I was using, and Mac users will also be-able to use it now too.
For those who haven't seen the old map editor, here is the download location:
http://sdlbasic.net/beta/project/ohr-tilemap-editor-windows/
I have a YouTube video somewhere as well showing it in action, but this is an old version now, and I hope to build a new one and better one.



