1. 12 Nov, 2018 1 commit
  2. 28 Oct, 2018 1 commit
  3. 27 Oct, 2018 1 commit
  4. 21 Oct, 2018 1 commit
  5. 19 Oct, 2018 2 commits
  6. 16 Oct, 2018 2 commits
  7. 11 Oct, 2018 1 commit
  8. 10 Oct, 2018 1 commit
  9. 09 Oct, 2018 2 commits
    • cvet's avatar
      Added soft scrolling for critter following. · 17d10243
      cvet authored
      Signature of function
      void LockScreenScroll(Critter cr, bool unlockIfSame = false)
      changed to
      void LockScreenScroll(Critter cr, bool softLock, bool unlockIfSame = false)
      Fixed 32bit client crashing.
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@821 71b6ff52-6597-447a-9a87-58edf7a03249
    • cvet's avatar
      From engine excluded hardcoded specific item protos and item types/components. · 852b8c12
      cvet authored
      New items flags
      bool IsStatic - determine that item not generated and still in single instance for all map instances;
      bool IsWall - determine that is wall for mapper interface, contour drawing, lowest draw order, for correct lighting calculations and minimap;
      bool IsScenery - determine that is scenery for mapper interface, minimap, contour drawing and lowest draw order against other items on hex;
      bool IsCanOpen - engine handles item open/close state and affect bool Opened property (doors and containers);
      bool IsScrollBlock - instead of special hex now used this flag;
      bool IsHiddenPicture - used for hide picture on client but send item, because now IsHidden static items not send to client;
      bool IsTrigger - set this flag for dynamic or static items if you want to catch them in EventItemWalk or EventStaticItemWalk;
      bool IsHiddenInStatic - hide static items in resulted functions like GetStaticItem/GetStaticItems for performance boost.
      TriggerNum Weapon.Anim1 Grid.ToMap Grid.ToMapEntire Grid.ToMapDir
      are excluded from engine.
      Removed following methods
      void Critter::TransitToMap(Map map, hash entire)
      Item Map::GetDoor(uint16 hexX, uint16 hexY)
      uint Map::CountEntire(hash entire) const
      array<hash> Map::GetAllEntires() const
      bool Map::GetEntireCoords(hash entire, uint skip, uint16& hexX, uint16& hexY) const
      bool Map::GetEntireCoords(hash entire, uint skip, uint16& hexX, uint16& hexY, uint8& dir) const
      uint Map::GetEntireCoords(hash entire, array<uint16> hexX, array<uint16> hexY, array<uint8> dirs) const
      bool Map::GetNearEntireCoords(hash& entire, uint16& hexX, uint16& hexY) const
      bool Map::GetNearEntireCoords(hash& entire, uint16& hexX, uint16& hexY, uint8& dir) const
      Map::GetScenery -> Map::GetStaticItem
      Map::GetSceneries -> Map::GetStaticItems
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@820 71b6ff52-6597-447a-9a87-58edf7a03249
  10. 06 Oct, 2018 2 commits
    • cvet's avatar
      Comparison is null and !is null converted to == null and != null. · c19d3d0b
      cvet authored
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@819 71b6ff52-6597-447a-9a87-58edf7a03249
    • cvet's avatar
      Item types moved to components. · 1d14e87c
      cvet authored
      Added new methods with predicate for retrieving items
      funcdef bool ItemPredicate(Item)
      Item Critter::GetItem(ItemPredicate predicate)
      const Item Critter::GetItem(ItemPredicate predicate) const
      array<Item> Critter::GetItems(ItemPredicate predicate)
      array<const Item> Critter::GetItems(ItemPredicate predicate) const
      array<Item> Map::GetItems(ItemPredicate predicate)
      array<const Item> Map::GetItems(ItemPredicate predicate) const
      array<Item> Map::GetItems(uint16 hexX, uint16 hexY, ItemPredicate predicate)
      array<const Item> Map::GetItems(uint16 hexX, uint16 hexY, ItemPredicate predicate) const
      array<Item> Map::GetItems(uint16 hexX, uint16 hexY, uint radius, ItemPredicate predicate)
      array<const Item> Map::GetItems(uint16 hexX, uint16 hexY, uint radius, ItemPredicate predicate) const
      Example: cr.GetItem(function(i){return i.Ammo != null;});
      Deleted methods
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@818 71b6ff52-6597-447a-9a87-58edf7a03249
  11. 03 Oct, 2018 1 commit
  12. 02 Oct, 2018 1 commit
  13. 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
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@815 71b6ff52-6597-447a-9a87-58edf7a03249
  14. 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
  15. 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
  16. 24 Sep, 2018 1 commit
  17. 23 Sep, 2018 1 commit
  18. 22 Sep, 2018 1 commit
  19. 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
  20. 19 Sep, 2018 3 commits
  21. 18 Sep, 2018 1 commit
  22. 12 Sep, 2018 3 commits
  23. 11 Sep, 2018 1 commit
  24. 10 Sep, 2018 1 commit
  25. 15 Dec, 2017 1 commit
  26. 09 Sep, 2017 2 commits
  27. 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   \
      will become
      MyKey = 0 1 2 3
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@796 71b6ff52-6597-447a-9a87-58edf7a03249
  28. 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
    • 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 )
      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
  29. 02 Sep, 2017 1 commit
  30. 01 Sep, 2017 1 commit