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

Data structure representing virtual z-layers #1

Closed
dankamongmen opened this issue Nov 17, 2019 · 3 comments
Closed

Data structure representing virtual z-layers #1

dankamongmen opened this issue Nov 17, 2019 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@dankamongmen
Copy link
Owner

If we want to do libpanelw-like stuff, the first thing we'll need is a good data structure for maintaining multiple virtual screens along a z axis. Each cell must be able to hold its own wchar_t and attributes, including color of some depth.

@dankamongmen dankamongmen added the documentation Improvements or additions to documentation label Nov 17, 2019
@dankamongmen dankamongmen self-assigned this Nov 17, 2019
@dankamongmen dankamongmen added this to the 0.1.0 milestone Nov 17, 2019
@dankamongmen
Copy link
Owner Author

I've introduced the cell structure and alloc_plane() to set them up...

@dankamongmen
Copy link
Owner Author

I've introduced the ncplane structure, which comprises:

  • lenx and leny, dimensions of the plane
  • x and y, current position in the plane, 0 <= x < lenx etc.
  • absx and absy, position of the origin relative to the true terminal
  • a flat array of cells equal to lenx * leny for the plane
  • z, a pointer to the next plane in the z-buffer

@dankamongmen
Copy link
Owner Author

We're now properly rendering with ncplanes all over the place :D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant