Removed MFC

This commit is contained in:
andreja6
2018-04-22 12:32:37 -07:00
parent 19913cb665
commit 49c117d5d7
5 changed files with 15 additions and 84 deletions

View File

@@ -274,10 +274,6 @@
RelativePath=".\TextButtonInstance.cpp"
>
</File>
<File
RelativePath=".\Work.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
@@ -303,18 +299,10 @@
RelativePath=".\resource.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
<File
RelativePath=".\TextButtonInstance.h"
>
</File>
<File
RelativePath=".\Work.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"

View File

@@ -1,40 +0,0 @@
// Work.cpp : implementation file
//
#define WINVER 0x0400
#include "stdafx.h"
#include "Work.h"
// Work dialog
IMPLEMENT_DYNAMIC(Work, CDialog)
Work::Work(CWnd* pParent /*=NULL*/)
: CDialog(Work::IDD, pParent)
{
}
Work::~Work()
{
}
void Work::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(Work, CDialog)
ON_BN_CLICKED(IDOK, &Work::OnBnClickedOk)
END_MESSAGE_MAP()
// Work message handlers
void Work::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
this->DestroyWindow();
OnOK();
}

23
Work.h
View File

@@ -1,23 +0,0 @@
#pragma once
#include "resource.h"
// Work dialog
class Work : public CDialog
{
DECLARE_DYNAMIC(Work)
public:
Work(CWnd* pParent = NULL); // standard constructor
virtual ~Work();
// Dialog Data
enum { IDD = IDD_ABOUT_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
};

View File

@@ -10,13 +10,12 @@
@author Morgan McGuire, matrix@graphics3d.com
*/
//Compile for 95 and higher
#define WINVER 0x0400
#include <G3DAll.h>
#include "Instance.h"
#include "PhysicalInstance.h"
#include "TextButtonInstance.h"
#if G3D_VER < 61000
#error Requires G3D 6.10
#endif
@@ -26,8 +25,8 @@ static const std::string VERSION = "PRE-ALPHA ";
static std::vector<Instance*> instances;
static std::vector<Instance*> instances_2D;
static Instance* dataModel;
static GFontRef fntdominant = NULL;
static GFontRef fntlighttrek = NULL;
GFontRef fntdominant = NULL;
GFontRef fntlighttrek = NULL;
static bool democ = true;
static std::string message = "";
static G3D::RealTime messageTime = 0;
@@ -250,6 +249,7 @@ void Demo::onInit() {
initGUI();
PhysicalInstance* test = makePart();
test->parent = dataModel;
test->color = Color3(0.2F,0.3F,1);
@@ -257,6 +257,7 @@ void Demo::onInit() {
test = makePart();
test->parent = dataModel;
test->color = Color3(.5F,1,.5F);
@@ -321,6 +322,7 @@ void Demo::onInit() {
test->color = Color3::gray();
test->size = Vector3(4,1,2);
test->position = Vector3(-2,7,0);
@@ -359,6 +361,12 @@ void Demo::onCleanup() {
go->~Texture();
go_ovr->~Texture();
go_dn->~Texture();
go_dn.~ReferenceCountedPointer();
delete go_dn.pointer();
go.~ReferenceCountedPointer();
delete go.pointer();
go_ovr.~ReferenceCountedPointer();
delete go_ovr.pointer();
app->sky->~Sky();
}
@@ -470,7 +478,7 @@ void Demo::onUserInput(UserInput* ui) {
std::string ExePath() {
char buffer[MAX_PATH];
GetModuleFileNameA( NULL, buffer, MAX_PATH );
GetModuleFileName( NULL, buffer, MAX_PATH );
std::string::size_type pos = std::string( buffer ).find_last_of( "\\/" );
return std::string( buffer ).substr( 0, pos);
}
@@ -704,6 +712,8 @@ App::~App() {
}
int main(int argc, char** argv) {
//_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
//_CrtSetBreakAlloc(1279);
GAppSettings settings;
if(getOSVersion() > 5.0)
settings.window.defaultIconFilename = GetFileInPath("/content/images/rico.png");

View File

@@ -1,4 +0,0 @@
#pragma once
#define _AFXDLL 1
#include <afxwin.h>