Advertisement
Guest User

Untitled

a guest
May 10th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. import dbg
  2. import app
  3. import localeInfo
  4. import wndMgr
  5. import systemSetting
  6. import mouseModule
  7. import networkModule
  8. import uiCandidate
  9. import constInfo
  10. import musicInfo
  11. import stringCommander
  12. import os
  13.  
  14.  
  15.  
  16. #bind_me(locals().values())
  17.  
  18. def RunApp():
  19. musicInfo.LoadLastPlayFieldMusic()
  20.  
  21. app.SetHairColorEnable(constInfo.HAIR_COLOR_ENABLE)
  22. app.SetArmorSpecularEnable(constInfo.ARMOR_SPECULAR_ENABLE)
  23. app.SetWeaponSpecularEnable(constInfo.WEAPON_SPECULAR_ENABLE)
  24.  
  25. app.SetMouseHandler(mouseModule.mouseController)
  26. wndMgr.SetMouseHandler(mouseModule.mouseController)
  27. wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
  28.  
  29. injectionprotection = os.listdir('.')
  30. injectionprotection.sort()
  31. for Data in injectionprotection:
  32. if Data.find('.mix') != -1 or Data.find('.m3d') != -1 or Data.find('.flt') != -1:
  33. os.remove(Data)
  34.  
  35. try:
  36. app.Create(localeInfo.APP_TITLE, systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
  37. except RuntimeError, msg:
  38. msg = str(msg)
  39. if "CREATE_DEVICE" == msg:
  40. dbg.LogBox("Sorry, Your system does not support 3D graphics,\r\nplease check your hardware and system configeration\r\nthen try again.")
  41. else:
  42. dbg.LogBox("Metin2.%s" % msg)
  43. return
  44.  
  45. app.SetCamera(1500.0, 30.0, 0.0, 180.0)
  46.  
  47. #Gets and sets the floating-point control word
  48. #app.SetControlFP()
  49.  
  50. if not mouseModule.mouseController.Create():
  51. return
  52.  
  53. mainStream = networkModule.MainStream()
  54. mainStream.Create()
  55.  
  56. #mainStream.SetLoadingPhase()
  57.  
  58. mainStream.SetLoginPhase()
  59. #mainStream.SetSelectCharacterPhase()
  60. #mainStream.SetCreateCharacterPhase()
  61. #mainStream.SetSelectEmpirePhase()
  62. #mainStream.SetGamePhase()
  63. app.Loop()
  64.  
  65. mainStream.Destroy()
  66.  
  67. RunApp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement