-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,248 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...tlin/net/rsprot/protocol/game/outgoing/codec/camera/CamLookAtEasedAngleAbsoluteEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamLookAtEasedAngleRelative | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamLookAtEasedAngleAbsoluteEncoder : MessageEncoder<CamLookAtEasedAngleRelative> { | ||
override val prot: ServerProt = GameServerProt.CAM_LOOKAT_EASED_ANGLE_ABSOLUTE | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamLookAtEasedAngleRelative, | ||
) { | ||
buffer.p2(message.yAngle) | ||
buffer.p2(message.xAngle) | ||
buffer.p2(message.duration) | ||
buffer.p2Alt1(message.function.id) | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...tlin/net/rsprot/protocol/game/outgoing/codec/camera/CamLookAtEasedAngleRelativeEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamLookAtEasedAngleRelative | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamLookAtEasedAngleRelativeEncoder : MessageEncoder<CamLookAtEasedAngleRelative> { | ||
override val prot: ServerProt = GameServerProt.CAM_LOOKAT_EASED_ANGLE_RELATIVE | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamLookAtEasedAngleRelative, | ||
) { | ||
buffer.p2(message.yAngle) | ||
buffer.p2(message.xAngle) | ||
buffer.p2(message.duration) | ||
buffer.p2Alt1(message.function.id) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
.../main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamLookAtEasedCoordEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamLookAtEasedCoord | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamLookAtEasedCoordEncoder : MessageEncoder<CamLookAtEasedCoord> { | ||
override val prot: ServerProt = GameServerProt.CAM_LOOKAT_EASED_COORD | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamLookAtEasedCoord, | ||
) { | ||
buffer.p1(message.destinationXInBuildArea) | ||
buffer.p1(message.destinationZInBuildArea) | ||
buffer.p2(message.height) | ||
buffer.p2(message.duration) | ||
buffer.p1(message.function.id) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...esktop/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamLookAtEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamLookAt | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamLookAtEncoder : MessageEncoder<CamLookAt> { | ||
override val prot: ServerProt = GameServerProt.CAM_LOOKAT | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamLookAt, | ||
) { | ||
buffer.p1(message.destinationXInBuildArea) | ||
buffer.p2Alt1(message.destinationZInBuildArea) | ||
buffer.p2(message.height) | ||
buffer.p1(message.speed) | ||
buffer.p1(message.acceleration) | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...-desktop/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamModeEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamMode | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
|
||
public class CamModeEncoder : MessageEncoder<CamMode> { | ||
override val prot: ServerProt = GameServerProt.CAM_MODE | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamMode, | ||
) { | ||
buffer.p1(message.mode) | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...in/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamMoveToEasedCircularEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamMoveToEasedCircular | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamMoveToEasedCircularEncoder : MessageEncoder<CamMoveToEasedCircular> { | ||
override val prot: ServerProt = GameServerProt.CAM_MOVETO_EASED_CIRCULAR | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamMoveToEasedCircular, | ||
) { | ||
buffer.p1(message.destinationXInBuildArea) | ||
buffer.p2Alt1(message.destinationZInBuildArea) | ||
buffer.p2(message.height) | ||
buffer.p1(message.centerXInBuildArea) | ||
buffer.p1(message.centerZInBuildArea) | ||
buffer.p2(message.duration) | ||
buffer.pboolean(!message.maintainFixedAltitude) | ||
buffer.p1(message.function.id) | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...p/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamMoveToEasedEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamMoveToEased | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamMoveToEasedEncoder : MessageEncoder<CamMoveToEased> { | ||
override val prot: ServerProt = GameServerProt.CAM_MOVETO_EASED | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamMoveToEased, | ||
) { | ||
buffer.p1(message.destinationXInBuildArea) | ||
buffer.p2Alt1(message.destinationZInBuildArea) | ||
buffer.p2(message.height) | ||
buffer.p2(message.duration) | ||
buffer.pboolean(!message.maintainFixedAltitude) | ||
buffer.p1(message.function.id) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...esktop/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamMoveToEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamMoveTo | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamMoveToEncoder : MessageEncoder<CamMoveTo> { | ||
override val prot: ServerProt = GameServerProt.CAM_MOVETO | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamMoveTo, | ||
) { | ||
buffer.p1(message.destinationXInBuildArea) | ||
buffer.p1(message.destinationZInBuildArea) | ||
buffer.p2(message.height) | ||
buffer.p1(message.speed) | ||
buffer.p1(message.acceleration) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...desktop/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamResetEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamReset | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamResetEncoder : MessageEncoder<CamReset> { | ||
override val prot: ServerProt = GameServerProt.CAM_RESET | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamReset, | ||
) { | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...desktop/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamShakeEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamShake | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamShakeEncoder : MessageEncoder<CamShake> { | ||
override val prot: ServerProt = GameServerProt.CAM_SHAKE | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamShake, | ||
) { | ||
buffer.p1(message.type) | ||
buffer.p1(message.randomAmount) | ||
buffer.p1(message.sineAmount) | ||
buffer.p1(message.sineFrequency) | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...p/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/CamSmoothResetEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.CamSmoothReset | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class CamSmoothResetEncoder : MessageEncoder<CamSmoothReset> { | ||
override val prot: ServerProt = GameServerProt.CAM_SMOOTHRESET | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: CamSmoothReset, | ||
) { | ||
buffer.p1(message.cameraMoveConstantSpeed) | ||
buffer.p1(message.cameraMoveProportionalSpeed) | ||
buffer.p1(message.cameraLookConstantSpeed) | ||
buffer.p1(message.cameraLookProportionalSpeed) | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...sktop/src/main/kotlin/net/rsprot/protocol/game/outgoing/codec/camera/OculusSyncEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.rsprot.protocol.game.outgoing.codec.camera | ||
|
||
import io.netty.channel.ChannelHandlerContext | ||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ServerProt | ||
import net.rsprot.protocol.game.outgoing.camera.OculusSync | ||
import net.rsprot.protocol.game.outgoing.prot.GameServerProt | ||
import net.rsprot.protocol.message.codec.MessageEncoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
|
||
@Consistent | ||
public class OculusSyncEncoder : MessageEncoder<OculusSync> { | ||
override val prot: ServerProt = GameServerProt.OCULUS_SYNC | ||
|
||
override fun encode( | ||
ctx: ChannelHandlerContext, | ||
buffer: JagByteBuf, | ||
message: OculusSync, | ||
) { | ||
buffer.p4(message.value) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.