-
Notifications
You must be signed in to change notification settings - Fork 77
Replays POC #492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replays POC #492
Conversation
… dark fores assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, will push once tested locally.
Wow this is epic |
static MouseBot* s_curMouseBot; | ||
static s32 s_mouseNum = 0; | ||
|
||
void mousebot_resetNum() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that Lucius adds a // TFE
comment above new functions and variables that have been added, it helps us see what did not come from vanilla
I've been trying to do the same
I think it would be good if you could do this as well, where possible
s_playerInfo.health = pickup_addToValue(0, 100, s_healthMax); | ||
s_playerInfo.healthFract = 0; | ||
s_batteryPower = s_batteryPowerMax; | ||
// Always reset player ticks on init for replay consistency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "TFE" following Lucius' convention
|
||
void mission_exitLevel() | ||
{ | ||
// Force the game to exit the replay modes in case you try to exit through the menu / console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "TFE" following Lucius' convention (you get the picture) :-)
extern void weapon_animateOnOrOffscreen(MessageType msg); | ||
JBool computeAutoaim(fixed16_16 xPos, fixed16_16 yPos, fixed16_16 zPos, angle14_32 pitch, angle14_32 yaw, s32 variation); | ||
|
||
// Ensure that the weapon is reset to the default states for replays |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "TFE"
@@ -0,0 +1,1143 @@ | |||
#include <TFE_Input/replay.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just asking the question - is TFE_Input the appropriate place for this, or should you create a new directory and namespace called TFE_Replay
?
What do you think @luciusDXL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we decided to let it exist here for now and potentially refactor it later.
TheForceEngine/TFE_Input/replay.cpp
Outdated
|
||
// This is not really needed but for replay comparison reset the turret/mouse task IDs | ||
TFE_DarkForces::mousebot_resetNum(); | ||
TFE_DarkForces::turret_resetNum(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that you don't need to do the same for the other enemies?
It looks like welders, dragons, dark troopers also are numbered
local(moveMod)->target.yaw = local(odd) ? (local(obj)->yaw + deltaYaw) : (local(obj)->yaw - deltaYaw); | ||
|
||
local(moveMod)->target.yaw = local(odd) ? (local(obj)->yaw + deltaYaw) : (local(obj)->yaw - deltaYaw); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is my turn to nit pick :-)
There seem to be a lot of this in your diffs -- meaningless whitespaces added to lines
I think it would be good to revert as many of them as possible, so your PR commit does not have a whole lot of unnecessary diffs
(Would help in the future if anybody, including yourself, needs to search through the diff while bug hunting etc.)
s_framebuffer = ldraw_getBitmap(); | ||
lcanvas_getBounds(&s_viewBounds); | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one
// Draw the overlay *behind* the main view - which means we must blit it to the view. | ||
pda_drawOverlay(); | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple more
} | ||
} | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
etcetra
This is a POC replay code that is compatible with 1.15
Things to try
The replay section is in **Settings --> Replays **