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

Analyse code that manipulates the map editor #10

Open
azurda opened this issue Jun 1, 2021 · 1 comment
Open

Analyse code that manipulates the map editor #10

azurda opened this issue Jun 1, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@azurda
Copy link
Collaborator

azurda commented Jun 1, 2021

From reading the code and some tests we have two options both of them doable:

  1. Leverage the usage of DO_StoreUndo to generate snapshots of WDFUSE's memory objects instead of the current manual snapshot: Requires code analysis of when to perform this calls so every map function should store a snapshot, minimal code changes probably aside from a list of objects storing all the snapshots.
  2. Create a procedure that handles events and undos the latest event based on insertion/deletion/move/change: Requires code analysis and extra implementation, may be worth for REDO because it would save half the work.

I think the best idea is to do 1., the same way the UNDO is leveraged could be used to apply snaphots of undone events, after implementing this we could observe how limited this is and build features on top.

@azurda azurda added the enhancement New feature or request label Jun 1, 2021
@azurda azurda self-assigned this Jun 1, 2021
@azurda
Copy link
Collaborator Author

azurda commented Jun 1, 2021

List of functions that create or modify elements:

function  MakeAdjoin(sc, wl : Integer) : Boolean;
function  MakeLayerAdjoin(sc, wl : Integer) : Boolean;
function  UnAdjoin(sc, wl : Integer) : Boolean;
function  MultiMakeAdjoin : Integer;
function  MultiUnAdjoin : Integer;

procedure ShellInsertSC(cursX, cursZ : Real);
function  DeleteSC(sc : Integer) : Boolean;
procedure MultiDeleteSC;
procedure ShellDeleteSC;

procedure ShellInsertOB(cursX, cursZ : Real);
function  DeleteOB(ob : Integer) : Boolean;
procedure MultiDeleteOB;
procedure ShellDeleteOB;

procedure ShellExtrudeWL(sc, wl : Integer);
procedure ShellSplitWL(sc, wl : Integer);
procedure SplitWL(sc, wl : Integer);
function  ShellDeleteWL(sc, wl : Integer) : Boolean;

procedure ShellSplitVX(sc, vx : Integer);
procedure ShellDeleteVX(sc, vx : Integer);

@azurda azurda mentioned this issue Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant