• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Corrosive

Members
  • Content count

    126
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Corrosive

  • Rank
    Member
  1. Thx for the help mate.. it worked! I think i should pay more attention :)
  2. Hi folks.. Im getting a strange error here... dunno why its happenning, because I checked the includes and libs, everything... but i probably forgot something! Can you help me out? Compiling... WinMain.cpp Linking... LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/rpg.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Thx!
  3. Im a little new to this stuff, so it could be wrong(90% chances hehehe), but i think you should try inheritance... Try to use this as a base and derive that class to other, so the other class will acess the private functions of the base class inside the functions and the client will only use the functions of the derived class, not the base class... I hope it works, didnt payed attention to my OOP classes at University lol!
  4. Hi there... Im trying to make some dll modules and work with abstract functions(interfaces). Its my first attempt so, maybe the question will be a little dumb, but im not used to OOP as i should be! Well, enough chit chat, the problem is that im receiving an "C2275" error message like that: c:\projetos\p1\anauelrender.h(41) : error C2275: 'CREATERENDERDEVICE' : illegal use of this type as an expression c:\projetos\p1\anauel.h(43) : see declaration of 'CREATERENDERDEVICE' And i think the problem is in the declaration, see below: extern "C" { HRESULT CreateRenderDevice(HINSTANCE hDll, AnauEngine **pInterface); typedef HRESULT (*CREATERENDERDEVICE) (HINSTANCE hDll, AnauEngine **pInterface); HRESULT ReleaseRenderDevice(AnauEngine **pInterface); typedef HRESULT (*RELEASERENDERDEVICE) (AnauEngine **pInterface); } and then defined as below: HRESULT AnauelRenderer::CreateDevice(char *chAPI) { char buffer[300]; if(strcmp(chAPI, "d3d") ==0) { a_Dll = LoadLibrary("anaueld3d"); if(!a_Dll) { MessageBox(NULL, "anaueld3d.dll falhou!", "Anauel - Erro", MB_OK | MB_ICONERROR); return E_FAIL; } } CREATERENDERDEVICE _CreateRenderDevice = 0; HRESULT hr; _CreateRenderDevice (CREATERENDERDEVICE) GetProcAddress(a_Dll, "CreateRenderDevice"); if(!_CreateRenderDevice) return E_FAIL; hr = _CreateRenderDevice(a_Dll, &a_Device); if (FAILED(hr)) { MessageBox(NULL, "CreateRenderDevice da dll falhou!", "Anauel - Erro", MB_OK | MB_ICONERROR); a_Device = NULL; return E_FAIL; } return S_OK; } I wanna know if there is something wrong about VC++ 6.0 with this type of casting, and what should i do to avoid that error? one more thing... i also used that: typedef struct AnauelRenderer *ANAUELRENDERER; and AnauelRenderer is a class, making the compiler generate this error also: c:\projetos\p1\anauelrender.h(20) : warning C4099: 'AnauelRenderer' : type name first seen using 'class' now seen using 'struct' c:\projetos\p1\anauelrender.h(4) : see declaration of 'AnauelRenderer' I just placed all of this because i think its all corelacioned. I hope you guys understand the mess i placed behind :)
  5. I defined the constructor as adviced, now all of the virtual functions are unresolved... Im a little new to abstract classes yet, thats why im getting all this trouble :) Trying to make my first Dll... One more thing... Im going to the bed folks, thx for all the help!!! Tomorrow i will take a look on this post, good night!
  6. c:\projetos\p1\anaueld3d.h(8) : error C2512: 'AnauEngine' : no appropriate default constructor available Error executing cl.exe. this is the error message and this: class anaueld3d : public AnauEngine { public: anaueld3d(HINSTANCE hDll){a_Dll = hDll;}; . . . //rest of the class body . . }; is the declaration of the constructor...
  7. Hi, well... just look at the abstract class(base class), the constructor is not virtual, its defined there. If i try to define the constructor anywhere else, it says that i dont have a apropriate default constructor. So, basically, i cant define it anymore. Its defined on the base class. The derived class dont need to define it again i think...
  8. *aDevice = new anaueld3d(hDll); its all about this line... if i get this line out, it stops showing the error... one more thing, its a link error, not a compiler error. I probably messed up with some pointers, because when it try to get a pointer for aDevice, it shows the error, when try to call the constructor!
  9. But anaueld3d is the constructor of the class derived from the base class(an abstract class). And i verified every declaration of the constructor and it means the HINSTANCE handle on every declaration. The only thing it dosnt appear to do is define the body of the constructor.
  10. Sorry for that... Well, the error message is that: anauel_Init.cpp c:\projetos\p1\anauel.h(36) : warning C4099: 'AnauEngine' : type name first seen using 'class' now seen using 'struct' c:\projetos\p1\anauel.h(6) : see declaration of 'AnauEngine' Linking... Creating library Debug/anaueld3d.lib and object Debug/anaueld3d.exp anauel_Init.obj : error LNK2001: unresolved external symbol "public: __thiscall anaueld3d::anaueld3d(struct HINSTANCE__ *)" (??0anaueld3d@@QAE@PAUHINSTANCE__@@@Z) Debug/anaueld3d.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. i dont know exactly why its showing that!!!
  11. Hi guys... Im trying to make some Object Oriented Programming here. Im making a Dll and im using abstract classes. As i can see, the error points to the constructor of the derived class!!! I will place some code to clear any doubts! //anauel_init.h #include "anaueld3d.h" HRESULT CreateRenderDevice(HINSTANCE hDll, AnauEngine **aDevice) { if(!*aDevice) { *aDevice = new anaueld3d(hDll);//line possibly with error return 0; //return A_OK quando estiver implementado o controle de erros } return 1; } //anauel.h #define Max_Instances 8 class AnauEngine { protected: HWND a_HwndMain; HWND a_Hwnd[Max_Instances]; //limite de janelas de renderização UINT a_HwndCount; //número de janelas usadas UINT a_ActiveWindowId; // Identificação da janela ativa HINSTANCE a_Dll; //Usado para carregar a DLL DWORD a_largura; //largura da tela DWORD a_altura; //altura da tela bool a_Windowed; //tela cheia ou janela? char a_GpuId[256]; //Modelo da GPU FILE *a_Log; //Arquivo de log bool a_Ativo; //Verifica se o engine está rodando public: AnauEngine(HINSTANCE) {}; virtual ~AnauEngine(void)=0; virtual HRESULT Init(HWND) =0; //Inicializa o dispositivo para a janela solicitada virtual void Release(void) =0; virtual bool Ativo(void) =0; virtual HRESULT UseWindow(UINT Hwnd) =0; virtual HRESULT Render(bool ClearPixel, bool ClearDepth, bool ClearStencil) =0; virtual void StopRender(void) =0; virtual HRESULT Clear(bool ClearPixel, bool ClearDepth, bool ClearStencil) =0; virtual void SetClearColor(float Red, float Green, float Blue) =0; }; typedef struct AnauEngine *ANAUENGINE; extern "C" { HRESULT CreateRenderDevice(HINSTANCE hDll, AnauEngine **pInterface); typedef HRESULT (*CREATERENDERDEVICE) (HINSTANCE hDll, AnauEngine **pInterface); HRESULT ReleaseRenderDevice(AnauEngine **pInterface); typedef HRESULT (*RELEASERENDERDEVICE) (AnauEngine **pInterface); } //anaueld3d.h #define Max_Instances 8 class anaueld3d : public AnauEngine { public: anaueld3d(HINSTANCE a_Dll); ~anaueld3d(void); HRESULT Init(HWND); BOOL CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM); void Release(void); bool Ativo(void) {return a_Ativo;} HRESULT Render(bool, bool, bool); HRESULT Clear(bool, bool, bool); void StopRender(void); void SetClearColor(float, float, float); HRESULT UseWindow(UINT Hwnd); private: //AnauD3DEnum *a_Enum; LPDIRECT3D9 a_D3D; LPDIRECT3DDEVICE9 a_Device; LPDIRECT3DSWAPCHAIN9 a_Chain[Max_Instances]; D3DPRESENT_PARAMETERS a_d3dpp; D3DCOLOR a_ClearColor; bool a_Rendering; bool a_Stencil; HRESULT Go(void); void Log(char *, ...); }; I hope i didnt let things too much confused :) [Edited by - Corrosive on September 13, 2004 11:15:36 PM]