Skip to content

Add variables for int and float types#5

Open
savage13 wants to merge 2 commits intozeldamods:masterfrom
savage13:add_variable
Open

Add variables for int and float types#5
savage13 wants to merge 2 commits intozeldamods:masterfrom
savage13:add_variable

Conversation

@savage13
Copy link
Copy Markdown

Addresses Issue #4

Copy link
Copy Markdown
Member

@leoetlino leoetlino left a 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!)

Comment thread evfl/entry_point.py
self.items = {}

def _do_read(self, stream: ReadStream) -> None:
sub_flow_event_indices_offset = stream.read_u64()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread evfl/entry_point.py

if x1a > 0:
with SeekContext(stream, x8):
dic = DicReader()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable_def_names

Comment thread evfl/entry_point.py
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 = {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable_defs

Comment thread evfl/entry_point.py
import os


class Variable(BinaryObject):
Copy link
Copy Markdown
Member

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)

Comment thread evfl/enums.py
kResFlowchartNotFound = 2
kEntryPointNotFound = 3

class VariableType(enum.IntEnum):
Copy link
Copy Markdown
Member

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)

Comment thread evfl/entry_point.py
self.type = stream.read_u16()
assert self.type == VariableType.kInteger or self.type == VariableType.kFloat
stream.seek(offset)
if self.type == VariableType.kInteger:
Copy link
Copy Markdown
Member

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

@Waikuteru
Copy link
Copy Markdown

Could this be merged please? I am using event-editor daily, and would love for it to be improved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants