Loobinex / keeperfx-unofficial

KeeperFX - Unofficial release
60 stars 7 forks source link

Create bigger rooms with a single click #209

Closed Loobinex closed 3 years ago

Loobinex commented 4 years ago

When placing a room type, the player can use LSHIFT, LCTRL, and the NUMKEYS to place multiple room slabs with a single click. The bounding box displays this multi-slab room, to show the player the slabs that the current room type will be placed in.

These new features are described in the following sections:

Summary of code changes in this Pull Request:

Code additions for the "find best room algorithm" (list to be completed):

Function changes/additions to support "box rooms" and "fancy rooms":

Additional supporting function changes:

DK variable name changes:

eddebaby commented 3 years ago

This follows from #161

eddebaby commented 3 years ago

Room Detection mode: Overview image

eddebaby commented 3 years ago

Room Detection mode: Brief Technical Description

Rooms can either be:

_Graphical representation of a "fancy room", a 2D array of booleans, e.g. TbBool best_room[][]:_ image

Drawing bounding boxes:

Slab validity:

Finding the biggest room:

eddebaby commented 3 years ago

Fixed Room Size mode: Overview image image

eddebaby commented 3 years ago

Bridge Painting mode: Overview image

eddebaby commented 3 years ago

Reorganisation:

Needed work pushed to version 2:

Loobinex commented 3 years ago

1) Boundbox colors are not right for selling. It's always colored for the slab beneath the cursor, so it could be a red boundbox but you still sell when clicking if there's other tiles below. 2) Ctrl+Scroll still both changes the size of the boundbox AND scrolls the objective message at the same time.