Giter Club home page Giter Club logo

editor's People

Contributors

azurda avatar karjala22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jdmclark

editor's Issues

Multiple Wall/VX Selection Crashes the editor

It's dying on Vertex Multiselect section starting on line 702 in MAPPER.PAS.

TheSector.Vx.Objects[StrToInt(Copy(VX_MULTIS[m],5,4))]

Why is it happening? After deleting a vertex (it doesn't handle multiple of them), it attempts to redraw the editor by updating the multi-selected vertices. However, the editor doesn't update the VX_MULTIS array for visibility from those that were deleting. So when it tries to dereference deleted vertices, it blows up with out of bounds.

I think the solution is as simple as updating the VX_MULTIS.

UI - Black Menus

UI is Black and hides critical information compared to Beta 2 (compare bottom left corner).

image

Analyse code that manipulates the map editor

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.

Sector Windows are not updating after committing once

To reproduce. Choose a sector, change a floor altitude value (or any editable field) and highlight it . Choose another sector with a different value of the floor altitude. The value displayed in the sector editor is the old one. However, if you click on the sector editor again - the value is updated. I am guessing the issue is due to it not refreshing.

The interesting thing is if you click on another sector the name of the sector editor window is updated, but no the highlighted fields.

image

The editor click that updates the sector editor window is in M_EDITOR.PAS and looks like this

`
procedure DO_Fill_SectorEditor;
var
TheSector : TSector;
numvx : Integer;
numwl : Integer;
begin
TheSector := TSector(MAP_SEC.Objects[SC_HILITE]);
numvx := TheSector.Vx.Count;
numwl := TheSector.Wl.Count;
SectorEditor.Caption := Format('SC %d %s', [SC_HILITE, TheSector.Name]);
SectorEditor.SCEd.Cells[1, 0] := TheSector.Name;
SectorEditor.SCEd.Cells[1, 1] := IntToStr(TheSector.Ambient);
SectorEditor.SCEd.Cells[1, 2] := IntToStr(TheSector.Flag1);
SectorEditor.SCEd.Cells[1, 3] := IntToStr(TheSector.Flag2);
SectorEditor.SCEd.Cells[1, 4] := IntToStr(TheSector.Flag3);
SectorEditor.SCEd.Cells[1, 5] := RTrim(Format('%-5.2f', [TheSector.Floor_Alt]));
SectorEditor.SCEd.Cells[1, 6] := TheSector.Floor.Name;
SectorEditor.SCEd.Cells[1, 7] := RTrim(Format('%-5.2f', [TheSector.Floor.f1]));
SectorEditor.SCEd.Cells[1, 8] := RTrim(Format('%-5.2f', [TheSector.Floor.f2]));
SectorEditor.SCEd.Cells[1, 9] := IntToStr(TheSector.Floor.i);
SectorEditor.SCEd.Cells[1, 10] := RTrim(Format('%-5.2f', [TheSector.Ceili_Alt]));
SectorEditor.SCEd.Cells[1, 11] := TheSector.Ceili.Name;
SectorEditor.SCEd.Cells[1, 12] := RTrim(Format('%-5.2f', [TheSector.Ceili.f1]));
SectorEditor.SCEd.Cells[1, 13] := RTrim(Format('%-5.2f', [TheSector.Ceili.f2]));
SectorEditor.SCEd.Cells[1, 14] := IntToStr(TheSector.Ceili.i);
SectorEditor.SCEd.Cells[1, 15] := RTrim(Format('%-5.2f', [TheSector.Second_Alt]));
SectorEditor.SCEd.Cells[1, 16] := IntToStr(TheSector.Layer);

SectorEditor.PanelVXNum.Caption := IntToStr(numvx);
SectorEditor.PanelWLNum.Caption := IntToStr(numwl);

DO_SectorEditor_Specials_Init;
`

The Actual window is defined in M_SCEDIT.PAS

Ensure we mute recursive StoreUndo calls

At the moment, polygonal sector creation consists of creating walls. That means that for each wall it will try to record a store call meaning for one insertion it may call 4 (sector and 3+ walls) or more stores. As a result you have to undo four times to go back to the original state.

Need to add a muting variable so it only stores in undo only once.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.