-
Notifications
You must be signed in to change notification settings - Fork 4
Add variables for int and float types #5
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
base: master
Are you sure you want to change the base?
Conversation
leoetlino
left a comment
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.
(sorry for the long delay in reviewing this!)
| self.items = {} | ||
|
|
||
| def _do_read(self, stream: ReadStream) -> None: | ||
| sub_flow_event_indices_offset = stream.read_u64() |
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.
can we rename these variables to match the names in https://github.com/open-ead/EventFlow/blob/556793186c3065e7b25a51247d0560d7ff401b81/include/evfl/ResFlowchart.h#L71-L83 ?
|
|
||
| if x1a > 0: | ||
| with SeekContext(stream, x8): | ||
| dic = DicReader() |
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.
variable_def_names
| self.main_event: Index[evfl.event.Event] = Index() | ||
| self._sub_flow_event_indices: typing.List[int] = [] | ||
| self._sub_flow_event_indices_offset_writer: typing.Optional[PlaceholderWriter] = None | ||
| self.items = {} |
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.
variable_defs
| import os | ||
|
|
||
|
|
||
| class Variable(BinaryObject): |
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.
VariableDef (to match the actual name in the EventFlow lib)
| kResFlowchartNotFound = 2 | ||
| kEntryPointNotFound = 3 | ||
|
|
||
| class VariableType(enum.IntEnum): |
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.
This is actually the same enum as ContainerDataType (aka ore::ResMetaData::DataType)
| self.type = stream.read_u16() | ||
| assert self.type == VariableType.kInteger or self.type == VariableType.kFloat | ||
| stream.seek(offset) | ||
| if self.type == VariableType.kInteger: |
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.
needs handling of int arrays and float arrays
|
Could this be merged please? I am using event-editor daily, and would love for it to be improved! |
Addresses Issue #4