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

Compiling as C #528

Closed
38 tasks done
AJenbo opened this issue Dec 30, 2018 · 9 comments
Closed
38 tasks done

Compiling as C #528

AJenbo opened this issue Dec 30, 2018 · 9 comments

Comments

@AJenbo
Copy link
Member

AJenbo commented Dec 30, 2018

This issue is for tracking the status of converting the project to C in order to get things more binary exact.

General issue

File issues

  • appfat.cpp Byte-identical version of appfat_cpp_init. #110
    • delete is being overloaded
  • capture.cpp
    • Looks like we are missing io.h
  • diablo.cpp
    • looks like we need winuser.h
    • line 297 char szValueName[] = "Intro";
  • missiles.cpp
    • unsigned char Dirs[16][16] = {...} needs to be rewritten in a C friendly way.
  • movie.cpp (Compile movie.cpp as C #529)
    • LRESULT return type appears to not allow NULL, use 0?
  • mpqapi.cpp Compile mpqapi.cpp as C #554
    • mpqapi_open_archive(const char *pszArchive, ...) first parameter gives the following errors C4028, C4090, C4024
  • pfile.cpp
    • char password[16] = PASSWORD_SINGLE; needs to be rewritten in a C friendly way.
  • wave.cpp
    • SFileReadFile(1,2,3,4,NULL) produce an error
  • render.cpp
@squidcc

This comment has been minimized.

@AJenbo

This comment has been minimized.

@squidcc

This comment has been minimized.

@AJenbo

This comment has been minimized.

@squidcc

This comment has been minimized.

@mewmew

This comment has been minimized.

@squidcc

This comment has been minimized.

@mewmew
Copy link
Contributor

mewmew commented Jan 6, 2019

The list of files that do not yet compile as C, as of rev ca64011.

  • delete operator

    • Source/appfat.cpp
  • cinit

    • Source/dthread.cpp
    • Source/dx.cpp
    • Source/engine.cpp
    • Source/fault.cpp
    • Source/logging.cpp
    • Source/msgcmd.cpp
    • Source/nthread.cpp

AJenbo pushed a commit that referenced this issue Jan 12, 2019
Note, in the future, we want to figure out how the
delete operator was overloaded and included while
still compiling the project as C.

Most likely it was overloaded in the Storm header,
and being included by appfat.cpp (which is the first
file being compiled in alphabetic order), it was
included here.

Fixes #528.
@mewmew
Copy link
Contributor

mewmew commented Jan 12, 2019

🎉 We are now closer to getting a matching Rich header :)

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

No branches or pull requests

3 participants