Jump to content

Recommended Posts

Posted

I'm using Framewerk but when I call this->frameWerk.Create(); the program crashes when it reaches CreateWorld() in engine.cpp and I'm not sure why it does that, even though my other Leadwerks program works fine. What am I doing wrong?

 

 

Main.cpp

#include "engine.h"
#include "World.h"

int WINAPI WinMain( HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd ) 
{
Initialize();
SetAppTitle( "Test" ) ;
Graphics( 1024, 768 ) ;

World world;

// Game loop
while( !KeyHit() && !AppTerminate() )
{
	if( !AppSuspended() ) // We are not in focus!
	{
		world.Update();
	}
}

// Done
return Terminate() ;
}

 

World.h

#pragma once

#include "engine.h"
#include <vector>
#include <string>
#include <math.h>
#include <fstream>
//#include <windows.h>
using namespace std;

#include "framewerk.h"
using namespace leadwerks;


class World
{

public:

//Framewerk
Framewerk frameWerk;

char *fileName;

World();

void Load(char *fileName);
void Update();
};

 

 

World.cpp

World::World()
{

//Create
this->frameWerk.Create(); //<---- crashes here

fileName = new char[_MAX_PATH];
GetCurrentDirectory(MAX_PATH,fileName);

strcat(fileName,"\\Default.txt");

Load(fileName);

//Collisions


HideMouse(); 
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); 
}

void World::Update()
{
frameWerk.Update();
frameWerk.Render();

//Swap the front and back buffer 
Flip(); 
}

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Posted

You might have missed a "meeting" have you allowed for the changes?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Posted

RegisterAbstractPath()

 

Didn't help. I didn't include RegisterAbstractPath() in my other programs and they work fine and after I included it in my program, the program still crashed.

 

 

 

 

You might have missed a "meeting" have you allowed for the changes?

 

I have not done any updates on my copy of 2.3 since its release.

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Posted
I have not done any updates on my copy of 2.3 since its release.

 

 

None at all? .. M'Kay ... wont be that then.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Posted

Looks like I figured out. I didn't include the shaders file in the project folder and thats why it crashed.

 

Thanks guys!

 

 

Edit: I do wish that the project creator copied over the Lua files and Shader files automatically upon project creation. That would be nice.

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...