コード例 #1
0
# -*- coding: latin-1 -*-
'''
Letter-Monster Engine v0.2.9
Copyright © 2009, Cristi Constantin. All rights reserved.
This module demonstrates executing instructions stored inside a vector layer, in one LMGL file.
'''

import os, sys
sys.path.insert(0, os.getcwd())
from _letter_monster import LetterMonster

lm = LetterMonster()
lm.DEBUG = True

lm.Load('test.lmgl')

print 'Executing vector instructions...\n'
lm._Execute('vect1')

print 'Executing macro instructions...\n'
lm._Execute('macro1')

print lm.body

os.system('echo Done.&pause')

#
コード例 #2
0
# -*- coding: latin-1 -*-
'''
Letter-Monster Engine v0.2.9
Copyright © 2009, Cristi Constantin. All rights reserved.
This is a simple example for rendering a LMGL file on the screen, via Pygame.
'''

import os, sys
sys.path.insert( 0, os.getcwd() )
from _letter_monster import LetterMonster

lm = LetterMonster()
lm.DEBUG = True
lm.Number_Of_Threads = 1

lm.Load( 'test_event.lmgl' )
print

lm.Render('pygame', size=(300,200), fontsize=10, txtcolor=(166, 166, 255), bgcolor=(33, 33, 33))

os.system( 'echo Done.&pause' )

#
コード例 #3
0
# -*- coding: latin-1 -*-
'''
Letter-Monster Engine v0.3
Copyright © 2009, Cristi Constantin. All rights reserved.
This one is Letter-Monster's SECOND animation ! It requires Pygame.
Enjoy.
The original image is called "grinkitty" and it's made by Samantha McGunagle.
Check her profile : http://cryztaldreamz.deviantart.com
'''

import os, sys
sys.path.insert(0, os.getcwd().replace('Animations', '')[:-1])
from _letter_monster import LetterMonster

lm = LetterMonster()
lm.DEBUG = True
lm.Number_Of_Threads = 1
lm.Load('LM_Grin_Kitty.lmgl')  # Change LMGL file here.
lm.Render('pygame',
          size=(330, 590),
          txtcolor=(0, 0, 0),
          bgcolor=(233, 199, 166))
コード例 #4
0
# -*- coding: latin-1 -*-
'''
Letter-Monster Engine v0.3
Copyright © 2009, Cristi Constantin. All rights reserved.
This one is Letter-Monster's FIRST animation ! It requires Pygame.
Enjoy.
The original image is called "Rotating Skeleton" and it's made by Tomi J. Maksa.
Check his profile : http://www.pixeljoint.com/p/22334.htm
'''

import os, sys
sys.path.insert( 0, os.getcwd().replace('Animations','')[:-1] )
from _letter_monster import LetterMonster

lm = LetterMonster()
lm.DEBUG = True
lm.Number_Of_Threads = 1
lm.Load( 'LM_Rotating_Skeleton.lmgl' ) # Change LMGL file here.
lm.Render( 'pygame', size=(323,577), txtcolor=(255, 255, 255), bgcolor=(33, 33, 66) )
コード例 #5
0
# -*- coding: latin-1 -*-
'''
Letter-Monster Engine v0.2.9
Copyright © 2009, Cristi Constantin. All rights reserved.
Spawn is in fact an Export function.
Can export as 'txt', 'csv', 'html', 'bmp', 'gif', 'jpg', 'png', 'pdf', 'ps'.
'''

import os, sys
sys.path.insert( 0, os.getcwd() )
from _letter_monster import LetterMonster

lm = LetterMonster()
lm.DEBUG = True

print( 'Loading...\n' )
lm.Load( 'test_cons.lmgl' )

print( 'Spawning...\n' )
#lm.Export( out='txt', filename='Export' )
lm.Spawn( out='txt', filename='Export' ) # Spawn == Export.


os.system( 'echo Done.&pause' )

#
コード例 #6
0
# -*- coding: latin-1 -*-
'''
Letter-Monster Engine v0.3
Copyright © 2009, Cristi Constantin. All rights reserved.
This one is Letter-Monster's THIRD animation ! It requires Pygame.
Enjoy.
The original image is called "bug.gif". I don't know who is the author, i'm sorry.
'''

import os, sys
sys.path.insert(0, os.getcwd().replace('Animations', '')[:-1])
from _letter_monster import LetterMonster

lm = LetterMonster()
lm.DEBUG = True
lm.Number_Of_Threads = 1
lm.Load('Bug.lmgl')  # Change LMGL file here.
lm.Render('pygame',
          size=(250, 510),
          txtcolor=(0, 0, 0),
          bgcolor=(100, 155, 133))