Commit Graph
55 Commits
Author SHA1 Message Date
393c15c44a Post shader will use real sprite bounding box (#1536)
Co-authored-by: Alex Evgrashin <evgrashin.adl@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-02-23 22:54:48 +01:00
Pieter-Jan Briers 4ac40f2e90 Make norot on sprites default for the time being.
To band aid the pulling issues.
2021-02-23 21:32:00 +01:00
DrSmugleafandGitHub 22affccf24 Add individual layer offset (#1583)
* Add individual layer offset

* Fix error message

* Bring back layer offsetting
2021-02-23 12:55:45 +01:00
Pieter-Jan BriersandGitHub a3190a8aca Improvements to SpriteComponent for new angle changes: (#1589)
1. Fixes CopyFrom with new rotation parameters.
2. Adds a couple APIs for ClickableComponent content side.
2021-02-22 00:30:16 +01:00
Pieter-Jan Briers fba415e765 Bit of work to make Direction.South == Angle.Zero.
This makes Direction no longer follow a cartesian trig circle but oh well. Also helper methods to work with this.

Math tests currently fail, pushing this so Acruid can see about fixing SpriteComponent.
2021-02-21 19:47:42 +01:00
AcruidandGitHub de0bd1887f Sprite Rendering Bugfixes (#1551)
* Added documentation to Clyde on the sprite rendering calls.

* Added a rotation debug entity.

* Non-directional RSIs and raw textures are now rotated properly.

* Directional RSIs and Sprite Smoothing work.

* Remove the Directional flag usages.

* Supports layers with different numbers of directions.

* Fixes window rendering.
2021-02-20 11:06:08 -08:00
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
Pieter-Jan Briers e1110eadb4 Better unified handling of SpriteSpecifiers
Add more utilities, most notably IRsiStateLike, to make working with SpriteSpecifiers easier. Especially when animated.
2021-01-24 22:59:47 +01:00
Vera Aguilera PuertoandGitHub f97f325a36 Fixes sprite scale not being taken into account. (#1496)
* Fixes sprite scale not being taken into account.
- Only apply scale if length of scale vector not close or equal to 1.

* I blame Remie

* Fix vector maths
I should spend more time studying maths instead of contributing, to be fair.

* Remie no please nO
2021-01-10 19:53:04 +01:00
Pieter-Jan BriersandGitHub a41f64f30e sandboxing (#1408) 2020-11-26 23:37:31 +01:00
Ygg01andGitHub 906db8eb29 Fix Layer copy constructor (#1422)
- Inert flag wasn't propagated properly.
2020-11-26 23:11:17 +01:00
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
04dba5c45d Fix IconComponent textures (#1402)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-14 01:42:49 +11:00
09020fea17 Don't initialize dummyicon appearance (#1391)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-13 01:04:05 +01:00
ef622f7dde spritecomp will ignore state/texture attribute when layers are defined (#1399)
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2020-11-13 01:03:47 +01:00
5a3ac6a807 Dummy icon tryget (#1381)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-04 16:04:13 +01:00
178e2cbd76 Make icons great again (#1349)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-04 02:33:15 +01:00
Pieter-Jan Briers a67cbd9cb9 Fix the last of the compiler warnings. 2020-10-22 10:26:13 +02:00
bc87f2ea9c Pause refactor (#1314)
* Refactor pausing

* Sprite as well woops

* Bring PauseManagerExt back with [Obsolete] so that content compiles.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-10-12 18:16:20 +02:00
672c3d7680 Make sprite error more helpful (#1313)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-10-10 12:05:27 +02:00
Víctor Aguilera PuertoandGitHub c96d5933d5 Changes needed for construction (#1304)
* Placement improvements

* Slightly better YAML error
2020-10-06 01:55:04 +02:00
Paul RitterandGitHub 7b1f60c940 Readds Iconcomponent (#1296)
* yep

* directional texture
2020-09-28 20:54:29 +02:00
Víctor Aguilera PuertoandGitHub 695d8318d0 Make GetPrototypeIcon use a dummy entity to fix a crash (#1294)
* Make GetPrototypeIcon use a dummy entity to fix a crash

* Nullability
2020-09-24 17:30:19 +02:00
Paul RitterandGitHub 827734d658 Nukes the Iconcomponent (#1290)
* removes iconcomponent

* forgot one thing

* it works!!11

* last change
2020-09-23 16:20:32 +02:00
DTanxxxGitHubDavid Tan <>
8dc3723c09 Make more fields VV and editable (#1284)
* Make more fields VV and editable

* Applied feedback

Co-authored-by: David Tan <>
2020-09-17 23:17:46 +02:00
ExpandGitHub 31e9554cd7 Makes more fields VV (#1282)
* Sprite & Appearance VV

* Added Client SpriteComp & RSI
2020-09-08 18:44:53 +02:00
Pieter-Jan Briers 4967238202 Don't throw in ISpriteLayer.EffectiveDirection if invalid state. 2020-08-26 19:35:31 +02:00
437bf58e7b Input Handling + other cleanups to support click drag functionality (#1132)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-06 21:21:13 +02:00
Pieter-Jan Briers 0720d4d39c Fix deleted entities staying in render trees.
Alright that one was pretty obvious in hindsight.
2020-07-03 01:08:30 +02:00
Pieter-Jan Briers b72b0e5984 Use a DynamicTree for sprite finding.
Significantly improves client CPU usage.
2020-06-29 16:18:11 +02:00
Pieter-Jan BriersandGitHub af249f80c8 Improved click detection supporting features: (#1133)
* Improved click detection supporting features:

Clickable removed from engine
Texture/RSI load hooks for content
New sprite layer API

* Fix tests.
2020-06-18 02:25:02 +02:00
Pieter-Jan BriersandGitHub 6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
ComicIronicandGitHub 486fd670e2 Change DrawDepth to int, add content constant hook (#1090)
This allows DrawDepth to be defined in the content layer.
2020-05-31 00:40:48 +02:00
SweptandGitHub b89f8e396d Replaces noSprite.png with Gmod Error Sprite (#1055) 2020-05-18 12:31:24 +02:00
AcruidandGitHub a947a38f3c View Rotation (#1016)
* Adds a derived class from Nunit's Is test constraint class.
The game camera can now be rotated.

* Added the new `bind` command to the console, used to bind a key to a keybind.
Added two new keybinds for rotating the View camera left and right.
Added more info to the ""Component does not exist for state" exception.
Added Reduced() and FlipPositive() public functions to Angle.

* Fix a copy/paste bug.

* Adds missing code to bind/unbind CameraRotateLeft.
Camera snapping now actually uses the CameraSnapTolerance constant.
2020-03-25 02:22:18 +01:00
Pieter-Jan Briers 568dee4c55 SpriteSystem optimizations. 2020-02-06 16:10:14 +01:00
QuantomicusandGitHub cff6a9a5a7 Remove selector support in the RSI format (#952) 2020-02-04 23:43:27 +01:00
Pieter-Jan Briers 132f15b32d Rendering optimizations. 2020-01-20 17:45:33 +01:00
Pieter-Jan Briers 0cda9ecbee Fix sprites not cloning the serialization cache correctly. 2020-01-20 08:17:29 +01:00
Pieter-Jan Briers 1c39a36297 Fix SpriteComponent not respecting SetAutoAnimated anymore. 2019-12-29 01:20:31 +01:00
Pieter-Jan BriersandGitHub 3c08f56619 Sprite orientation improvements (#917)
* Fold animation delays into a single set for all directions.

* Update systems to use new RSI animations API.

* Fetching layer directions now done in sprite render.

* Allow overriding direction in SpriteView.
2019-12-24 01:15:44 +01:00
Pieter-Jan Briers 86be98005c Some engine optimizations. 2019-10-22 18:05:08 +02:00
Pieter-Jan BriersandGitHub 5d5b897a9b Property animations track (#867)
* WiP property animations system

* Use better lerp for Angle property animations.

* Fix handling of offset in sprite component.

* Allow animating some sprite layer properties.

* Allow animating some Transform properties.

Obviously not advisable for server entities, but great for client side entities!

* Improve animation property interpolation handling.

Added a "previous" mode.
Made values that cannot be sanely interpolated fall back to this mode.

* Improve some animation docs.
2019-09-17 22:57:12 +02:00
Pieter-Jan Briers b87adb2294 Actually use SpriteComponent.Offset for rendering. 2019-09-11 20:02:54 +02:00
Pieter-Jan Briers 10261a15b2 Fix flick animations. 2019-08-11 16:45:59 +02:00
Pieter-Jan Briers 7fce46ec44 Fix some issues Sonar caught. 2019-08-10 14:17:13 +02:00
Pieter-Jan Briers 4eb4e47975 Remove unused SpeechBubble.cs 2019-07-30 13:50:27 +02:00
Pieter-Jan Briers 5694f4ff28 Actually use sprite layer colors.
They were previously ignored.
2019-07-17 00:35:29 +02:00
Pieter-Jan BriersandGitHub 09c36b57cd Shift half of Clyde around to implement better outline rendering. (#830)
* Attempted Clyde cleanup, didn't get far.

* Add negation operator to Vector2i.

* Add RenderOrder to ISpriteComponent.

* Post process shaders.

Adds "post process" shaders to sprite component.
These are executed on the WHOLE sprite component (every layer)
in one draw.

This is necessary to implement functional outlines.
2019-07-06 19:17:33 +02:00
ZNixianandPieter-Jan Briers 222e19ddc4 Add support for diagonal RSI sprites (#828) 2019-06-29 01:54:34 +02:00