Hello, I fucked up and got circular includes. Can anyone help me fix this?

Hello, I fucked up and got circular includes. Can anyone help me fix this?

github.com/voidAsterisk/ShadowOfTheChungus

pic related

Attached: Untitled.png (1282x759, 10K)

Other urls found in this thread:

github.com/voidAsterisk/ShadowOfTheChungus
psychictype.itch.io/shadow-of-chungus
gnu.org/philosophy/selling.html
twitter.com/SFWRedditImages

split your functions into declaration and implementation, declaration goes in the header, implementation goes in the .c or .cpp file.

so you wouldn't post your source or port to linux, and wanted Jow Forums to test your game, but now that you have a problem you don't know how to fix you are posting the code?

i'd recommend moving away from the microsoft visual studio build system because it will cause even more problems down the road and become a nightmare to get out of

a good way to break a circular dependency is to break the dependants into smaller packages: data structures, data fuctions, logic functions, helper functions, etc
this too

>github.com/voidAsterisk/ShadowOfTheChungus
>wouldn't post your source
what am I missing here?

Could you please include a LICENSE file in your repository?
License it under the GPL v3 if you can.
OP made a thread earlier.

If they make money off it will I make any money?

I fixed everything. Here's a screenshot.

Attached: Untitled.png (1282x759, 28K)

Could you give an example of why?

psychictype.itch.io/shadow-of-chungus

First off, who are "they"?
Anyway, you CAN make a profit while distributing libre software. It's about freedom, not price.
gnu.org/philosophy/selling.html

Why would I buy Half Life if I can compile it from source?

Why would I buy any game if I can just torrent it?
This very clearly shows that consumers care about supporting developers, and that people who download shit for free are a minority.
Even then, you could just release the code and not the assets.

Maybe. Snif. Maybe.

But really I want to sell it for 4.99 on Steam.

And you'll still be able to even if it's libre.

Is it not permissible under the GPL for someone to fork the project for the sole reason of providing compiled binaries?

Why go to McDonald's if you can just make the same meal for cheaper and of a higher quality at home? Convenience. People care about and will pay for convenience, that's why services like Steam are so successful in the first place.

You might want to consider a price like $2.99 or $3.99.
Your foreground and background are too close together in terms of lightness, you might want to make the terrain a bit darker unless you're honestly trying to emulate the very limited color palettes ancient consoles had.

pm'd pull request ;)

Yes, but if you don't make the assets free, they would just have the code and no game.
Effectively, this would only allow people who bought the game to legally play it themselves using the source code.
Of course, someone could just upload the assets (and by assets I mean fonts, graphics, maps, enemies, etc. if it wasn't clear) on the web, but people would upload your game anyway if it was propietary.
This would only give your players more freedom, it wouldn't encourage piracy.

#pragma once
Or
#ifndef __MY_HEADER_H__
#define __MY_HEADER_H__
...
#endif

>shadow of the chungus
I've seen your threads for a while now but I still don't know if it's named after big chungus

did you fix it user?
you can do forward declaration of classes if you only need the poiinters, but if you need the instance functions/methods you will need to create an interface, this way a file down on the dependency tree will depend on an interface, rather than one of its branches,
googlin' circular dependency gives you a few options on stack overflow

I fixed it.

Attached: 1549873397860.gif (540x405, 1.47M)

i had that a few times for using structs that were defined in other .h files in other .h files
just declare the struct in the .h file you need it in and don't include the .h you define it