What does this mean? CDXSoundEmitter is a class that wraps access to IDirectMusicSegment8 and IDirectMusicSegmentState8 interfaces.d:\msvc 6 projects\dxenginedll\cdxaudio.h(87) : warning C4251: 'Sounds' : class 'std::vector<class CDXSoundSegment,class std::allocator<class CDXSoundSegment> >' needs to have dll-interface to be used by clients of class 'CDXSoundEmitter'
A sound emitter is the method I use to bypass separate audio paths. Each sound emitter controls the entire sound system. Ideally you would have one sound emitter for sound fx and one for digital music if need be. So a sound emitter contains a vector of CDXSoundSegments which represent the actual sounds and their associated data.
What is MSVC trying to tell me here?
I'm using this code to compile the DLL.
DllCheck.h
Test.hCode:#ifndef DllCheck_H #define DllCheck_H #ifdef _INSIDEDLL #define XTREME_DLL_DECL __declspec(dllexport) #else #define XTREME_DLL_DECL __declspec(dllimport) #endif #endif
Then when I create the DLL and import library, I simply set the preprocessor options to define _INSIDEDLL and the XTREME_DLL_DECL becomes the export version. For the application using the class, it will not define this and therefore the XTREME_DLL_DECL becomes the import version.Code:#ifndef Test_H #define Test_H #include "DllCheck.h" class XTREME_DLL_DECL Test { }; #endif
Then to use the import library you simply add it to the link section, include the right headers, and it works just like any other library.
I'm switching the editor in MFC to use the actual engine view instead of a GDI one. It's easier and I don't have to mess around with GDI, DC's, etc, etc.
The graphics engine will Initialize Direct3D in two ways. It can use either fullscreen or windowed mode and it also allows you to create a window for it. You simply set a boolean flag and it will use the HWND you supply it as the window handle and it won't create one for you. This allows me to specify any window I want which is quite nice for making editors. The InitD3D function also returns a pointer to a valid IDirect3DDevice9 so I can also draw inside of the window w/o using the engine to do so. I had to alter the render loop setup to get it to work and mess with the WndProc a bit, but it seems to be ok.
This warning bothers me though.
Using D3D to render for the editor is so nice because the map makers and level editors get a first-hand look at what everything will look like as they are creating them. Communicating to the engine from MFC is simple as well. So I get the benefits of a nice MFC GUI with a D3D renderer window.
For scrolling I intercept the WM_SCROLL messages and tell the appropriate class in the engine to scroll the view and by what amounts. The actual window doesn't do any scrolling.