Skip to content
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

Add variables for int and float types #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

savage13
Copy link

Addresses Issue #4

Copy link
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!)

def __init__(self, name: str) -> None:
super().__init__()
self.name = name
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 = {}

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

Choose a reason for hiding this comment

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


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

Choose a reason for hiding this comment

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

variable_def_names

def __init__(self, name: str) -> None:
super().__init__()
self.name = name
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
Member

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):
Copy link
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)

@@ -71,3 +71,8 @@ class BuildResultType(enum.IntEnum):
kInvalidOperation = 1
kResFlowchartNotFound = 2
kEntryPointNotFound = 3

class VariableType(enum.IntEnum):
Copy link
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)

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
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

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.

2 participants