WZ source folder structure changes?

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
Post Reply
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

WZ source folder structure changes?

Post by Watermelon »

The folder structure of wz is a bit messy,alot of headers in 'lib' subfolders are being referred/included by the source files in 'src' folder.

Current:

warzone
-lib
--framework
--gamelib
--ivis_common
--ivis_opengl
--netplay
--script
--sequence
--sound
--widget
-src


I am experimenting with the folder structure,I changed my local copy to:

warzone
-lib
--framework
--gamelib
--ivis_common
--ivis_opengl
--ivis_shared(headers shared by ivs_common and ivis_opengl)
--netplay
--script
--shared(headers shared by 'src' and other source files in 'lib')
--sequence
--widget
-src

In my opinion this will make the source files cleaner to read/easier to maintain,it will also help elimate the unnecessary dependencies between 'src' and 'lib' eventually.
tasks postponed until the trunk is relatively stable again.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: WZ source folder structure changes?

Post by DevUrandom »

Watermelon wrote: The folder structure of wz is a bit messy,alot of headers in 'lib' subfolders are being referred/included by the source files in 'src' folder.
Actually that was the plan... The other way round is bad. (But happens nevertheless.)

lib/ shall serve as an engine, while src/ should be one usecase of that engine for a game called Warzone...
Current:

warzone
-lib
--framework
--gamelib
--ivis_common
--ivis_opengl
--netplay
--script
--sequence
--sound
--widget
-src


I am experimenting with the folder structure,I changed my local copy to:

warzone
-lib
--framework
--gamelib
--ivis_common
--ivis_opengl
--ivis_shared(headers shared by ivs_common and ivis_opengl)
--netplay
--script
--shared(headers shared by 'src' and other source files in 'lib')
--sequence
--widget
-src

In my opinion this will make the source files cleaner to read/easier to maintain,it will also help elimate the unnecessary dependencies between 'src' and 'lib' eventually.
Actually ivis_common is allready the common part between 2 ivis implementations (software and opengl). The sw renderer got removed, so we could merge ivis_common and ivis_opengl into one ivis dir...

Generally I don't second the move of src/ headers into the lib/ part, just so there are no headers in the src/ left...
We could move headers which have their implementation (means: .c file) in the lib allready and which are generic enough to be called an engine API to the _appropriate_ place in lib/. I don't think simply throwing all headers into one shared/ dir would bring anything good.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: WZ source folder structure changes?

Post by Watermelon »

I didnt mean moving headers in src to lib/shared,I meant moving all headers in lib subfolders referred/included by 'src' to lib/shared.

my idea is to make all files except 'shared' in lib folders independent from 'src',the source files in 'lib' should be a static library and few headers instead of getting incorporated into 'src project' directly,while the game part(source and headers in 'src') just links against the big static lib(engine) and includes the headers in lib/shared to 'make' warzone binaries.
tasks postponed until the trunk is relatively stable again.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: WZ source folder structure changes?

Post by DevUrandom »

I don't think this is a good idea...
The pathname in the include reference gives a hint what part of the engine it is from and what it is used for...
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: WZ source folder structure changes?

Post by Watermelon »

ok I'll bin that idea and 'archive' the new folder structure and changed source files.
tasks postponed until the trunk is relatively stable again.
Post Reply