Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cae1135b9 | ||
|
|
f78ca49ec0 | ||
|
|
e9c7607a4b | ||
|
|
6d49e266dd | ||
|
|
78cdb01ef1 | ||
|
|
1ed434c858 | ||
|
|
f4acbaacdc | ||
|
|
e777f3ccc4 | ||
|
|
9e61c9e4d2 | ||
|
|
3fb730ceba | ||
|
|
811ac871a3 | ||
|
|
54ed0299c0 | ||
|
|
09fcd72e43 | ||
|
|
0371836dc8 | ||
|
|
74e423e9f8 | ||
|
|
9868937c08 | ||
|
|
5c500859a3 | ||
|
|
1274a8deca | ||
|
|
4bbd82b715 | ||
|
|
827e610b8c | ||
|
|
10f3a25c54 | ||
|
|
e650d4afbc | ||
|
|
d738a804e6 | ||
|
|
1f7c5b28f8 | ||
|
|
a9d533e447 | ||
|
|
a9f91c8a9e | ||
|
|
04f1ac813e | ||
|
|
2b2672b9fd | ||
|
|
d0bba08f3a | ||
|
|
3f222b75d8 | ||
|
|
560245e005 | ||
|
|
cbd680a6ac | ||
|
|
f6b301a836 | ||
|
|
d1a1ebd016 | ||
|
|
9ffe37c21a | ||
|
|
30aa99ff0b | ||
|
|
3ee0075f1d | ||
|
|
05da8e2270 | ||
|
|
68ac692314 | ||
|
|
a4176510b9 | ||
|
|
55e890bdc1 | ||
|
|
98d3358fd5 | ||
|
|
68edb442d3 | ||
|
|
20e8c63d5c | ||
|
|
5d8e4bc040 | ||
|
|
71cf1e39f3 | ||
|
|
21be7a4c73 | ||
|
|
e7df4b26f0 | ||
|
|
11788fa37c | ||
|
|
e29ad28a06 | ||
|
|
9d30c2aed7 | ||
|
|
c62df67db2 | ||
|
|
c9e997c794 | ||
|
|
8a6d7d0d8d | ||
|
|
6cea4397f2 | ||
|
|
f0fffa71d4 | ||
|
|
49c117d5d7 | ||
|
|
19913cb665 | ||
|
|
810488e20c | ||
|
|
a91bc4c5b5 | ||
|
|
45e28f96dc | ||
|
|
b521f1c86f | ||
|
|
1d4082bdd0 | ||
|
|
df6cee3e11 | ||
|
|
15e1868fc2 | ||
|
|
113115b6df | ||
|
|
2445d076a1 | ||
|
|
8fc8549a6c | ||
|
|
bb3aac25c5 | ||
|
|
09fa95d4a0 | ||
|
|
acd87e351b | ||
|
|
8d53e8ff0f | ||
|
|
b900e918b4 | ||
|
|
067a744cda | ||
|
|
3e4c128347 | ||
|
|
acbe509c05 | ||
|
|
1bb0c6eb6f | ||
|
|
8889494848 | ||
|
|
8a780d6f0b | ||
|
|
0a2b508290 | ||
|
|
33e3aeb16e | ||
|
|
4526fa68df | ||
|
|
acfd499cfb | ||
|
|
b12c753179 | ||
|
|
7d623bb99d | ||
|
|
21684a6ea3 | ||
|
|
5306ec6809 | ||
|
|
fe2f8cf160 | ||
|
|
36999b0307 | ||
|
|
f4d01e48fa | ||
|
|
0816390509 | ||
|
|
9ce3a1a26c | ||
|
|
2797bdb4a5 | ||
|
|
ce7b221a11 | ||
|
|
2776546ab7 | ||
|
|
49013a7da8 | ||
|
|
ede16aa880 | ||
|
|
7fad41ff53 |
1
.gitignore
vendored
@@ -50,3 +50,4 @@ log.txt
|
|||||||
*.suo
|
*.suo
|
||||||
G3DTest.suo
|
G3DTest.suo
|
||||||
G3DTest.suo
|
G3DTest.suo
|
||||||
|
stderr.txt
|
||||||
|
|||||||
113
AudioPlayer.cpp
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
#include "AudioPlayer.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include "SDL_audio.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <string.h>
|
||||||
|
#define NUM_SOUNDS 10
|
||||||
|
static SDL_AudioSpec fmt;
|
||||||
|
static bool initiated = false;
|
||||||
|
|
||||||
|
AudioPlayer::AudioPlayer(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioPlayer::~AudioPlayer(void)
|
||||||
|
{
|
||||||
|
SDL_CloseAudio();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudioPlayer::init()
|
||||||
|
{
|
||||||
|
initiated = true;
|
||||||
|
extern void mixaudio(void *unused, Uint8 *stream, int len);
|
||||||
|
fmt.freq = 22050;
|
||||||
|
fmt.format = AUDIO_S16;
|
||||||
|
fmt.channels = 2;
|
||||||
|
fmt.samples = 1024; /* A good value for games */
|
||||||
|
fmt.callback = mixaudio;
|
||||||
|
fmt.userdata = NULL;
|
||||||
|
|
||||||
|
/* Open the audio device and start playing sound! */
|
||||||
|
if ( SDL_OpenAudio(&fmt, NULL) < 0 ) {
|
||||||
|
fprintf(stderr, "Unable to open audio: %s\n", SDL_GetError());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
SDL_PauseAudio(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct sample {
|
||||||
|
Uint8 *data;
|
||||||
|
Uint32 dpos;
|
||||||
|
Uint32 dlen;
|
||||||
|
} sounds[NUM_SOUNDS];
|
||||||
|
|
||||||
|
void mixaudio(void *unused, Uint8 *stream, int len)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
Uint32 amount;
|
||||||
|
|
||||||
|
for ( i=0; i<NUM_SOUNDS; ++i ) {
|
||||||
|
amount = (sounds[i].dlen-sounds[i].dpos);
|
||||||
|
if ( amount > (Uint32)len ) {
|
||||||
|
amount = len;
|
||||||
|
}
|
||||||
|
SDL_MixAudio(stream, &sounds[i].data[sounds[i].dpos], amount, SDL_MIX_MAXVOLUME);
|
||||||
|
sounds[i].dpos += amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudioPlayer::PlaySound(std::string fileString)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(initiated)
|
||||||
|
{
|
||||||
|
char *file = new char[fileString.length() + 1];
|
||||||
|
strcpy(file, fileString.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
int index;
|
||||||
|
SDL_AudioSpec wave;
|
||||||
|
Uint8 *data;
|
||||||
|
Uint32 dlen;
|
||||||
|
SDL_AudioCVT cvt;
|
||||||
|
|
||||||
|
/* Look for an empty (or finished) sound slot */
|
||||||
|
for ( index=0; index<NUM_SOUNDS; ++index ) {
|
||||||
|
if ( sounds[index].dpos == sounds[index].dlen ) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( index == NUM_SOUNDS )
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Load the sound file and convert it to 16-bit stereo at 22kHz */
|
||||||
|
if ( SDL_LoadWAV(file, &wave, &data, &dlen) == NULL ) {
|
||||||
|
fprintf(stderr, "Couldn't load %s: %s\n", file, SDL_GetError());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SDL_BuildAudioCVT(&cvt, wave.format, wave.channels, wave.freq,
|
||||||
|
AUDIO_S16, 2, fmt.freq);
|
||||||
|
cvt.buf = (Uint8*)malloc(dlen*cvt.len_mult);
|
||||||
|
memcpy(cvt.buf, data, dlen);
|
||||||
|
cvt.len = dlen;
|
||||||
|
SDL_ConvertAudio(&cvt);
|
||||||
|
SDL_FreeWAV(data);
|
||||||
|
|
||||||
|
/* Put the sound data in the slot (it starts playing immediately) */
|
||||||
|
if ( sounds[index].data ) {
|
||||||
|
free(sounds[index].data);
|
||||||
|
}
|
||||||
|
SDL_LockAudio();
|
||||||
|
sounds[index].data = cvt.buf;
|
||||||
|
sounds[index].dlen = cvt.len_cvt;
|
||||||
|
sounds[index].dpos = 0;
|
||||||
|
SDL_UnlockAudio();
|
||||||
|
delete [] file;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OutputDebugString("Audio player not initialized, sound will not play\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
11
AudioPlayer.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include <G3DAll.h>
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class AudioPlayer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AudioPlayer(void);
|
||||||
|
~AudioPlayer(void);
|
||||||
|
static void PlaySound(std::string);
|
||||||
|
static void init();
|
||||||
|
};
|
||||||
51
BaseButtonInstance.cpp
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#include "BaseButtonInstance.h"
|
||||||
|
|
||||||
|
bool floatBottom = false;
|
||||||
|
bool floatRight = false;
|
||||||
|
bool floatCenter = false;
|
||||||
|
bool disabled = false;
|
||||||
|
bool selected = false;
|
||||||
|
ButtonListener* listener = NULL;
|
||||||
|
|
||||||
|
BaseButtonInstance::BaseButtonInstance(void)
|
||||||
|
{
|
||||||
|
listener = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
BaseButtonInstance::~BaseButtonInstance(void)
|
||||||
|
{
|
||||||
|
delete listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BaseButtonInstance::setButtonListener(ButtonListener* buttonListener)
|
||||||
|
{
|
||||||
|
listener = buttonListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BaseButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown){}
|
||||||
|
|
||||||
|
bool BaseButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd){return false;}
|
||||||
|
|
||||||
|
void BaseButtonInstance::onMouseClick()
|
||||||
|
{
|
||||||
|
if(listener != NULL)
|
||||||
|
{
|
||||||
|
listener->onButton1MouseClick(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool BaseButtonInstance::mouseInArea(float point1x, float point1y, float point2x, float point2y, float mousex, float mousey)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if(mousex >= point1x && mousey >= point1y)
|
||||||
|
{
|
||||||
|
if(mousex < point2x && mousey < point2y)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
23
BaseButtonInstance.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "instance.h"
|
||||||
|
#pragma once
|
||||||
|
#include "ButtonListener.h"
|
||||||
|
class ButtonListener;
|
||||||
|
class BaseButtonInstance : public Instance
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BaseButtonInstance(void);
|
||||||
|
virtual ~BaseButtonInstance(void);
|
||||||
|
virtual void drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown);
|
||||||
|
virtual bool mouseInButton(float, float, RenderDevice* rd);
|
||||||
|
virtual void onMouseClick();
|
||||||
|
void setButtonListener(ButtonListener*);
|
||||||
|
bool floatBottom;
|
||||||
|
bool floatRight;
|
||||||
|
bool floatCenter;
|
||||||
|
bool disabled;
|
||||||
|
bool selected;
|
||||||
|
protected:
|
||||||
|
bool mouseInArea(float, float, float, float, float, float);
|
||||||
|
class ButtonListener* listener;
|
||||||
|
};
|
||||||
15
ButtonListener.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#include "ButtonListener.h"
|
||||||
|
|
||||||
|
|
||||||
|
ButtonListener::ButtonListener(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ButtonListener::~ButtonListener(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
18
ButtonListener.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "BaseButtonInstance.h"
|
||||||
|
class BaseButtonInstance;
|
||||||
|
class ButtonListener
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ButtonListener(void);
|
||||||
|
~ButtonListener(void);
|
||||||
|
virtual void onButton1MouseClick(BaseButtonInstance*);
|
||||||
|
//virtual void onMouseOver(); //TODO
|
||||||
|
//virtual void onMouseOut(); //TODO
|
||||||
|
//virtual void onButton1MouseDown(); //TODO
|
||||||
|
//virtual void onButton1MouseUp(); //TODO
|
||||||
|
//virtual void onButton2MouseClick(); //TODO
|
||||||
|
//virtual void onButton2MouseDown(); //TODO
|
||||||
|
//virtual void onButton2MouseUp(); //TODO
|
||||||
|
//What to do now...
|
||||||
|
};
|
||||||
BIN
Dialogs.aps
Normal file
149
Dialogs.rc
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "afxres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""afxres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_TOOLBOX DIALOGEX 0, 0, 398, 64
|
||||||
|
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||||
|
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_TOOLBOX_BROWSER,
|
||||||
|
"{A8F8E829-06DA-11D2-8D70-00A0C98B28E2}",WS_TABSTOP,0,0,398,64
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog Info
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_TOOLBOX DLGINIT
|
||||||
|
BEGIN
|
||||||
|
IDC_TOOLBOX_BROWSER, 0x376, 76, 0
|
||||||
|
0x0000, 0x0000, 0xb293, 0x0000, 0x0048, 0x0000, 0x0003, 0x0008, 0xf20b,
|
||||||
|
0x4757, 0x0020, 0x0000, 0x005f, 0x0065, 0x0078, 0x0074, 0x0065, 0x006e,
|
||||||
|
0x0074, 0x0078, 0x3db4, 0x0000, 0x0003, 0x0008, 0xf20a, 0x4757, 0xffe0,
|
||||||
|
0xffff, 0x005f, 0x0065, 0x0078, 0x0074, 0x0065, 0x006e, 0x0074, 0x0079,
|
||||||
|
0x0ac0, 0x0000,
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (Canada) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_ABOUT_DIALOG DIALOGEX 0, 0, 226, 151
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "About"
|
||||||
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,169,130,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,112,130,50,14
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// DESIGNINFO
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO
|
||||||
|
BEGIN
|
||||||
|
IDD_ABOUT_DIALOG, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 219
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 144
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Icon
|
||||||
|
//
|
||||||
|
|
||||||
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
|
// remains consistent on all systems.
|
||||||
|
IDI_ICON1 ICON "icon1.ico"
|
||||||
|
#endif // English (Canada) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
210
G3DTest.dsp
@@ -1,105 +1,105 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="G3DTest" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="G3DTest" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||||
|
|
||||||
CFG=G3DTest - Win32 Debug
|
CFG=G3DTest - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "G3DTest.mak".
|
!MESSAGE NMAKE /f "G3DTest.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "G3DTest.mak" CFG="G3DTest - Win32 Debug"
|
!MESSAGE NMAKE /f "G3DTest.mak" CFG="G3DTest - Win32 Debug"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "G3DTest - Win32 Release" (based on "Win32 (x86) Application")
|
!MESSAGE "G3DTest - Win32 Release" (based on "Win32 (x86) Application")
|
||||||
!MESSAGE "G3DTest - Win32 Debug" (based on "Win32 (x86) Application")
|
!MESSAGE "G3DTest - Win32 Debug" (based on "Win32 (x86) Application")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath ""
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
MTL=midl.exe
|
MTL=midl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "G3DTest - Win32 Release"
|
!IF "$(CFG)" == "G3DTest - Win32 Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
# PROP BASE Output_Dir "Release"
|
# PROP BASE Output_Dir "Release"
|
||||||
# PROP BASE Intermediate_Dir "Release"
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Release"
|
# PROP Output_Dir "Release"
|
||||||
# PROP Intermediate_Dir "Release"
|
# PROP Intermediate_Dir "Release"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x1009 /d "NDEBUG"
|
# ADD BASE RSC /l 0x1009 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x1009 /d "NDEBUG"
|
# ADD RSC /l 0x1009 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "G3DTest - Win32 Debug"
|
!ELSEIF "$(CFG)" == "G3DTest - Win32 Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
# PROP BASE Output_Dir "Debug"
|
# PROP BASE Output_Dir "Debug"
|
||||||
# PROP BASE Intermediate_Dir "Debug"
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Debug"
|
# PROP Output_Dir "Debug"
|
||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
|
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x1009 /d "_DEBUG"
|
# ADD RSC /l 0x1009 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
# Name "G3DTest - Win32 Release"
|
# Name "G3DTest - Win32 Release"
|
||||||
# Name "G3DTest - Win32 Debug"
|
# Name "G3DTest - Win32 Debug"
|
||||||
# Begin Group "Source Files"
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\main.cpp
|
SOURCE=.\main.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Header Files"
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Resource Files"
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
# End Group
|
# End Group
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
|||||||
58
G3DTest.dsw
@@ -1,29 +1,29 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "G3DTest"=.\G3DTest.dsp - Package Owner=<4>
|
Project: "G3DTest"=.\G3DTest.dsp - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Package=<4>
|
Package=<4>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Global:
|
Global:
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Package=<3>
|
Package=<3>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|||||||
64
G3DTest.plg
@@ -1,32 +1,32 @@
|
|||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<pre>
|
<pre>
|
||||||
<h1>Build Log</h1>
|
<h1>Build Log</h1>
|
||||||
<h3>
|
<h3>
|
||||||
--------------------Configuration: G3DTest - Win32 Debug--------------------
|
--------------------Configuration: G3DTest - Win32 Debug--------------------
|
||||||
</h3>
|
</h3>
|
||||||
<h3>Command Lines</h3>
|
<h3>Command Lines</h3>
|
||||||
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp" with contents
|
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp" with contents
|
||||||
[
|
[
|
||||||
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/G3DTest.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/G3DTest.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
||||||
"C:\USERS\ANDREJA\G3D\G3DTest\main.cpp"
|
"C:\USERS\ANDREJA\G3D\G3DTest\main.cpp"
|
||||||
]
|
]
|
||||||
Creating command line "cl.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp"
|
Creating command line "cl.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp"
|
||||||
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp" with contents
|
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp" with contents
|
||||||
[
|
[
|
||||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/G3DTest.pdb" /debug /machine:I386 /out:"Debug/G3DTest.exe" /pdbtype:sept
|
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/G3DTest.pdb" /debug /machine:I386 /out:"Debug/G3DTest.exe" /pdbtype:sept
|
||||||
.\Debug\main.obj
|
.\Debug\main.obj
|
||||||
]
|
]
|
||||||
Creating command line "link.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp"
|
Creating command line "link.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp"
|
||||||
<h3>Output Window</h3>
|
<h3>Output Window</h3>
|
||||||
Compiling...
|
Compiling...
|
||||||
main.cpp
|
main.cpp
|
||||||
Linking...
|
Linking...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Results</h3>
|
<h3>Results</h3>
|
||||||
G3DTest.exe - 0 error(s), 0 warning(s)
|
G3DTest.exe - 0 error(s), 0 warning(s)
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
40
G3DTest.sln
@@ -1,20 +1,20 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
# Visual Studio 2005
|
# Visual Studio 2005
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "G3DTest", "G3DTest.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "G3DTest", "G3DTest.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.ActiveCfg = Debug|Win32
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.Build.0 = Debug|Win32
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.ActiveCfg = Release|Win32
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.Build.0 = Release|Win32
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
BIN
G3DTest.suo
621
G3DTest.vcproj
@@ -1,282 +1,339 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="G3DTest"
|
Name="G3DTest"
|
||||||
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||||
RootNamespace="G3DTest"
|
RootNamespace="G3DTest"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
Name="Win32"
|
Name="Win32"
|
||||||
/>
|
/>
|
||||||
</Platforms>
|
</Platforms>
|
||||||
<ToolFiles>
|
<ToolFiles>
|
||||||
</ToolFiles>
|
</ToolFiles>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory=".\Release"
|
OutputDirectory=".\Release"
|
||||||
IntermediateDirectory=".\Release"
|
IntermediateDirectory=".\Release"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"
|
Name="VCXMLDataGeneratorTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
PreprocessorDefinitions="NDEBUG"
|
PreprocessorDefinitions="NDEBUG"
|
||||||
MkTypLibCompatible="true"
|
MkTypLibCompatible="true"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
TargetEnvironment="1"
|
TargetEnvironment="1"
|
||||||
TypeLibraryName=".\Release/G3DTest.tlb"
|
TypeLibraryName=".\Release/G3DTest.tlb"
|
||||||
HeaderFileName=""
|
HeaderFileName=""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
PrecompiledHeaderFile=".\Release/G3DTest.pch"
|
PrecompiledHeaderFile=".\Release/G3DTest.pch"
|
||||||
AssemblerListingLocation=".\Release/"
|
AssemblerListingLocation=".\Release/"
|
||||||
ObjectFile=".\Release/"
|
ObjectFile=".\Release/"
|
||||||
ProgramDataBaseFileName=".\Release/"
|
ProgramDataBaseFileName=".\Release/"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions="NDEBUG"
|
PreprocessorDefinitions="NDEBUG"
|
||||||
Culture="4105"
|
Culture="4105"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile=".\Release/G3DTest.exe"
|
OutputFile="./G3DTest.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
ProgramDatabaseFile=".\Release/G3DTest.pdb"
|
ProgramDatabaseFile=".\Release/G3DTest.pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManifestTool"
|
Name="VCManifestTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile=".\Release/G3DTest.bsc"
|
OutputFile=".\Release/G3DTest.bsc"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAppVerifierTool"
|
Name="VCAppVerifierTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"
|
Name="VCWebDeploymentTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory=".\Debug"
|
OutputDirectory=".\Debug"
|
||||||
IntermediateDirectory=".\Debug"
|
IntermediateDirectory=".\Debug"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
ManagedExtensions="0"
|
||||||
<Tool
|
>
|
||||||
Name="VCPreBuildEventTool"
|
<Tool
|
||||||
/>
|
Name="VCPreBuildEventTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCCustomBuildTool"
|
<Tool
|
||||||
/>
|
Name="VCCustomBuildTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCXMLDataGeneratorTool"
|
<Tool
|
||||||
/>
|
Name="VCXMLDataGeneratorTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
<Tool
|
||||||
/>
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCMIDLTool"
|
<Tool
|
||||||
PreprocessorDefinitions="_DEBUG"
|
Name="VCMIDLTool"
|
||||||
MkTypLibCompatible="true"
|
PreprocessorDefinitions="_DEBUG"
|
||||||
SuppressStartupBanner="true"
|
MkTypLibCompatible="true"
|
||||||
TargetEnvironment="1"
|
SuppressStartupBanner="true"
|
||||||
TypeLibraryName=".\Debug/G3DTest.tlb"
|
TargetEnvironment="1"
|
||||||
HeaderFileName=""
|
TypeLibraryName=".\Debug/G3DTest.tlb"
|
||||||
/>
|
HeaderFileName=""
|
||||||
<Tool
|
/>
|
||||||
Name="VCCLCompilerTool"
|
<Tool
|
||||||
Optimization="0"
|
Name="VCCLCompilerTool"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
Optimization="0"
|
||||||
MinimalRebuild="true"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
BasicRuntimeChecks="3"
|
MinimalRebuild="false"
|
||||||
RuntimeLibrary="2"
|
BasicRuntimeChecks="0"
|
||||||
PrecompiledHeaderFile=".\Debug/G3DTest.pch"
|
RuntimeLibrary="2"
|
||||||
AssemblerListingLocation=".\Debug/"
|
PrecompiledHeaderFile=".\Debug/G3DTest.pch"
|
||||||
ObjectFile=".\Debug/"
|
AssemblerListingLocation=".\Debug/"
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
ObjectFile=".\Debug/"
|
||||||
WarningLevel="3"
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
SuppressStartupBanner="true"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
SuppressStartupBanner="true"
|
||||||
/>
|
DebugInformationFormat="3"
|
||||||
<Tool
|
/>
|
||||||
Name="VCManagedResourceCompilerTool"
|
<Tool
|
||||||
/>
|
Name="VCManagedResourceCompilerTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCResourceCompilerTool"
|
<Tool
|
||||||
PreprocessorDefinitions="_DEBUG"
|
Name="VCResourceCompilerTool"
|
||||||
Culture="4105"
|
PreprocessorDefinitions="_DEBUG"
|
||||||
/>
|
Culture="4105"
|
||||||
<Tool
|
/>
|
||||||
Name="VCPreLinkEventTool"
|
<Tool
|
||||||
/>
|
Name="VCPreLinkEventTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCLinkerTool"
|
<Tool
|
||||||
OutputFile=".\Debug/G3DTest.exe"
|
Name="VCLinkerTool"
|
||||||
LinkIncremental="2"
|
OutputFile="./G3DTest-Debug.exe"
|
||||||
SuppressStartupBanner="true"
|
LinkIncremental="2"
|
||||||
GenerateDebugInformation="true"
|
SuppressStartupBanner="true"
|
||||||
ProgramDatabaseFile=".\Debug/G3DTest.pdb"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="2"
|
ProgramDatabaseFile=".\Debug/G3DTest.pdb"
|
||||||
TargetMachine="1"
|
SubSystem="2"
|
||||||
/>
|
TargetMachine="1"
|
||||||
<Tool
|
/>
|
||||||
Name="VCALinkTool"
|
<Tool
|
||||||
/>
|
Name="VCALinkTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCManifestTool"
|
<Tool
|
||||||
/>
|
Name="VCManifestTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCXDCMakeTool"
|
<Tool
|
||||||
/>
|
Name="VCXDCMakeTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCBscMakeTool"
|
<Tool
|
||||||
SuppressStartupBanner="true"
|
Name="VCBscMakeTool"
|
||||||
OutputFile=".\Debug/G3DTest.bsc"
|
SuppressStartupBanner="true"
|
||||||
/>
|
OutputFile=".\Debug/G3DTest.bsc"
|
||||||
<Tool
|
/>
|
||||||
Name="VCFxCopTool"
|
<Tool
|
||||||
/>
|
Name="VCFxCopTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCAppVerifierTool"
|
<Tool
|
||||||
/>
|
Name="VCAppVerifierTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCWebDeploymentTool"
|
<Tool
|
||||||
/>
|
Name="VCWebDeploymentTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCPostBuildEventTool"
|
<Tool
|
||||||
/>
|
Name="VCPostBuildEventTool"
|
||||||
</Configuration>
|
/>
|
||||||
</Configurations>
|
</Configuration>
|
||||||
<References>
|
</Configurations>
|
||||||
<AssemblyReference
|
<References>
|
||||||
RelativePath="System.dll"
|
<AssemblyReference
|
||||||
AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
RelativePath="System.dll"
|
||||||
/>
|
AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||||
<AssemblyReference
|
/>
|
||||||
RelativePath="System.Data.dll"
|
<AssemblyReference
|
||||||
AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
|
RelativePath="System.Data.dll"
|
||||||
/>
|
AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
|
||||||
<AssemblyReference
|
/>
|
||||||
RelativePath="System.Drawing.dll"
|
<AssemblyReference
|
||||||
AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
RelativePath="System.Drawing.dll"
|
||||||
/>
|
AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||||
<AssemblyReference
|
/>
|
||||||
RelativePath="System.Windows.Forms.dll"
|
<AssemblyReference
|
||||||
AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
RelativePath="System.Windows.Forms.dll"
|
||||||
/>
|
AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||||
<AssemblyReference
|
/>
|
||||||
RelativePath="System.XML.dll"
|
<AssemblyReference
|
||||||
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
RelativePath="System.XML.dll"
|
||||||
/>
|
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||||
</References>
|
/>
|
||||||
<Files>
|
</References>
|
||||||
<Filter
|
<Files>
|
||||||
Name="Source Files"
|
<Filter
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
Name="Source Files"
|
||||||
>
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
<File
|
>
|
||||||
RelativePath=".\Instance.cpp"
|
<File
|
||||||
>
|
RelativePath=".\AudioPlayer.cpp"
|
||||||
</File>
|
>
|
||||||
<File
|
</File>
|
||||||
RelativePath="main.cpp"
|
<File
|
||||||
>
|
RelativePath=".\BaseButtonInstance.cpp"
|
||||||
<FileConfiguration
|
>
|
||||||
Name="Release|Win32"
|
</File>
|
||||||
>
|
<File
|
||||||
<Tool
|
RelativePath=".\ButtonListener.cpp"
|
||||||
Name="VCCLCompilerTool"
|
>
|
||||||
PreprocessorDefinitions=""
|
</File>
|
||||||
/>
|
<File
|
||||||
</FileConfiguration>
|
RelativePath=".\Dialogs.rc"
|
||||||
<FileConfiguration
|
>
|
||||||
Name="Debug|Win32"
|
</File>
|
||||||
>
|
<File
|
||||||
<Tool
|
RelativePath=".\ImageButtonInstance.cpp"
|
||||||
Name="VCCLCompilerTool"
|
>
|
||||||
PreprocessorDefinitions=""
|
</File>
|
||||||
/>
|
<File
|
||||||
</FileConfiguration>
|
RelativePath=".\Instance.cpp"
|
||||||
</File>
|
>
|
||||||
<File
|
</File>
|
||||||
RelativePath=".\PhysicalInstance.cpp"
|
<File
|
||||||
>
|
RelativePath="main.cpp"
|
||||||
</File>
|
>
|
||||||
</Filter>
|
<FileConfiguration
|
||||||
<Filter
|
Name="Release|Win32"
|
||||||
Name="Header Files"
|
>
|
||||||
Filter="h;hpp;hxx;hm;inl"
|
<Tool
|
||||||
>
|
Name="VCCLCompilerTool"
|
||||||
<File
|
PreprocessorDefinitions=""
|
||||||
RelativePath=".\Instance.h"
|
/>
|
||||||
>
|
</FileConfiguration>
|
||||||
</File>
|
<FileConfiguration
|
||||||
<File
|
Name="Debug|Win32"
|
||||||
RelativePath=".\PhysicalInstance.h"
|
>
|
||||||
>
|
<Tool
|
||||||
</File>
|
Name="VCCLCompilerTool"
|
||||||
</Filter>
|
PreprocessorDefinitions=""
|
||||||
<Filter
|
/>
|
||||||
Name="Resource Files"
|
</FileConfiguration>
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
</File>
|
||||||
>
|
<File
|
||||||
</Filter>
|
RelativePath=".\PhysicalInstance.cpp"
|
||||||
</Files>
|
>
|
||||||
<Globals>
|
</File>
|
||||||
</Globals>
|
<File
|
||||||
</VisualStudioProject>
|
RelativePath=".\TextButtonInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\AudioPlayer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\BaseButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ButtonListener.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ImageButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Instance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\PhysicalInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\TextButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\icon1.ico"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
<Global
|
||||||
|
Name="RESOURCE_FILE"
|
||||||
|
Value="Dialogs.rc"
|
||||||
|
/>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
|
|||||||
144
ImageButtonInstance.cpp
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
#include "ImageButtonInstance.h"
|
||||||
|
G3D::TextureRef image = NULL;
|
||||||
|
int openGLID = 0;
|
||||||
|
G3D::TextureRef image_ovr = NULL;
|
||||||
|
int openGLID_ovr = 0;
|
||||||
|
G3D::TextureRef image_dn = NULL;
|
||||||
|
int openGLID_dn = 0;
|
||||||
|
G3D::TextureRef image_ds = NULL;
|
||||||
|
int openGLID_ds = 0;
|
||||||
|
Vector2 size;
|
||||||
|
Vector2 position;
|
||||||
|
ImageButtonInstance::ImageButtonInstance(G3D::TextureRef newImage, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
|
||||||
|
{
|
||||||
|
|
||||||
|
image = newImage;
|
||||||
|
openGLID = image->getOpenGLID();
|
||||||
|
image_ovr = overImage;
|
||||||
|
if(!image_ovr.isNull())
|
||||||
|
openGLID_ovr = image_ovr->getOpenGLID();
|
||||||
|
image_dn = downImage;
|
||||||
|
if(!image_dn.isNull())
|
||||||
|
openGLID_dn = image_dn->getOpenGLID();
|
||||||
|
image_ds = disableImage;
|
||||||
|
if(!image_ds.isNull())
|
||||||
|
openGLID_ds = image_ds->getOpenGLID();
|
||||||
|
Vector2 size = Vector2(0,0);
|
||||||
|
Vector2 position = Vector2(0,0);
|
||||||
|
floatCenter = false;
|
||||||
|
floatBottom = false;
|
||||||
|
floatRight = false;
|
||||||
|
disabled = false;
|
||||||
|
className = "ImageButton";
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageButtonInstance::~ImageButtonInstance(void)
|
||||||
|
{
|
||||||
|
//Delete everything on destruction
|
||||||
|
image.~ReferenceCountedPointer();
|
||||||
|
delete image.getPointer();
|
||||||
|
image_ovr.~ReferenceCountedPointer();
|
||||||
|
delete image_ovr.getPointer();
|
||||||
|
image_ds.~ReferenceCountedPointer();
|
||||||
|
delete image_ds.getPointer();
|
||||||
|
image_dn.~ReferenceCountedPointer();
|
||||||
|
delete image_dn.getPointer();
|
||||||
|
image = NULL;
|
||||||
|
image_ovr = NULL;
|
||||||
|
image_ds = NULL;
|
||||||
|
image_dn = NULL;
|
||||||
|
delete listener;
|
||||||
|
listener = NULL;
|
||||||
|
selected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImageButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd)
|
||||||
|
{
|
||||||
|
Vector2 positionRelative = position;
|
||||||
|
if(floatRight && floatBottom)
|
||||||
|
{
|
||||||
|
positionRelative = Vector2(rd->getWidth() + position.x, rd->getHeight() + position.y);
|
||||||
|
}
|
||||||
|
else if(floatBottom)
|
||||||
|
{
|
||||||
|
positionRelative = Vector2(position.x, rd->getHeight() + position.y);
|
||||||
|
}
|
||||||
|
else if(floatRight)
|
||||||
|
{
|
||||||
|
positionRelative = Vector2(rd->getWidth() + position.x, position.y);
|
||||||
|
}
|
||||||
|
if(mousex >= positionRelative.x && mousey >= positionRelative.y)
|
||||||
|
{
|
||||||
|
if(mousex < positionRelative.x + size.x && mousey < positionRelative.y + size.y)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown)
|
||||||
|
{
|
||||||
|
bool drawDisabledBox = false;
|
||||||
|
Vector2 positionRelative = position;
|
||||||
|
if(floatRight && floatBottom)
|
||||||
|
{
|
||||||
|
positionRelative = Vector2(rd->getWidth() + position.x, rd->getHeight() + position.y);
|
||||||
|
}
|
||||||
|
else if(floatBottom)
|
||||||
|
{
|
||||||
|
positionRelative = Vector2(position.x, rd->getHeight() + position.y);
|
||||||
|
}
|
||||||
|
else if(floatRight)
|
||||||
|
{
|
||||||
|
positionRelative = Vector2(rd->getWidth() + position.x, position.y);
|
||||||
|
}
|
||||||
|
int renderimage = openGLID;
|
||||||
|
if(selected == true && !image_dn.isNull())
|
||||||
|
{
|
||||||
|
renderimage = openGLID_dn;
|
||||||
|
}
|
||||||
|
else if(disabled)
|
||||||
|
{
|
||||||
|
if(!image_ds.isNull())
|
||||||
|
renderimage = openGLID_ds;
|
||||||
|
else
|
||||||
|
drawDisabledBox = true;
|
||||||
|
}
|
||||||
|
else if(mouseInArea(positionRelative.x, positionRelative.y, positionRelative.x + size.x, positionRelative.y + size.y, mousePos.x, mousePos.y))
|
||||||
|
{
|
||||||
|
if(mouseDown && !image_dn.isNull())
|
||||||
|
{
|
||||||
|
renderimage = openGLID_dn;
|
||||||
|
}
|
||||||
|
else if(!image_ovr.isNull())
|
||||||
|
{
|
||||||
|
renderimage = openGLID_ovr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rd->pushState();
|
||||||
|
rd->beforePrimitive();
|
||||||
|
glEnable( GL_TEXTURE_2D );
|
||||||
|
glEnable(GL_BLEND);// you enable blending function
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
glBindTexture( GL_TEXTURE_2D, renderimage);
|
||||||
|
glBegin( GL_QUADS );
|
||||||
|
glTexCoord2d(0.0,0.0);
|
||||||
|
glVertex2f( positionRelative.x, positionRelative.y );
|
||||||
|
glTexCoord2d( 1.0,0.0 );
|
||||||
|
glVertex2f( positionRelative.x + size.x, positionRelative.y );
|
||||||
|
glTexCoord2d( 1.0,1.0 );
|
||||||
|
glVertex2f( positionRelative.x + size.x, positionRelative.y + size.y );
|
||||||
|
glTexCoord2d( 0.0,1.0 );
|
||||||
|
glVertex2f( positionRelative.x, positionRelative.y + size.y );
|
||||||
|
glEnd();
|
||||||
|
glDisable( GL_TEXTURE_2D );
|
||||||
|
rd->afterPrimitive();
|
||||||
|
rd->popState();
|
||||||
|
if(drawDisabledBox)
|
||||||
|
{
|
||||||
|
Draw::box(Box(Vector3(positionRelative.x, positionRelative.y, 0), Vector3(positionRelative.x+size.x, positionRelative.y+size.y, 0)), rd, Color4(0.7F,0.7F,0.7F,0.3F), Color4::clear());
|
||||||
|
}
|
||||||
|
}
|
||||||
24
ImageButtonInstance.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "BaseButtonInstance.h"
|
||||||
|
class ImageButtonInstance : public BaseButtonInstance
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//ImageButtonInstance(G3D::TextureRef);
|
||||||
|
//ImageButtonInstance(G3D::TextureRef,G3D::TextureRef);
|
||||||
|
//ImageButtonInstance(G3D::TextureRef,G3D::TextureRef,G3D::TextureRef);
|
||||||
|
ImageButtonInstance(G3D::TextureRef,G3D::TextureRef,G3D::TextureRef,G3D::TextureRef);
|
||||||
|
~ImageButtonInstance(void);
|
||||||
|
void drawObj(RenderDevice*, Vector2, bool);
|
||||||
|
Vector2 size;
|
||||||
|
Vector2 position;
|
||||||
|
|
||||||
|
G3D::TextureRef image;
|
||||||
|
int openGLID;
|
||||||
|
G3D::TextureRef image_ovr;
|
||||||
|
int openGLID_ovr;
|
||||||
|
G3D::TextureRef image_dn;
|
||||||
|
int openGLID_dn;
|
||||||
|
G3D::TextureRef image_ds;
|
||||||
|
int openGLID_ds;
|
||||||
|
bool mouseInButton(float, float, RenderDevice*);
|
||||||
|
};
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
|
#define WINVER 0x0400
|
||||||
#include <G3DAll.h>
|
#include <G3DAll.h>
|
||||||
#include "Instance.h"
|
#include "Instance.h"
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
Instance* parent;
|
Instance* parent;
|
||||||
static std::string className = "Instance";
|
static std::string className = "DataModel";
|
||||||
|
|
||||||
Instance::Instance(void)
|
Instance::Instance(void)
|
||||||
{
|
{
|
||||||
name = "Default Game Instance";
|
name = "Default Game Instance";
|
||||||
className = "Part";
|
className = "DataModel";
|
||||||
}
|
}
|
||||||
|
|
||||||
Instance::~Instance(void)
|
Instance::~Instance(void)
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
|
#include <G3DAll.h>
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class Instance
|
class Instance
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Instance(void);
|
Instance(void);
|
||||||
~Instance(void);
|
virtual ~Instance(void);
|
||||||
std::string name;
|
std::string name;
|
||||||
Instance* parent; // Another pointer.
|
Instance* parent; // Another pointer.
|
||||||
std::string className;
|
std::string className;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#include <G3DAll.h>
|
|
||||||
#include "PhysicalInstance.h"
|
#include "PhysicalInstance.h"
|
||||||
|
|
||||||
bool canCollide = true;
|
bool canCollide = true;
|
||||||
@@ -7,6 +6,7 @@ Vector3 size;
|
|||||||
Vector3 position;
|
Vector3 position;
|
||||||
Vector3 velocity;
|
Vector3 velocity;
|
||||||
Vector3 rotVelocity;
|
Vector3 rotVelocity;
|
||||||
|
CoordinateFrame cFrame;
|
||||||
Color3 color;
|
Color3 color;
|
||||||
|
|
||||||
PhysicalInstance::PhysicalInstance(void)
|
PhysicalInstance::PhysicalInstance(void)
|
||||||
@@ -17,13 +17,36 @@ PhysicalInstance::PhysicalInstance(void)
|
|||||||
anchored = true;
|
anchored = true;
|
||||||
size = Vector3(2,1,4);
|
size = Vector3(2,1,4);
|
||||||
position = Vector3(0,0,0);
|
position = Vector3(0,0,0);
|
||||||
|
cFrame = CoordinateFrame(position);
|
||||||
color = Color3::gray();
|
color = Color3::gray();
|
||||||
velocity = Vector3(0,0,0);
|
velocity = Vector3(0,0,0);
|
||||||
rotVelocity = Vector3(0,0,0);
|
rotVelocity = Vector3(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 PhysicalInstance::getPosition()
|
||||||
|
{
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
void PhysicalInstance::setPosition(Vector3 pos)
|
||||||
|
{
|
||||||
|
position = pos;
|
||||||
|
cFrame = CoordinateFrame(pos);
|
||||||
|
}
|
||||||
|
CoordinateFrame PhysicalInstance::getCFrame()
|
||||||
|
{
|
||||||
|
return cFrame;
|
||||||
|
}
|
||||||
|
void PhysicalInstance::setCFrame(CoordinateFrame coordinateFrame)
|
||||||
|
{
|
||||||
|
cFrame = coordinateFrame;
|
||||||
|
position = coordinateFrame.translation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PhysicalInstance::~PhysicalInstance(void)
|
PhysicalInstance::~PhysicalInstance(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,14 @@ public:
|
|||||||
PhysicalInstance(void);
|
PhysicalInstance(void);
|
||||||
~PhysicalInstance(void);
|
~PhysicalInstance(void);
|
||||||
Vector3 size;
|
Vector3 size;
|
||||||
Vector3 position;
|
|
||||||
Vector3 velocity;
|
Vector3 velocity;
|
||||||
Vector3 rotvelocity;
|
Vector3 rotvelocity;
|
||||||
|
CoordinateFrame cFrame;
|
||||||
Color3 color;
|
Color3 color;
|
||||||
|
Vector3 getPosition();
|
||||||
|
void setPosition(Vector3);
|
||||||
|
CoordinateFrame getCFrame();
|
||||||
|
void setCFrame(CoordinateFrame);
|
||||||
|
private:
|
||||||
|
Vector3 position;
|
||||||
};
|
};
|
||||||
|
|||||||
121
TextButtonInstance.cpp
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
#include "TextButtonInstance.h"
|
||||||
|
Vector2 boxBegin;
|
||||||
|
Vector2 boxEnd;
|
||||||
|
Vector2 fontLocationRelativeTo;
|
||||||
|
Color4 textColor;
|
||||||
|
Color4 textOutlineColor;
|
||||||
|
Color4 boxColor;
|
||||||
|
Color4 boxOutlineColor;
|
||||||
|
Color4 textColorOvr;
|
||||||
|
Color4 textOutlineColorOvr;
|
||||||
|
Color4 boxColorOvr;
|
||||||
|
Color4 boxOutlineColorOvr;
|
||||||
|
Color4 textColorDn;
|
||||||
|
Color4 textOutlineColorDn;
|
||||||
|
Color4 boxColorDn;
|
||||||
|
Color4 boxOutlineColorDn;
|
||||||
|
bool centeredWithinBox;
|
||||||
|
std::string title;
|
||||||
|
G3D::GFontRef* font;
|
||||||
|
int textSize;
|
||||||
|
|
||||||
|
bool visible;
|
||||||
|
|
||||||
|
TextButtonInstance::TextButtonInstance(void)
|
||||||
|
{
|
||||||
|
boxBegin = Vector2(0,0);
|
||||||
|
boxEnd = Vector2(0,0);
|
||||||
|
fontLocationRelativeTo = Vector2(0,0);
|
||||||
|
centeredWithinBox = false;
|
||||||
|
title = "TextBox";
|
||||||
|
textColor = Color4(1, 1, 1, 1);
|
||||||
|
textOutlineColor = Color4(0, 0, 0, 0);
|
||||||
|
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||||
|
boxOutlineColor = Color4(0, 0, 0, 0);
|
||||||
|
setAllColorsSame();
|
||||||
|
textSize = 12;
|
||||||
|
floatBottom = false;
|
||||||
|
floatRight = false;
|
||||||
|
floatCenter = false;
|
||||||
|
visible = true;
|
||||||
|
className = "TextButton";
|
||||||
|
disabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TextButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd)
|
||||||
|
{
|
||||||
|
Vector3 point1;
|
||||||
|
Vector3 point2;
|
||||||
|
if(floatBottom)
|
||||||
|
{
|
||||||
|
point1 = Vector3(boxBegin.x, rd->getHeight() + boxBegin.y,0);
|
||||||
|
point2 = Vector3(boxEnd.x, rd->getHeight() + boxEnd.y,0);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
point1 = Vector3(boxBegin.x, boxBegin.y,0);
|
||||||
|
point2 = Vector3(boxEnd.x, boxEnd.y,0);
|
||||||
|
}
|
||||||
|
if(mousex >= point1.x && mousey >= point1.y)
|
||||||
|
{
|
||||||
|
if(mousex < point2.x && mousey < point2.y)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextButtonInstance::setAllColorsSame()
|
||||||
|
{
|
||||||
|
textColorOvr = textColor;
|
||||||
|
textOutlineColorOvr = textOutlineColor;
|
||||||
|
boxColorOvr = boxColor;
|
||||||
|
boxOutlineColorOvr = boxOutlineColor;
|
||||||
|
textColorDn = textColor;
|
||||||
|
textOutlineColorDn = textOutlineColor;
|
||||||
|
boxColorDn = boxColor;
|
||||||
|
boxOutlineColorDn = boxOutlineColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
TextButtonInstance::~TextButtonInstance(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown)
|
||||||
|
{
|
||||||
|
Vector3 point1;
|
||||||
|
Vector3 point2;
|
||||||
|
if(floatBottom)
|
||||||
|
{
|
||||||
|
point1 = Vector3(boxBegin.x, rd->getHeight() + boxBegin.y,0);
|
||||||
|
point2 = Vector3(boxEnd.x, rd->getHeight() + boxEnd.y,0);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
point1 = Vector3(boxBegin.x, boxBegin.y,0);
|
||||||
|
point2 = Vector3(boxEnd.x, boxEnd.y,0);
|
||||||
|
}
|
||||||
|
Vector2 RelativeTo = Vector2(point1.x + fontLocationRelativeTo.x, point1.y + fontLocationRelativeTo.y);
|
||||||
|
if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y) && mouseDown)
|
||||||
|
{
|
||||||
|
Draw::box(Box(point1, point2), rd, boxColorDn, boxOutlineColorDn);
|
||||||
|
font->draw2D(rd, title, RelativeTo, textSize, textColorDn, textOutlineColorDn);
|
||||||
|
}
|
||||||
|
else if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y))
|
||||||
|
{
|
||||||
|
Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr);
|
||||||
|
font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Draw::box(Box(point1, point2), rd, boxColor, boxOutlineColor);
|
||||||
|
font->draw2D(rd, title, RelativeTo, textSize, textColor, textOutlineColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void doNullCheck()
|
||||||
|
{
|
||||||
|
}
|
||||||
31
TextButtonInstance.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "BaseButtonInstance.h"
|
||||||
|
class TextButtonInstance : public BaseButtonInstance
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TextButtonInstance(void);
|
||||||
|
~TextButtonInstance(void);
|
||||||
|
void setAllColorsSame();
|
||||||
|
Vector2 boxBegin;
|
||||||
|
Vector2 boxEnd;
|
||||||
|
Vector2 fontLocationRelativeTo;
|
||||||
|
Color4 textColor;
|
||||||
|
Color4 textOutlineColor;
|
||||||
|
Color4 boxColor;
|
||||||
|
Color4 boxOutlineColor;
|
||||||
|
Color4 textColorOvr;
|
||||||
|
Color4 textOutlineColorOvr;
|
||||||
|
Color4 boxColorOvr;
|
||||||
|
Color4 boxOutlineColorOvr;
|
||||||
|
Color4 textColorDn;
|
||||||
|
Color4 textOutlineColorDn;
|
||||||
|
Color4 boxColorDn;
|
||||||
|
Color4 boxOutlineColorDn;
|
||||||
|
bool centeredWithinBox;
|
||||||
|
std::string title;
|
||||||
|
G3D::GFontRef font;
|
||||||
|
bool visible;
|
||||||
|
int textSize;
|
||||||
|
void drawObj(RenderDevice*, Vector2, bool);
|
||||||
|
bool mouseInButton(float, float, RenderDevice*);
|
||||||
|
};
|
||||||
BIN
content/cursor.png
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
content/cursor2.png
Normal file
|
After Width: | Height: | Size: 637 B |
BIN
content/images/CameraZoomIn.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
content/images/CameraZoomIn_dn.png
Normal file
|
After Width: | Height: | Size: 955 B |
BIN
content/images/CameraZoomIn_ovr.png
Normal file
|
After Width: | Height: | Size: 971 B |
BIN
content/images/CameraZoomOut.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
content/images/CameraZoomOut_dn.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
content/images/CameraZoomOut_ovr.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |