1 registered members (henrybane),
1,499
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Seed_It, Sphere2, and A7
[Re: D3D]
#139525
08/02/07 20:08
08/02/07 20:08
|
Joined: Jul 2003
Posts: 47 Indiana
S3an
Newbie
|
Newbie
Joined: Jul 2003
Posts: 47
Indiana
|
yeah, it was missing "dxutil.h", searched around and found the right one but i forget where at i can send it to you if you would like, just pm me.
A6 / A7 Commercial
|
|
|
Re: Seed_It, Sphere2, and A7
[Re: S3an]
#139526
08/02/07 21:16
08/02/07 21:16
|
Joined: Apr 2006
Posts: 1,551 Netherlands
D3D
Serious User
|
Serious User
Joined: Apr 2006
Posts: 1,551
Netherlands
|
Could you tell me if this is the same file, and will it work with the latest DirectX SDK!? If not, which DirectX SDK version did you used to recompile the DLL? Code:
//----------------------------------------------------------------------------- // File: DXUtil.h // // Desc: Helper functions and typing shortcuts for DirectX programming. // // Copyright (c) 1997-2000 Microsoft Corporation. All rights reserved //----------------------------------------------------------------------------- #ifndef DXUTIL_H #define DXUTIL_H
//----------------------------------------------------------------------------- // Miscellaneous helper functions //----------------------------------------------------------------------------- #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
//----------------------------------------------------------------------------- // Name: DXUtil_GetDXSDKMediaPath() and DXUtil_FindMediaFile() // Desc: Returns the DirectX SDK path, as stored in the system registry // during the SDK install. //----------------------------------------------------------------------------- const TCHAR* DXUtil_GetDXSDKMediaPath(); HRESULT DXUtil_FindMediaFile( TCHAR* strPath, TCHAR* strFilename );
//----------------------------------------------------------------------------- // Name: DXUtil_Read*RegKey() and DXUtil_Write*RegKey() // Desc: Helper functions to read/write a string registry key //----------------------------------------------------------------------------- HRESULT DXUtil_WriteStringRegKey( HKEY hKey, TCHAR* strRegName, TCHAR* strValue ); HRESULT DXUtil_WriteIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD dwValue ); HRESULT DXUtil_WriteGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID guidValue ); HRESULT DXUtil_WriteBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL bValue );
HRESULT DXUtil_ReadStringRegKey( HKEY hKey, TCHAR* strRegName, TCHAR* strValue, DWORD dwLength, TCHAR* strDefault ); HRESULT DXUtil_ReadIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD* pdwValue, DWORD dwDefault ); HRESULT DXUtil_ReadGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID* pGuidValue, GUID& guidDefault ); HRESULT DXUtil_ReadBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL* pbValue, BOOL bDefault );
//----------------------------------------------------------------------------- // Name: DXUtil_Timer() // Desc: Performs timer opertations. Use the following commands: // TIMER_RESET - to reset the timer // TIMER_START - to start the timer // TIMER_STOP - to stop (or pause) the timer // TIMER_ADVANCE - to advance the timer by 0.1 seconds // TIMER_GETABSOLUTETIME - to get the absolute system time // TIMER_GETAPPTIME - to get the current time // TIMER_GETELAPSEDTIME - to get the time that elapsed between // TIMER_GETELAPSEDTIME calls //----------------------------------------------------------------------------- enum TIMER_COMMAND { TIMER_RESET, TIMER_START, TIMER_STOP, TIMER_ADVANCE, TIMER_GETABSOLUTETIME, TIMER_GETAPPTIME, TIMER_GETELAPSEDTIME }; FLOAT __stdcall DXUtil_Timer( TIMER_COMMAND command );
//----------------------------------------------------------------------------- // UNICODE support for converting between CHAR, TCHAR, and WCHAR strings //----------------------------------------------------------------------------- VOID DXUtil_ConvertAnsiStringToWide( WCHAR* wstrDestination, const CHAR* strSource, int cchDestChar = -1 ); VOID DXUtil_ConvertWideStringToAnsi( CHAR* strDestination, const WCHAR* wstrSource, int cchDestChar = -1 ); VOID DXUtil_ConvertGenericStringToAnsi( CHAR* strDestination, const TCHAR* tstrSource, int cchDestChar = -1 ); VOID DXUtil_ConvertGenericStringToWide( WCHAR* wstrDestination, const TCHAR* tstrSource, int cchDestChar = -1 ); VOID DXUtil_ConvertAnsiStringToGeneric( TCHAR* tstrDestination, const CHAR* strSource, int cchDestChar = -1 ); VOID DXUtil_ConvertWideStringToGeneric( TCHAR* tstrDestination, const WCHAR* wstrSource, int cchDestChar = -1 );
//----------------------------------------------------------------------------- // Debug printing support //----------------------------------------------------------------------------- VOID DXUtil_Trace( TCHAR* strMsg, ... ); HRESULT _DbgOut( TCHAR*, DWORD, HRESULT, TCHAR* );
#if defined(DEBUG) | defined(_DEBUG) #define DXTRACE DXUtil_Trace #else #define DXTRACE sizeof #endif
#if defined(DEBUG) | defined(_DEBUG) #define DEBUG_MSG(str) _DbgOut( __FILE__, (DWORD)__LINE__, 0, str ) #else #define DEBUG_MSG(str) (0L) #endif
#endif // DXUTIL_H
|
|
|
Re: Seed_It, Sphere2, and A7
[Re: D3D]
#139527
08/03/07 01:35
08/03/07 01:35
|
Joined: Jul 2003
Posts: 47 Indiana
S3an
Newbie
|
Newbie
Joined: Jul 2003
Posts: 47
Indiana
|
I used the Feb 2007 version of DX9 with MSVC++ 7.1 (2003). The header i used is similar but not the same, alot of the CE stuff could be cut out... Code:
//----------------------------------------------------------------------------- // File: DXUtil.h // // Desc: Helper functions and typing shortcuts for DirectX programming. // // Copyright (c) Microsoft Corporation. All rights reserved //----------------------------------------------------------------------------- #ifndef DXUTIL_H #define DXUTIL_H
//----------------------------------------------------------------------------- // Miscellaneous helper functions //----------------------------------------------------------------------------- #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
#ifndef UNDER_CE //----------------------------------------------------------------------------- // Name: DXUtil_GetDXSDKMediaPath() and DXUtil_FindMediaFile() // Desc: Returns the DirectX SDK path, as stored in the system registry // during the SDK install. //----------------------------------------------------------------------------- HRESULT DXUtil_GetDXSDKMediaPathCch( TCHAR* strDest, int cchDest ); HRESULT DXUtil_GetDXSDKMediaPathCb( TCHAR* szDest, int cbDest ); HRESULT DXUtil_FindMediaFileCch( TCHAR* strDestPath, int cchDest, TCHAR* strFilename ); HRESULT DXUtil_FindMediaFileCb( TCHAR* szDestPath, int cbDest, TCHAR* strFilename ); #endif // !UNDER_CE
//----------------------------------------------------------------------------- // Name: DXUtil_Read*RegKey() and DXUtil_Write*RegKey() // Desc: Helper functions to read/write a string registry key //----------------------------------------------------------------------------- HRESULT DXUtil_WriteStringRegKey( HKEY hKey, TCHAR* strRegName, TCHAR* strValue ); HRESULT DXUtil_WriteIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD dwValue ); HRESULT DXUtil_WriteGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID guidValue ); HRESULT DXUtil_WriteBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL bValue );
HRESULT DXUtil_ReadStringRegKeyCch( HKEY hKey, TCHAR* strRegName, TCHAR* strDest, DWORD cchDest, TCHAR* strDefault ); HRESULT DXUtil_ReadStringRegKeyCb( HKEY hKey, TCHAR* strRegName, TCHAR* strDest, DWORD cbDest, TCHAR* strDefault ); HRESULT DXUtil_ReadIntRegKey( HKEY hKey, TCHAR* strRegName, DWORD* pdwValue, DWORD dwDefault ); HRESULT DXUtil_ReadGuidRegKey( HKEY hKey, TCHAR* strRegName, GUID* pGuidValue, GUID& guidDefault ); HRESULT DXUtil_ReadBoolRegKey( HKEY hKey, TCHAR* strRegName, BOOL* pbValue, BOOL bDefault );
//----------------------------------------------------------------------------- // Name: DXUtil_Timer() // Desc: Performs timer opertations. Use the following commands: // TIMER_RESET - to reset the timer // TIMER_START - to start the timer // TIMER_STOP - to stop (or pause) the timer // TIMER_ADVANCE - to advance the timer by 0.1 seconds // TIMER_GETABSOLUTETIME - to get the absolute system time // TIMER_GETAPPTIME - to get the current time // TIMER_GETELAPSEDTIME - to get the time that elapsed between // TIMER_GETELAPSEDTIME calls //----------------------------------------------------------------------------- enum TIMER_COMMAND { TIMER_RESET, TIMER_START, TIMER_STOP, TIMER_ADVANCE, TIMER_GETABSOLUTETIME, TIMER_GETAPPTIME, TIMER_GETELAPSEDTIME }; FLOAT __stdcall DXUtil_Timer( TIMER_COMMAND command );
//----------------------------------------------------------------------------- // UNICODE support for converting between CHAR, TCHAR, and WCHAR strings //----------------------------------------------------------------------------- HRESULT DXUtil_ConvertAnsiStringToWideCch( WCHAR* wstrDestination, const CHAR* strSource, int cchDestChar ); HRESULT DXUtil_ConvertWideStringToAnsiCch( CHAR* strDestination, const WCHAR* wstrSource, int cchDestChar ); HRESULT DXUtil_ConvertGenericStringToAnsiCch( CHAR* strDestination, const TCHAR* tstrSource, int cchDestChar ); HRESULT DXUtil_ConvertGenericStringToWideCch( WCHAR* wstrDestination, const TCHAR* tstrSource, int cchDestChar ); HRESULT DXUtil_ConvertAnsiStringToGenericCch( TCHAR* tstrDestination, const CHAR* strSource, int cchDestChar ); HRESULT DXUtil_ConvertWideStringToGenericCch( TCHAR* tstrDestination, const WCHAR* wstrSource, int cchDestChar ); HRESULT DXUtil_ConvertAnsiStringToWideCb( WCHAR* wstrDestination, const CHAR* strSource, int cbDestChar ); HRESULT DXUtil_ConvertWideStringToAnsiCb( CHAR* strDestination, const WCHAR* wstrSource, int cbDestChar ); HRESULT DXUtil_ConvertGenericStringToAnsiCb( CHAR* strDestination, const TCHAR* tstrSource, int cbDestChar ); HRESULT DXUtil_ConvertGenericStringToWideCb( WCHAR* wstrDestination, const TCHAR* tstrSource, int cbDestChar ); HRESULT DXUtil_ConvertAnsiStringToGenericCb( TCHAR* tstrDestination, const CHAR* strSource, int cbDestChar ); HRESULT DXUtil_ConvertWideStringToGenericCb( TCHAR* tstrDestination, const WCHAR* wstrSource, int cbDestChar );
//----------------------------------------------------------------------------- // Readme functions //----------------------------------------------------------------------------- VOID DXUtil_LaunchReadme( HWND hWnd, TCHAR* strLoc = NULL );
//----------------------------------------------------------------------------- // GUID to String converting //----------------------------------------------------------------------------- HRESULT DXUtil_ConvertGUIDToStringCch( const GUID* pGuidSrc, TCHAR* strDest, int cchDestChar ); HRESULT DXUtil_ConvertGUIDToStringCb( const GUID* pGuidSrc, TCHAR* strDest, int cbDestChar ); HRESULT DXUtil_ConvertStringToGUID( const TCHAR* strIn, GUID* pGuidOut );
//----------------------------------------------------------------------------- // Debug printing support // See dxerr9.h for more debug printing support //----------------------------------------------------------------------------- VOID DXUtil_Trace( TCHAR* strMsg, ... );
#if defined(DEBUG) | defined(_DEBUG) #define DXTRACE DXUtil_Trace #else #define DXTRACE sizeof #endif
//----------------------------------------------------------------------------- // Name: ArrayListType // Desc: Indicates how data should be stored in a CArrayList //----------------------------------------------------------------------------- enum ArrayListType { AL_VALUE, // entry data is copied into the list AL_REFERENCE, // entry pointers are copied into the list };
//----------------------------------------------------------------------------- // Name: CArrayList // Desc: A growable array //----------------------------------------------------------------------------- class CArrayList { protected: ArrayListType m_ArrayListType; void* m_pData; UINT m_BytesPerEntry; UINT m_NumEntries; UINT m_NumEntriesAllocated;
public: CArrayList( ArrayListType Type, UINT BytesPerEntry = 0 ); ~CArrayList( void ); HRESULT Add( void* pEntry ); void Remove( UINT Entry ); void* GetPtr( UINT Entry ); UINT Count( void ) { return m_NumEntries; } bool Contains( void* pEntryData ); void Clear( void ) { m_NumEntries = 0; } };
//----------------------------------------------------------------------------- // WinCE build support //-----------------------------------------------------------------------------
#ifdef UNDER_CE
#define CheckDlgButton(hdialog, id, state) ::SendMessage(::GetDlgItem(hdialog, id), BM_SETCHECK, state, 0) #define IsDlgButtonChecked(hdialog, id) ::SendMessage(::GetDlgItem(hdialog, id), BM_GETCHECK, 0L, 0L) #define GETTIMESTAMP GetTickCount #define _TWINCE(x) _T(x)
__inline int GetScrollPos(HWND hWnd, int nBar) { SCROLLINFO si; memset(&si, 0, sizeof(si)); si.cbSize = sizeof(si); si.fMask = SIF_POS; if (!GetScrollInfo(hWnd, nBar, &si)) { return 0; } else { return si.nPos; } }
#else // !UNDER_CE
#define GETTIMESTAMP timeGetTime #define _TWINCE(x) x
#endif // UNDER_CE
#endif // DXUTIL_H
Last edited by S3an; 08/03/07 01:41.
|
|
|
Re: Seed_It, Sphere2, and A7
[Re: D3D]
#139529
08/04/07 05:23
08/04/07 05:23
|
Joined: Jul 2003
Posts: 47 Indiana
S3an
Newbie
|
Newbie
Joined: Jul 2003
Posts: 47
Indiana
|
yes, the exact same problem. i removed the "for" loop from the shader and just set the var indexes by hand. not sure why A7's shader compiler is different here.
A6 / A7 Commercial
|
|
|
Re: Seed_It, Sphere2, and A7
[Re: S3an]
#139530
08/04/07 05:48
08/04/07 05:48
|
Joined: Apr 2006
Posts: 1,551 Netherlands
D3D
Serious User
|
Serious User
Joined: Apr 2006
Posts: 1,551
Netherlands
|
This is what I have done to get rid of the shader compiler error X4532. Just change in parallax.fx on line 2807 parallax. fxCode:
technique depthpass { pass p0 { cullmode=ccw; alphablendenable=false; zenable=true; zwriteenable=true; stencilenable=false; alphatestenable=false; VertexShader = compile vs_2_0 VS_PASSD(); // vs_1_1 produced the error PixelShader = compile ps_2_0 PS_PASSD(); //VertexShader = compile vs_1_1 VS_PASSD(); //PixelShader = compile ps_1_1 PS_PASSD(); } }
I'm also using the fix from William. To solve the light issue (empty pointer) with >A6.40.5 change the code like so: Sphere_Engine. wdl Fixed Code:
//****************************************************** //Light_Update(): Updates each visible light to the dll //******************************************************
function Light_Update() { var temp2loop=0;
//loop through and update each active light in the array while(temp2loop<max_sphere_lights) { temp=closestlight[temp2loop]; if(temp>0) { me=ptr_for_handle(closestlight[temp2loop]);
if my.skill5<=max_light_dist { Sp_Init_Light(vector(my.x,my.z,my.y),vector(my.skill8,my.skill9,my.skill10),vector(temp2loop,temp2loop,my.Sp_lightrange*2));
Sp_Light_Dist(my.skill5+20,temp2loop); }
//if light is not within max dist, make it black and very far away so there can be no popping artifacts
if(my.skill5>max_light_dist) { Sp_Init_Light(vector(10000,10000,10000),vector(0,0,0),vector(temp2loop,temp2loop,my.Sp_lightrange));
Sp_Light_Dist(my.skill5+20,temp2loop); } }
else { if(my) { //--- line that produced the empty pointer error Sp_Init_Light(vector(10000,10000,10000),vector(0,0,0),vector(temp2loop,temp2loop,my.Sp_lightrange));
Sp_Light_Dist(my.skill5+20,temp2loop); } }
temp2loop+=1; } }
Sphere2 is now working with A7.04.2 MS Server 2003 R2 Platform SDK MS DirectX SDK Jun 2007 A7.04.2 Plugin SDK
|
|
|
|