1. 29 Sep, 2018 1 commit
    • cvet's avatar
      Added possibility to set animation running callbacks · 1795fef5
      cvet authored
      funcdef void AnimationCallbackFunc(Critter cr)
      void Critter::AddAnimationCallback(uint anim1, uint anim2, float normalizedTime, AnimationCallbackFunc animationCallback) const
      If anim1/anim2 equal to zero then it's applied to all sequence.
      
      Added method to determine bone position in offset of current hex position
      bool Critter::GetBonePosition(hash boneName, int& boneX, int& boneY) const
      
      Client function to determine tile name (hash)
      hash GetTileName(uint16 hexX, uint16 hexY, bool roof, int layer)
      
      Redesigned interaction with DrawMapSprite*.
      Added new class MapSprite for pass to new function
      void DrawMapSprite(MapSprite& mapSprite)
      Older DrawMapSpriteProto and DrawMapSpriteExt are removed.
      MapSprite class members:
      uint SprId
      uint16 HexX
      uint16 HexY
      hash ProtoId
      int FrameIndex
      int OffsX
      int OffsY
      bool IsFlat
      bool NoLight
      int DrawOrder
      int DrawOrderHyOffset
      int Corner
      bool DisableEgg
      uint Color
      uint ContourColor
      bool IsTweakOffs
      int16 TweakOffsX
      int16 TweakOffsY
      bool IsTweakAlpha
      uint8 TweakAlpha
      
      Example of using this stuff for character footsteps
      https://www.youtube.com/watch?v=gHdzbBOI_Sw
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@815 71b6ff52-6597-447a-9a87-58edf7a03249
      1795fef5
  2. 27 Sep, 2018 1 commit
    • cvet's avatar
      Fixed working of game time. · 2fc6a717
      cvet authored
      Fixed working of Critter::ViewMap.
      
      Added global variables to determine build where scripts take run
      const bool __DesktopBuild
      const bool __TabletBuild
      const bool __WebBuild
      const bool __WindowsBuild
      const bool __LinuxBuild
      const bool __MacOsBuild
      const bool __AndroidBuild
      const bool __IOsBuild
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@814 71b6ff52-6597-447a-9a87-58edf7a03249
      2fc6a717
  3. 26 Sep, 2018 1 commit
    • cvet's avatar
      Added rendering feature for prerender some graphic to separate surface and... · b7bc980d
      cvet authored
      Added rendering feature for prerender some graphic to separate surface and then draw with some effect.
      New functions
      void ActivateOffscreenSurface(bool forceClear = false)
      void PresentOffscreenSurface(int effectSubtype) - draw whole screen entire
      void PresentOffscreenSurface(int effectSubtype, int x, int y, int w, int h) - draw custom rectangle
      void PresentOffscreenSurface(int effectSubtype, int fromX, int fromY, int fromW, int fromH, int toX, int toY, int toW, int toH) - draw custom rectangle to custom screen place
      Setup effects using function SetEffect( EFFECT_OFFSCREEN, X, ... ) where X is any non negative index witch you pass to present function.
      Example of usage - https://youtu.be/Anat94MEpi8
      
      Fixed effects 'Time' uniform.
      Added OnPostDraw gui callback, called after element (and their children) draw.
      EventRenderIface now not pass layer value, it's single call.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@813 71b6ff52-6597-447a-9a87-58edf7a03249
      b7bc980d
  4. 24 Sep, 2018 1 commit
  5. 23 Sep, 2018 1 commit
  6. 22 Sep, 2018 1 commit
  7. 21 Sep, 2018 1 commit
    • cvet's avatar
      Added '#undef' directive. · 9d7a186d
      cvet authored
      Added 'filesystem' script class.
      Fixed 'ModelName' change handling.
      Fixed crash when pressing Maps/Locations in server gui.
      Fixed build pipeline on non Windows machines.
      Fixed scripts loading order for correct defines loading.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@809 71b6ff52-6597-447a-9a87-58edf7a03249
      9d7a186d
  8. 19 Sep, 2018 3 commits
  9. 18 Sep, 2018 1 commit
  10. 12 Sep, 2018 3 commits
  11. 11 Sep, 2018 1 commit
  12. 10 Sep, 2018 1 commit
  13. 15 Dec, 2017 1 commit
  14. 09 Sep, 2017 2 commits
  15. 06 Sep, 2017 1 commit
    • cvet's avatar
      Profiler crash fix. · 8b42fb17
      cvet authored
      Hash resolving crash fix.
      
      Improved line splitters " \" for key value text format.
      Line must ends with space or tab + revert slash (\).
      All begin/end spaces are trimmed.
      For example line
      MyKey = 0 \
          1   \
          2   \
          3
      will become
      MyKey = 0 1 2 3
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@796 71b6ff52-6597-447a-9a87-58edf7a03249
      8b42fb17
  16. 04 Sep, 2017 2 commits
    • cvet's avatar
      Fixed string::lower/upper hanging. · e940d50e
      cvet authored
      Fixed GetTextInfo returned width value.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@795 71b6ff52-6597-447a-9a87-58edf7a03249
      e940d50e
    • cvet's avatar
      Improved properties component system. · 3872cdbc
      cvet authored
      To declare component use this syntax:
      #pragma property Entity Component ComponentName
      
      Example of declaration:
      #pragma property "Item Component Drug"
      #pragma property "Item Public uint Drug.Duration"
      #pragma property "Item Public bool Drug.IsForFun"
      #pragma property "Item Component Fuel"
      #pragma property "Item Public bool Fuel.IsBio"
      
      And using:
      if( item.Drug != null && item.Drug.IsForFun )
          Log( "Fun drugs!" );
      if( item.Fuel == null )
          return;
      
      For assigning components to entities need type their in proto files
      $Components = Drug Fuel # Special field for describe components list
      IsHidden = false # Regular properties
      Drug.Duration = 100 # Component properties
      Drug.IsForFun = true
      Fuel.IsBio = true
      ...
      
      On this system will be moved item types and different things.
      This useful for grouping variables under one space and restrict accidental access to non correct properties for this entity.
      All possible Ammo_Caliber, Ammo_MaxCount, AmmoCount will be changed to Ammo.Caliber, Ammo.MaxCount, Ammo.Count and etc.
      And if you try access to Ammo.Caliber in item which not contains Ammo component then Null pointer access will happen.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@794 71b6ff52-6597-447a-9a87-58edf7a03249
      3872cdbc
  17. 02 Sep, 2017 1 commit
  18. 01 Sep, 2017 1 commit
  19. 31 Aug, 2017 1 commit
    • cvet's avatar
      Mapper start fix. · 43009312
      cvet authored
      Added script dict string as key.
      Fixed work with corruption of blockers in BlockLines.
      
      Fixed -run option in compiler.
      Workable global functions in compiler run:
      void Assert(bool condition)
      void ThrowException(string message)
      int Random(int min, int max)
      void Log(string text)
      bool StrToInt(string text, int& result)
      bool StrToFloat(string text, float& result)
      uint GetDistantion(uint16 hexX1, uint16 hexY1, uint16 hexX2, uint16 hexY2)
      uint8 GetDirection(uint16 fromHexX, uint16 fromHexY, uint16 toHexX, uint16 toHexY)
      uint8 GetOffsetDir(uint16 fromHexX, uint16 fromHexY, uint16 toHexX, uint16 toHexY, float offset)
      uint GetTick()
      uint GetAngelScriptProperty(int property)
      void SetAngelScriptProperty(int property, uint value)
      hash GetStrHash(string str)
      string GetHashStr(hash h)
      uint DecodeUTF8(string text, uint& length)
      string EncodeUTF8(uint ucs)
      string[] GetFolderFileNames(string path, string extension, bool includeSubdirs)
      bool DeleteFile(string fileName)
      void CreateDirectoryTree(string path)
      string SHA1(string text)
      string SHA2(string text)
      int SystemCall(string command)
      int SystemCall(string command, string& output)
      void OpenLink(string link)
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@791 71b6ff52-6597-447a-9a87-58edf7a03249
      43009312
  20. 29 Aug, 2017 1 commit
    • cvet's avatar
      A lot of refactoring. · 7e295cc6
      cvet authored
      Fix for '_Raw' resources subfolder copying.
      Changing of mapper item properties now give side effects (PicMap, Light*, Block/Shoot flags, etc).
      In Mapper MapperMap class now just Map.
      Added string Map::FileDir property that holds directory of fomap file.
      Excluded Critter::MoveRandom().
      Fixed crashing on non-3d critter loads with enabled 3d rendering.
      Fixed crashing on 3d effect loading from cache.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@790 71b6ff52-6597-447a-9a87-58edf7a03249
      7e295cc6
  21. 03 Apr, 2017 1 commit
  22. 13 Mar, 2017 1 commit
  23. 11 Mar, 2017 1 commit
  24. 06 Mar, 2017 1 commit
    • cvet's avatar
      Excluded stuff related to AI. · 2bb22396
      cvet authored
      Added some stuff for control movements:
      void Critter::MoveToCritter(Critter@+ cr, uint cut, bool isRun) - init moving to critter;
      void Critter::MoveToHex(uint16 hexX, uint16 hexY, uint cut, bool isRun) - init moving to hex;
      MovingState Critter::GetMovingState() const - current state;
      void Critter::ResetMovingState(uint& gagId) - reset state to Success and return id of critter/item for GagCritter/GagItem states;
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@786 71b6ff52-6597-447a-9a87-58edf7a03249
      2bb22396
  25. 13 Feb, 2017 3 commits
  26. 10 Feb, 2017 2 commits
  27. 09 Feb, 2017 1 commit
  28. 07 Feb, 2017 1 commit
  29. 04 Feb, 2017 2 commits
  30. 03 Feb, 2017 1 commit