-
Notifications
You must be signed in to change notification settings - Fork 89
unify(dx8wrapper): Merge zh dx8wrapper to generals dx8wrapper part 1 #1423
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
base: main
Are you sure you want to change the base?
unify(dx8wrapper): Merge zh dx8wrapper to generals dx8wrapper part 1 #1423
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this change has a lot of incorrect white space changes which
- Make the diff larger than necessary
- Make the format different to Zero Hour
When merging from Zero Hour to Generals, please preserve the formatting of Zero Hour. This will make reviewing and diffing easier.
@@ -115,7 +115,8 @@ class TextureFilterClass | |||
void Set_V_Addr_Mode(TxtAddrMode mode) { VAddressMode=mode; } | |||
|
|||
// This needs to be called after device has been created | |||
static void _Init_Filters(void); | |||
static void _Init_Filters(TextureFilterMode texture_filter); | |||
static void _Init_Filters(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there 2 functions now?
Zero Hour just has 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its because other general files are still calling the old function, and we wanted this commit to be small. I'll investigate and see how big the diff will be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. Then that makes sense.
DX8Wrapper::Set_Transform(D3DTS_VIEW,old_view); | ||
DX8Wrapper::Set_Transform(D3DTS_WORLD,old_world); | ||
DX8Wrapper::Set_Transform(D3DTS_VIEW, old_view); | ||
DX8Wrapper::Set_Transform(D3DTS_WORLD, old_world); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting does not match Zero Hour. If you copy & paste code, disable the auto format feature in your IDE to preserve the original format on copy & paste. Otherwise use WinMerge or similar to merge the code correctly with all identical formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to change the IDE. I always have trouble with that. I do ctrl paste, undo which usually undoes the formatting but I don't think it always works. Could also use the merge tool.
@xezon could you review the code review changes? |
Looks like the branch has merge conflicts, you need to rebase on latest main? |
Yes. Try apply white space changes with |
This review now claims to have touched 3800 files. |
[fixed] force push removed the in between commits by others.
Maybe a rebase was the wrong strategy? It seems to have included all commits on main between my commits and the rebased commit? Should I redo the whole pull request with just my 5 commits? |
[fixed] nevermind I missed the force push and it ended up commits by others.
Can you do a rebase without including all the in between commits in github pull request? The pull request seems to now have 18 more commits than expected. |
1c9fa69
to
8202536
Compare
Thanks for this. I was missing a force-push, that's why it kept the old commits. All I had to do was point my branch to "Fix Makefile merge" (the last commit I want in the pull request) and force-push and the pull request fixed itself. I'm glad I didn't need to create another one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make a pass on the whitespace differences. You can run the scripts/cpp/remove_trailing_whitespace.py script to help with that.
Also please double check that code has been merged to the right places. I commented a few that are not placed correctly.
@@ -732,6 +739,7 @@ void SortingRendererClass::Flush() | |||
|
|||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zero Hour does not have this blank line
Matrix4x4 old_view; | ||
Matrix4x4 old_world; | ||
DX8Wrapper::Get_Transform(D3DTS_VIEW,old_view); | ||
DX8Wrapper::Get_Transform(D3DTS_WORLD,old_world); | ||
|
||
while (SortingNodeStruct* state=sorted_list.Head()) { | ||
state->Remove(); | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zero Hour does not have these tabs
@@ -459,6 +462,8 @@ class DX8Wrapper | |||
static void Set_Vertex_Shader_Constant(int reg, const void* data, int count); | |||
static void Set_Pixel_Shader_Constant(int reg, const void* data, int count); | |||
|
|||
static ZTextureClass* Shadow_Map[MAX_SHADOW_MAPS]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is placed at the wrong location.
@@ -100,6 +100,8 @@ class TextureClass; | |||
class LightClass; | |||
class SurfaceClass; | |||
|
|||
class ZTextureClass; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supposed to be before class SurfaceClass
@@ -2406,7 +2473,7 @@ IDirect3DSurface8 * DX8Wrapper::_Create_DX8_Surface(const char *filename_) | |||
strncpy(compressed_name,filename_, ARRAY_SIZE(compressed_name)); | |||
compressed_name[ARRAY_SIZE(compressed_name)-1] = '\0'; | |||
char *ext = strstr(compressed_name, "."); | |||
if ( ext && (strlen(ext)==4) && | |||
if ( ext && (strlen(ext)==4) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zero Hour does not have this whitespace
#define SHD_INIT_SHADERS | ||
#define SHD_SHUTDOWN_SHADERS | ||
#define SHD_FLUSH | ||
#define SHD_REG_LOADER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are whitespace changes that are not supposed to be here.
Some of zh dx8wrapper has been merged to the generals dx8wrapper.
Redoing this pull request: #1401
Small amounts at a time for easier review.