コード例 #1
0
ファイル: terrain.py プロジェクト: chen-charles/PyPokemon
if __DEBUG__:
		from common import *
		import exception
		import buildinfo
		from surface_buffer import *
else:
		from rgine.common import *
		import rgine.exception as exception
		import rgine.buildinfo as buildinfo
		from rgine.surface_buffer import *


##if __name__ == "__main__": _version_ = buildinfo.bump("terrain", 1)
##else: _version_ = buildinfo.get("terrain")
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
_version_ = buildinfo.get(path+"/terrain")


'''
Exp. File Format Details

Terrain->Storage
byte0~7		: terrain loader version info ->unsigned int 64
byte8~16	: terrain size x ->unsigned int 64
byte16~24	: terrain size y ->unsigned int 64
byte24~   	:
			byte0:  	terrain properties	->8 bits
			byte1~3:	terrain resource identifier	->unsigned int 16

Texture->Storage    (pygame.Surface)    ->  must init the video mode first
(TextureID follows x)
コード例 #2
0
ファイル: terrain.py プロジェクト: raymond1998/Pokemon
if __DEBUG__:
    from common import *
    import exception
    import buildinfo
    from surface_buffer import *
else:
    from rgine.common import *
    import rgine.exception as exception
    import rgine.buildinfo as buildinfo
    from rgine.surface_buffer import *

##if __name__ == "__main__": _version_ = buildinfo.bump("terrain", 1)
##else: _version_ = buildinfo.get("terrain")
path = os.path.dirname(os.path.abspath(inspect.getfile(
    inspect.currentframe())))
_version_ = buildinfo.get(path + "/terrain")
'''
Exp. File Format Details

Terrain->Storage
byte0~7		: terrain loader version info ->unsigned int 64
byte8~16	: terrain size x ->unsigned int 64
byte16~24	: terrain size y ->unsigned int 64
byte24~   	:
			byte0:  	terrain properties	->8 bits
			byte1~3:	terrain resource identifier	->unsigned int 16

Texture->Storage    (pygame.Surface)    ->  must init the video mode first
(TextureID follows x)
--------    ->  0 1 2 3 4 5 6 7
--------    ->  8 9 10 11 12 13 14 15
コード例 #3
0
ファイル: __init__.py プロジェクト: chen-charles/PyPokemon
    from exception import *

__DEBUG__ = b'\x00'
with open(path+os.sep+"__DEBUG__", "rb") as f:
    __DEBUG__ = f.read(1)[0]

if __DEBUG__:
    from exception import *
    from event import *
    from terrain import *
    from progressbar import *
    from world import *
    from loader import *
    import buildinfo
    import windows
    import surface_buffer
else:
    from rgine.exception import *
    from rgine.event import *
    from rgine.terrain import *
    from rgine.progressbar import *
    from rgine.world import *
    from rgine.loader import *
    import rgine.buildinfo as buildinfo
    import rgine.windows as windows
    import rgine.surface_buffer as surface_buffer
    
__version__ = buildinfo.get(path+"/__init__")
__author__ = 'Charles-Jianye Chen'
sys.path.pop(0)