home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / demos / blade / data1.cab / Program_Executable_Files / Scripts / BladeInit.py < prev    next >
Encoding:
Python Source  |  2000-10-27  |  3.1 KB  |  181 lines

  1. #####################################################
  2. #                                                    
  3. #                                                    
  4. #                                                    
  5. #             B L A D E I N I T . P Y                 
  6. #                                                    
  7. #                                                    
  8. #                                                    
  9. #                                                    
  10. #####################################################
  11.  
  12.  
  13.  
  14. import string
  15. import Reference
  16.  
  17. from bladeinit0 import *
  18. #
  19. # Different kind of enemies. Should be called b4 creating ANY PersonEntity!
  20. #
  21. Bladex.OpenProfileSection(3,"BladeInit.Enemies")
  22. import Enemies
  23. Enemies.Init()
  24. Bladex.CloseProfileSection(3)
  25.  
  26.  
  27.  
  28. #
  29. # New animation system (biped) 
  30. #
  31. Bladex.OpenProfileSection(4,"BladeInit.Biped")
  32. import Biped
  33. Biped.Init()
  34. Bladex.CloseProfileSection(4)
  35.  
  36. #
  37. # The sharing of whole sets of animations
  38. #
  39. Bladex.OpenProfileSection(5,"BladeInit.anm_conv")
  40. import anm_conv
  41. anm_conv.Init()
  42. Bladex.CloseProfileSection(5)
  43.  
  44.  
  45. #
  46. # To modify flags of animations 
  47. #
  48. import Anm_Mdf
  49. Anm_Mdf.Init()
  50.  
  51.  
  52. #
  53. # To modify the movements of the camera
  54. #
  55. import AnmCameras
  56. AnmCameras.Init()
  57.  
  58.  
  59.  
  60. #
  61. # Particle Systems init
  62. #
  63. # CUIDADO! Valores definidos tambien en InitParticleSystems.py.
  64. B_PARTICLE_GTYPE_COPY=0
  65. B_PARTICLE_GTYPE_BLEND=1
  66. B_PARTICLE_GTYPE_ADD=2
  67. B_PARTICLE_GTYPE_MUL=3
  68.  
  69. #
  70. # Procedural textures
  71. #
  72. execfile("..\\..\\Scripts\\AutoGenTextures.py")
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. #
  80. # PJ Init
  81. #
  82. import GotoMapVars
  83. if string.lower(Bladex.GetCurrentMap())=='2dmap': # Caso especial
  84.   execfile("pj.py")
  85.   print "Found 2DMap"
  86. elif not GotoMapVars.BeginLevel():
  87.   execfile("pj.py")
  88.  
  89.  
  90. #
  91. # Scorer Data init
  92. #
  93. import Scorer
  94. Scorer.ActivateScorer()
  95.  
  96. import CharStats
  97.  
  98.  
  99. import GameText
  100. GameText.SetLanguage("Spanish")
  101.  
  102. ##execfile("..\\..\\Scripts\\DefaultScorerData.py")
  103. import DefaultScorerData
  104. DefaultScorerData.Init()
  105.  
  106. # Inicio del personaje y sus marcadores
  107. char=Bladex.GetEntity("Player1")  #Por si acaso
  108. Scorer.SetLevelLimits(0,CharStats.GetCharExperienceCost(char.CharType,char.Level))
  109. Scorer.SetLevelBarValue(char.PartialLevel)
  110. Scorer.SetLevelValue(char.Level)
  111.  
  112.  
  113.  
  114.  
  115. #
  116. # Timers
  117. #
  118. Bladex.CreateTimer("Timer60",1.0/60.0)
  119. Bladex.CreateTimer("Timer30",1.0/30.0)
  120. Bladex.CreateTimer("Timer15",1.0/15.0)
  121.  
  122. #import pywin.debugger
  123. #pywin.debugger.set_trace()
  124.  
  125.  
  126. #
  127. # Controls ( keyboard,mouse...) stuff
  128. #
  129. execfile("..\\..\\Scripts\\InputInit.py")
  130.  
  131. import acts
  132. acts.InitBindings("Player1")
  133. acts.SetNoConfigurableActions()
  134.  
  135. try:
  136.   execfile("..\\..\\Scripts\\Control.py")
  137.   print "BladeInit -> Executed Control.py"
  138. except:
  139.   execfile("..\\..\\Scripts\\DefControl.py")
  140.   print "BladeInit -> Executed DefControl.py"
  141.  
  142.  
  143. #
  144. # Demo Mode 
  145. #
  146. import  Demo_Stuff
  147. Demo_Stuff.Init()
  148.  
  149.  
  150. #
  151. # Menu
  152. #
  153. #execfile("..\\..\\Scripts\\Menu.py")
  154. import Menu
  155. Menu.InitMenuKeys()
  156.  
  157.  
  158. execfile("..\\..\\Scripts\\Globals.py")
  159.  
  160.  
  161.  
  162. Bladex.SetListenerPosition(1)
  163. #
  164. # FOR RELEASE VERSIONS, SET TO 0
  165. #
  166. Reference.PYTHON_DEBUG=0
  167.  
  168. if Reference.PYTHON_DEBUG >= 1: 
  169.     ############### DEBUG LEVEL ONE ###############
  170.     execfile("..\\..\\Scripts\\DebugControl.py")
  171.         
  172.     if Reference.PYTHON_DEBUG >= 2: 
  173.         ############### DEBUG LEVEL TWO ###############
  174.         Bladex.SetCallCheck(3)
  175. else:
  176.     Bladex.SetCallCheck(0)
  177.  
  178. import ItemTypes
  179. import math
  180.