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

TileMap, negative Y and X Offset #27365

Merged
merged 1 commit into from Apr 5, 2019

Conversation

@Byteron
Copy link
Contributor

Byteron commented Mar 24, 2019

For our current project, it would be very convenient to have odd columns offset upwards, not downwards as the "Offset Y" option currently does.
So we went ahead and added "Offset Y Negative" and since we were at it also "Offset X Negative" to the TileMap.

@Byteron Byteron requested a review from godotengine/documentation as a code owner Mar 24, 2019
@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

Please use clang-format on tile_map.cpp (and other h/cpp files) - travis dont like unformatted strings see http://docs.godotengine.org/en/latest/community/contributing/code_style_guidelines.html#using-clang-format-locally after that squash the commits together

@Chaosus Chaosus added this to the 3.2 milestone Mar 24, 2019
@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Mar 24, 2019

formatted the cpp/h files.
Not sure what it changed, but it did change one file.

@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

Yeah, its ok now - now squash the commits into one

@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Mar 24, 2019

I'm trying but I have serious issues navigating in the console editor. T_T
I do get rebase -i HEAD~2, then the editor pops up. But when I navigate with my arrow keys weird captial letters spawn everywhere. Is that normal?

@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

Better use git commit --amend

@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Mar 24, 2019

Hm. Something happened.

@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

So the complete procedure is

 git add.
 git commit --amend
 git push --force origin <name of your branch here>
@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

No you should not merge a branch ^^ its incorrect, hm.. I guess u need to git rebase -i HEAD~(number of your commits) now since there are multiple commits (in the opened window u need to write "squash" word instead "pick" on each line entry)

@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Mar 24, 2019

That is what I'm trying to do. But in the editor, when I move the caret weird letters appear and it's not always writing what I want it to write. That makes it very difficult.

@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Mar 24, 2019

Okay I think I got it now. 🤔
it says "Successfully rebased and updated refs/heads/tile_map_negative_offset"

How do I push that now? Because if I do "git push Byteron tile_map_negative_offset" I get an error that the tip of my current branch is behind.
(I never did this before....)

EDIT: okay, force pushed. That should be it then. Thanks for your patience. :)

@Byteron Byteron force-pushed the Byteron:tile_map_negative_offset branch from 9381649 to 6602e79 Mar 24, 2019
@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

Well, I suggest you to switch on GUI base solution such as GitKraken, then - select previous commit and choose revert commit - then you should choose "Soft" or "Mixed" mode to save up your work and then force push it again

@Chaosus

This comment has been minimized.

Copy link
Member

Chaosus commented Mar 24, 2019

Ah, yeah, I think you've fixed it now, thanks for the patience )

@CptPotato

This comment has been minimized.

Copy link
Contributor

CptPotato commented Mar 25, 2019

@Byteron sounds like you've struggled with the default editor (which is vi I think).

You can change to notepad for example by running git config core.editor notepad.
If you prefer a terminal-based Editor instead I can recommend micro.

@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Mar 25, 2019

Yeah, vi does weird things.
I've switched to vscode now, thanks for the tip!

@reduz reduz requested a review from MarianoGnu Apr 4, 2019
scene/2d/tile_map.h Outdated Show resolved Hide resolved
Copy link
Contributor

MarianoGnu left a comment

please move the newly added enum values to the bottom to prevent compatibility breackage

@Byteron Byteron force-pushed the Byteron:tile_map_negative_offset branch from 6602e79 to 45b0073 Apr 5, 2019
clang-format

added negative X and negative Y offset to TileMap
@Byteron Byteron force-pushed the Byteron:tile_map_negative_offset branch from 45b0073 to 63e0fd7 Apr 5, 2019
@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Apr 5, 2019

@MarianoGnu MarianoGnu merged commit bfc3ba5 into godotengine:master Apr 5, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hpvb hpvb added the cherrypick:3.1 label Apr 20, 2019
@hpvb

This comment has been minimized.

Copy link
Member

hpvb commented Apr 20, 2019

Consider for 3.1.2

@Byteron

This comment has been minimized.

Copy link
Contributor Author

Byteron commented Apr 21, 2019

Adding this for 3.1.2 would certainly be nice for us as we need that feature as soon as possible.
But that's rather a personal wish, not an expert opinion. Do as possible.

@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Nov 12, 2019

Cherry-picked for 3.1.2.

@Byteron Byteron deleted the Byteron:tile_map_negative_offset branch Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.