Skip to content

Commit

Permalink
rough alpha test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Dec 21, 2021
1 parent c7659fb commit 74a93d1
Show file tree
Hide file tree
Showing 125 changed files with 811 additions and 1,325 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mono_crash.*

src/red4ext/x64/
src/red4ext/build/
packed/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down
23 changes: 23 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,29 @@
"group": "build",
"problemMatcher": []
},
{
"label": "Pack",
"type": "shell",
"command": "tools\\pack.bat",
"options": {
"shell": {
"executable": "cmd.exe",
"args": [
"/d", "/c"
]
}
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"group": "build",
"problemMatcher": []
},
{
"label": "Build Tweaks",
"type": "shell",
Expand Down

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
120 changes: 60 additions & 60 deletions build/r6/scripts/flight_control/FlightController.reds
Original file line number Diff line number Diff line change
Expand Up @@ -820,44 +820,44 @@ public class FlightController extends IScriptable {
}
}
let text = inkWidgetBuilder.inkText(n"text")
.Reparent(this.ui.GetMarksWidget())
.Font("base\\gameplay\\gui\\fonts\\industry\\industry.inkfontfamily")
.FontSize(20)
.Anchor(0.0, 0.5)
.Tint(ThemeColors.ElectricBlue())
.Text(this.hovering ? "Hovering from " + FloatToStringPrec(this.distance, 2) + " to " + FloatToStringPrec(this.hoverHeight, 2): "Flying at " + FloatToStringPrec(this.distance, 2))
.HAlign(inkEHorizontalAlign.Left)
.Margin(0.0, 0.0, 0.0, 0.0)
.Translation(1100, 320)
// .Overflow(textOverflowPolicy.AdjustToSize)
.BuildText();
let text2 = inkWidgetBuilder.inkText(n"text2")
.Reparent(this.ui.GetMarksWidget())
.Font("base\\gameplay\\gui\\fonts\\industry\\industry.inkfontfamily")
.FontSize(20)
.Anchor(0.0, 0.5)
.Tint(ThemeColors.ElectricBlue())
.Text("Current Input Context: " + ToString(stateContext.GetStateMachineCurrentState(n"InputContext")))
.HAlign(inkEHorizontalAlign.Left)
.Margin(0.0, 0.0, 0.0, 0.0)
.Translation(1100, 350)
// .Overflow(textOverflowPolicy.AdjustToSize)
.BuildText();
let text3 = inkWidgetBuilder.inkText(n"text3")
.Reparent(this.ui.GetMarksWidget())
.Font("base\\gameplay\\gui\\fonts\\industry\\industry.inkfontfamily")
.FontSize(20)
.Anchor(0.0, 0.5)
.Tint(ThemeColors.ElectricBlue())
.Text("Current Vehicle State: " + ToString(stateContext.GetStateMachineCurrentState(n"Vehicle")))
.HAlign(inkEHorizontalAlign.Left)
.Margin(0.0, 0.0, 0.0, 0.0)
.Translation(1100, 380)
// .Overflow(textOverflowPolicy.AdjustToSize)
.BuildText();
// let text = inkWidgetBuilder.inkText(n"text")
// .Reparent(this.ui.GetMarksWidget())
// .Font("base\\gameplay\\gui\\fonts\\industry\\industry.inkfontfamily")
// .FontSize(20)
// .Anchor(0.0, 0.5)
// .Tint(ThemeColors.ElectricBlue())
// .Text(this.hovering ? "Hovering from " + FloatToStringPrec(this.distance, 2) + " to " + FloatToStringPrec(this.hoverHeight, 2): "Flying at " + FloatToStringPrec(this.distance, 2))
// .HAlign(inkEHorizontalAlign.Left)
// .Margin(0.0, 0.0, 0.0, 0.0)
// .Translation(1100, 320)
// // .Overflow(textOverflowPolicy.AdjustToSize)
// .BuildText();
// let text2 = inkWidgetBuilder.inkText(n"text2")
// .Reparent(this.ui.GetMarksWidget())
// .Font("base\\gameplay\\gui\\fonts\\industry\\industry.inkfontfamily")
// .FontSize(20)
// .Anchor(0.0, 0.5)
// .Tint(ThemeColors.ElectricBlue())
// .Text("Current Input Context: " + ToString(stateContext.GetStateMachineCurrentState(n"InputContext")))
// .HAlign(inkEHorizontalAlign.Left)
// .Margin(0.0, 0.0, 0.0, 0.0)
// .Translation(1100, 350)
// // .Overflow(textOverflowPolicy.AdjustToSize)
// .BuildText();
// let text3 = inkWidgetBuilder.inkText(n"text3")
// .Reparent(this.ui.GetMarksWidget())
// .Font("base\\gameplay\\gui\\fonts\\industry\\industry.inkfontfamily")
// .FontSize(20)
// .Anchor(0.0, 0.5)
// .Tint(ThemeColors.ElectricBlue())
// .Text("Current Vehicle State: " + ToString(stateContext.GetStateMachineCurrentState(n"Vehicle")))
// .HAlign(inkEHorizontalAlign.Left)
// .Margin(0.0, 0.0, 0.0, 0.0)
// .Translation(1100, 380)
// // .Overflow(textOverflowPolicy.AdjustToSize)
// .BuildText();
this.pitchPID.SetRatio(this.stats.d_speedRatio * AbsF(Vector4.Dot(this.stats.d_direction, this.stats.d_forward)));
this.rollPID.SetRatio(this.stats.d_speedRatio * AbsF(Vector4.Dot(this.stats.d_direction, this.stats.d_right)));
Expand Down Expand Up @@ -917,32 +917,32 @@ public class FlightController extends IScriptable {
// brake
this.CreateImpulse(this.stats.d_position, -velocityDamp * timeDelta);
this.audio.DrawSlotPositions(this.ui);
// this.audio.DrawSlotPositions(this.ui);
this.UpdateAudioParams(timeDelta);
let listener = this.player.FindComponentByName(n"soundListener") as IPlacedComponent;
let listenerPosition = Matrix.GetTranslation(listener.GetLocalToWorld());
let listenerForward = Matrix.GetAxisY(listener.GetLocalToWorld());
this.ui.DrawMark(listenerPosition);
this.ui.DrawText(listenerPosition, "Listener");
let normalLine = inkWidgetBuilder.inkShape(n"normalLine")
.Reparent(this.ui.GetMarksWidget())
.Size(1920.0 * 2.0, 1080.0 * 2.0)
.UseNineSlice(true)
.ShapeVariant(inkEShapeVariant.FillAndBorder)
.LineThickness(3.0)
.FillOpacity(0.0)
.Tint(ThemeColors.ElectricBlue())
.BorderColor(ThemeColors.ElectricBlue())
.BorderOpacity(0.1)
.Visible(true)
.BuildShape();
normalLine.SetVertexList([this.ui.ScreenXY(listenerPosition), this.ui.ScreenXY(listenerPosition + listenerForward)]);
this.ui.DrawMark(listenerPosition + listenerForward);
// let listener = this.player.FindComponentByName(n"soundListener") as IPlacedComponent;
// let listenerPosition = Matrix.GetTranslation(listener.GetLocalToWorld());
// let listenerForward = Matrix.GetAxisY(listener.GetLocalToWorld());
// this.ui.DrawMark(listenerPosition);
// this.ui.DrawText(listenerPosition, "Listener");
// let normalLine = inkWidgetBuilder.inkShape(n"normalLine")
// .Reparent(this.ui.GetMarksWidget())
// .Size(1920.0 * 2.0, 1080.0 * 2.0)
// .UseNineSlice(true)
// .ShapeVariant(inkEShapeVariant.FillAndBorder)
// .LineThickness(3.0)
// .FillOpacity(0.0)
// .Tint(ThemeColors.ElectricBlue())
// .BorderColor(ThemeColors.ElectricBlue())
// .BorderOpacity(0.1)
// .Visible(true)
// .BuildShape();
// normalLine.SetVertexList([this.ui.ScreenXY(listenerPosition), this.ui.ScreenXY(listenerPosition + listenerForward)]);
// this.ui.DrawMark(listenerPosition + listenerForward);
if this.collisionTimer < this.collisionRecoveryDelay + this.collisionRecoveryDuration {
Expand Down
18 changes: 18 additions & 0 deletions build/r6/scripts/flight_control/FlightControllerUI.reds
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import Codeware.UI.*
// import Flexy.UI.*

// handle this somewhere
// this.m_tppBBConnectionId = this.m_activeVehicleUIBlackboard.RegisterListenerBool(GetAllBlackboardDefs().UI_ActiveVehicleData.IsTPPCameraOn, this, n"OnCameraModeChanged");

// public static func OperatorAssignAdd(out a: array<ref<Elem>>, b: ref<Text>) -> array<ref<Elem>> {
// ArrayPush(a, b as Elem);
// return a;
// }



public class FlightControllerUI extends inkCanvas {
public let controller: ref<inkGameController>;
public let stats: ref<FlightStats>;
Expand All @@ -25,6 +33,16 @@ public class FlightControllerUI extends inkCanvas {
}
}
public func Setup(stats: ref<FlightStats>) -> Void {
// let box_bg_image = Image.New(r"base\\gameplay\\gui\\common\\shapes\\atlas_shapes_sync.inkatlas", n"frame_top_bg");
// let box_text = Text.New("Howdy");
// // let box_text2 = Text.New("Hi there");
// let box = Box.New([box_text as Elem]);
// // // box.children += box_text2;
// box.BackgroundImage(box_bg_image);
// // RenderElem(box, new Vector2(500.0, 500.0)).Reparent(this);
this.stats = stats;
this.SetOpacity(0.0);
this.RemoveAllChildren();
Expand Down
Loading

0 comments on commit 74a93d1

Please sign in to comment.