Chose Whorld as an open source project for a class, figured it would be good practice to learn C++. I am trying to compile it with VC++ 6.0 but even after adding the necessary libraries and includes as specified in your ReadMe file I am still getting the same errors as I did before adding them. I looked into the problem a bit to see what it could be, but nothing really helped. Was hoping someone here could help me out.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I might be able to help you but I would more information. What errors exactly? Please include a copy of the error listing in your post. Have you tried compiling one of the SDX sample projects? A simple one for example is:
DirectX 8.1 SDK\all\DXF\DXSDK\samples\Multimedia\DirectDraw\RefreshRate
Have you told VC++ where to find the additional headers? In Tools/Options, Directories tab, I have:
C:\DirectX 8.1 SDK\all\DXF\DXSDK\samples\Multimedia\DirectShow\BaseClasses
C:\DirectX 8.1 SDK\all\DXF\DXSDK\include
Of all my projects to compile you picked a tough one. Whorld uses an older version of the BmpToAvi interface which requires the DirectShow base classes to be compiled correctly. That's a pain because it's very sensitive to versions. FFRend and Fractice are less work to compile because BmpToAvi is implemented as a DLL in those projects. Perhaps you could try compiling one of them instead? chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for replying so quickly. I actually got it to work, in directories in VC++ I brought all the DX includes and libraries to the top and did build by selection only. That seemed to do the trick.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry to bother you, one more question. I'm having a bit of trouble navigating around the code due to my limited knowledge of C++ and there being so many files. I am planning to add a few new effects, so I will only be needing to work with the "image" drop down menu. I was hoping you could point me in the right direction in terms of which files are associated with that menu. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By "effects" do you mean geometry parameters? If so they must be added in the following places:
ParmDef.h
ParmInfo.*
WhorldView.*
Plus the parameter name's string resource must be added in the form IDS_VP_* where * is the uppercase name in ParmDef.h, e.g. IDS_VP_RING_SPACING. ParmDef.h is evil macro magic; it creates different things in different places depending on the definition of the PARMDEF macro. All of the drawing is done in CWhorldView::Draw, and the other ring-related code is mostly in CWhorldView::TimerHook and CWhorldView::AddRing.
If by "effects" you mean things like Mirror, Fill, Outline, etc. those will require modding MainFrm for the menu handling (c.f. CMainFrame::OnImgFill), and WhorldView.cpp for the graphics implementation (c.f. CWhorldView::SetDrawModeAllRings). Note that mirroring is handled in the DirectDraw stuff, BackBuf.*, but I would tread carefully there, full-screen DirectDraw is pain to debug even with two monitors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for all the helpful responses. I am running into a problem when adding my second function. I added the menu item to the images drop down, so now I have "Enhance Lines" and "Dot Lines" below "Mirror" however when I try to activate the dot lines one it also activates the enhance lines, or some of the ones that you made depending on the hex value. I was wondering what hex value I would need to pick for DM_DOT_LINES to avoid collisions with the other functions, and how I would avoid that problem in the future.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The value I picked for DM_ENHANCE_LINES was 0x08 which seems to work independently. Also I had to create a separate enum for each new value. It seems to not like me adding any values to your draw modes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One more question. I see that you defined the default parms at the top of WhorldView.cpp, and then draw the ring in AddRing() using those values. Is there a way to change the parms to say alter ring spacing, or something of that nature through the Draw() function? I sort of played around with the values a bit, but it led me to a dead end.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The data architecture is pretty clear. The Draw function operates on a list of ring structs, and a parameters struct. The relevant view data members are mainly:
Hello,
Chose Whorld as an open source project for a class, figured it would be good practice to learn C++. I am trying to compile it with VC++ 6.0 but even after adding the necessary libraries and includes as specified in your ReadMe file I am still getting the same errors as I did before adding them. I looked into the problem a bit to see what it could be, but nothing really helped. Was hoping someone here could help me out.
Thanks.
I might be able to help you but I would more information. What errors exactly? Please include a copy of the error listing in your post. Have you tried compiling one of the SDX sample projects? A simple one for example is:
DirectX 8.1 SDK\all\DXF\DXSDK\samples\Multimedia\DirectDraw\RefreshRate
Have you told VC++ where to find the additional headers? In Tools/Options, Directories tab, I have:
C:\DirectX 8.1 SDK\all\DXF\DXSDK\samples\Multimedia\DirectShow\BaseClasses
C:\DirectX 8.1 SDK\all\DXF\DXSDK\include
Of all my projects to compile you picked a tough one. Whorld uses an older version of the BmpToAvi interface which requires the DirectShow base classes to be compiled correctly. That's a pain because it's very sensitive to versions. FFRend and Fractice are less work to compile because BmpToAvi is implemented as a DLL in those projects. Perhaps you could try compiling one of them instead? chris
Thanks for replying so quickly. I actually got it to work, in directories in VC++ I brought all the DX includes and libraries to the top and did build by selection only. That seemed to do the trick.
Sorry to bother you, one more question. I'm having a bit of trouble navigating around the code due to my limited knowledge of C++ and there being so many files. I am planning to add a few new effects, so I will only be needing to work with the "image" drop down menu. I was hoping you could point me in the right direction in terms of which files are associated with that menu. Thanks.
By "effects" do you mean geometry parameters? If so they must be added in the following places:
ParmDef.h
ParmInfo.*
WhorldView.*
Plus the parameter name's string resource must be added in the form IDS_VP_* where * is the uppercase name in ParmDef.h, e.g. IDS_VP_RING_SPACING. ParmDef.h is evil macro magic; it creates different things in different places depending on the definition of the PARMDEF macro. All of the drawing is done in CWhorldView::Draw, and the other ring-related code is mostly in CWhorldView::TimerHook and CWhorldView::AddRing.
If by "effects" you mean things like Mirror, Fill, Outline, etc. those will require modding MainFrm for the menu handling (c.f. CMainFrame::OnImgFill), and WhorldView.cpp for the graphics implementation (c.f. CWhorldView::SetDrawModeAllRings). Note that mirroring is handled in the DirectDraw stuff, BackBuf.*, but I would tread carefully there, full-screen DirectDraw is pain to debug even with two monitors.
Thanks for all the helpful responses. I am running into a problem when adding my second function. I added the menu item to the images drop down, so now I have "Enhance Lines" and "Dot Lines" below "Mirror" however when I try to activate the dot lines one it also activates the enhance lines, or some of the ones that you made depending on the hex value. I was wondering what hex value I would need to pick for DM_DOT_LINES to avoid collisions with the other functions, and how I would avoid that problem in the future.
The value I picked for DM_ENHANCE_LINES was 0x08 which seems to work independently. Also I had to create a separate enum for each new value. It seems to not like me adding any values to your draw modes.
Those DM_* draw modes are bitmasks, so they'd better all remain powers of 2. No need for a separate enum, most likely you're just missing a comma.
Awesome that worked! Thanks a lot, 2 down 3 to go.
One more question. I see that you defined the default parms at the top of WhorldView.cpp, and then draw the ring in AddRing() using those values. Is there a way to change the parms to say alter ring spacing, or something of that nature through the Draw() function? I sort of played around with the values a bit, but it led me to a dead end.
The data architecture is pretty clear. The Draw function operates on a list of ring structs, and a parameters struct. The relevant view data members are mainly:
So to add new degrees of freedom you need to modify RING or PARMS.