Sign in to follow this  

Problem compiling Jolt3D on Dev-C++

This topic is 4354 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here is the code:
// Jolt3D_Main.cpp : Defines the entry point for the application.
//
#include "JOLT3D.H"


FONT arial10;
TEXTURE emptytxt;

// Load here all the Jolt3D Resources & Engine too.
void Load_J3D_Resources()
{
jStart_Engine(Engine);

// Load here all the necessary Jolt3D recources like cursors, textures, models etc.
jCreate_Font(&arial10,"Arial",10,false,false,false,false);
}

// Release here all the Jolt3D resources & Engine too.
void Release_J3D_Resources()
{
// Release here all the loaded Jolt3D recources like cursors, textures, models etc.
jRelease_Font(&arial10);

jRelease_Engine();
}

// Write here all the things that needs ONE time initialization and ISNT part of Jolt3D!
// internal loading & releasing!
// (like starting variables values for example)
void One_Time_Initialization()
{
}

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
// TODO: Place code here.

// Window Stuff
Engine.hInstance=hInstance;
strcpy(Engine.Title,"Jolt3D!");
strcpy(Engine.Icon,"");
Engine.EscapeKey=KB_ESCAPE;
// Desired Resolution
Engine.Res.AppWidth=800;
Engine.Res.AppHeight=600;
Engine.Res.WinWidth=800;
Engine.Res.WinHeight=600;
Engine.Res.Bpp=16;
Engine.Res.Depth=16;
// Refresh Rate: You can set REFRESH_MINIMUM, REFRESH_MAXIMUM or a real number! (if not supported, maximum used)
Engine.Res.RefreshRate=REFRESH_MAXIMUM;
// Hardware
Engine.HAL=true;
Engine.Use_HW_VtxProcess=true;
// Rendering
Engine.Windowed=true;
Engine.VSync=true;
Engine.Antialiasing_Samples=FSAA_NONE;

if (!Load_DLL(""))
  return -1;
Load_J3D_Resources();
One_Time_Initialization();
jRun_Engine();
Release_J3D_Resources();
Free_DLL();
return 0;
}

// Main Rendering! (Dont use it, is exist ONLY to Mirror a current Scene for 'Mirroring')
// Allowable Functions (for good results) is: Render_Mirror_Quad() and Set_View_Port()
// (Of course there is no need to write the 2 functions above if you're NOT using mirrors 
// or viewport changes)
void Render()
{
jClear(CLEAR_TARGET_ZBUFFER,jColor(255,92,92,92));
jBegin_Scene();

Engine.RenderScene();

jEnd_Scene();
jPresent_Scene();
}

// Scene Rendering! (write HERE your 'game' including objects drawing etc.)
void RenderScene()
{
// Start Code //


char text[50];
jFormat(text,"FPS:%.01f",jGet_FPS());
jDraw_Text(&arial10,10,10,text,jColor(255,255,255,255),emptytxt);
// End Code //
}

// WINDOW SYSTEM ////////////////////////////////////////////////////////////////////////////////////
// THE 'BODIES' BELOW IS THE GRAPHICS THAT YOUR SYSTEM WILL USE FOR WINDOW CONTROLS
// IF YOU DONT LIKE THE STANDARD ONES THAT DEFINED, CHANGE THEM

// Write your 'body' source for Windows!
void Windows_Body(int Win,bool Selected,FONT Font,char Title[260],int Tx1,int Ty1,int Tx2,int Ty2,int Bx1,int By1,int Bx2,int By2,int TextX,int TextY)
{
Draw_Classic_Window(Win,Selected,Tx1,Ty1,Tx2,Ty2,Bx1,By1,Bx2,By2,TextX,TextY);
Draw_Standard_Windows(Win,Tx1,Ty1,Tx2,Ty2,Bx1,By1,Bx2,By2,TextX,TextY);
}

// Write your 'body' source for Buttons!
void Buttons_Body(int Button,bool Pressed,FONT Font,char Title[260],int Bx1,int By1,int Bx2,int By2,int TextX,int TextY)
{
Draw_Classic_Button(Button,Pressed,Bx1,By1,Bx2,By2,TextX,TextY);
Draw_Standard_Buttons(Button,Pressed,Bx1,By1,Bx2,By2,TextX,TextY);
}

// Write your 'body' source for CheckBoxes!
void CheckBox_Body(int CheckBox,bool Checked,FONT Font,char Text[260],int Cx1,int Cy1,int Cx2,int Cy2,int TextX,int TextY)
{
Draw_Classic_CheckBox(CheckBox,Checked,Cx1,Cy1,Cx2,Cy2,TextX,TextY);
}

// Write your 'body' source for ScrollBars!
void ScrollBar_Body(int ScrollBar,int Type,int Scx1,int Scy1,int Scx2,int Scy2,int Cbx1,int Cby1,int Cbx2,int Cby2)
{
Draw_Classic_ScrollBar(ScrollBar,Scx1,Scy1,Scx2,Scy2,Cbx1,Cby1,Cbx2,Cby2);
}

// Write your 'body' source for EditBoxes!
void EditBox_Body(int EditBox,bool Edited,FONT Font,char Text[260],int Ex1,int Ey1,int Ex2,int Ey2,int Lx,int Ly1,int Ly2,int TextX,int TextY)
{
Draw_Classic_EditBox(EditBox,Ex1,Ey1,Ex2,Ey2,Lx,Ly1,Ly2,TextX,TextY);
}

// Write your 'body' source for DropDowns!
void DropDown_Body(int DropDown,UINT style,int Selected,bool Dropped,FONT Font,
int Selx1,int Sely1,int Selx2,int Sely2,int Dbx1,int Dby1,int Dbx2,
int Dby2,int Enx1,int Eny1,int Enx2,int Eny2,int TextX,int TextY,
char Title[260],char SelectedEntry[260])
{
Draw_Classic_DropDown(DropDown,style,Selx1,Sely1,Selx2,Sely2,Dbx1,Dby1,Dbx2,Dby2,Enx1,Eny1,Enx2,Eny2,TextX,TextY);
}

// Write your 'body' source for HighLighted Selection of DropDowns!
void HighLight_DropDown(int DropDown,int x1,int y1,int x2,int y2,int TextX,int TextY,FONT *Font,char Text[260])
{
Draw_Classic_HighLight_DropDown(DropDown,x1,y1,x2,y2,TextX,TextY,Text);
}

// Write your 'body' source for GroupBoxes!
void GroupBox_Body(int GroupBox,FONT Font,char Title[260],int Gx1,int Gy1,int Gx2,int Gy2,int TextX,int TextY,int TextWidth)
{
Draw_Classic_GroupBox(GroupBox,Gx1,Gy1,Gx2,Gy2,TextX,TextY,TextWidth);
}

// Write your 'body' source for TextLabels!
void TextLabel_Body(int TextLabel,FONT Font,char Text[512],int TextX,int TextY)
{
TEXTURE empty_txt;
jDraw_Text(&Font,TextX,TextY,Text,jColor(255,0,0,0),empty_txt);
}

// Write your 'body' source for ANY Graphics that will be drawn ABOVE the Window System!
void Draw_Above_Windows()
{
}


// NETWORK MESSAGE HANDLER /////////////////////////////////////////////////////////////////////////////////////////

UINT Network_Message_Handler(UINT MsgID, char Message[256], SOCKET Socket, char IP[16])
{

switch(MsgID)
{

// to SERVER Message: (Register step 1/3) A client just connected to server; accept him or not.
case MSG_CLIENT_CONNECTED_TO_SERVER:	
// Handling tip: this is the time to accept/throw a client; U can read a database
// about registered/not or banned users (account) and handle'em accordingly.
return ACCEPT_CLIENT;  // Accept Client; Send him a greeting message :) before return accept code!
//return DONT_ACCEPT_CLIENT; // Dont accept Clayer; U can send a message to him before return dont-accept code..
break;

// to CLIENT Message: (Register step 2/3) the Client must send his (Name,Password) now!
case MSG_CLIENT_ACCEPTED_BY_SERVER_NEED_INFOS:
//jSend_Client_Info("Velzevoul","4483");
break;

// to SERVER Message: (Register step 3/3) The connection to Server was successfull; Server knows your (Name,Password) now.
// NOTE: This is the last message of player 'registration'; u can create him in your Game's CUSTOM list; Check below:
// U know (Socket,IP) from Messenger; Call 'jGet_Player_Info()' to extract this player; Attach him to your list.
// NOTE2: Your CUSTOM list creation ISNT NEEDED; But in case of game's creation, u may need -other- structures than default one..
// Socket = The sender's Socket
// IP = The sender's IP
case MSG_CLIENT_CREATION_SUCCESS:
//WSPLAYER wsp;
//jGet_Players_Info(&wsp);
break;

// to SERVER Message: A Client removed from server; Destroy him now from your CUSTOM list
// Socket = The sender's Socket
// IP = The sender's IP
case MSG_DESTROY_CLIENT:
break;

// to SERVER/CLIENT Message: A typical message was received.
// NOTE: The sample code below just finds the name of the sender for helping u out.
// Message = The received message
// IP = The sender's IP
case MSG_RECEIVE_MESSAGE:
//char SenderName[100];
//jGet_Player_Name_By_IP(SenderName,IP);
break;
}

return 0;
}

Here are the errors when compiling: ld returned 5 exit status C:\Documents and Settings\Owner\My Documents\Jolt3D\Makefile.win [Build Error] [Jolt3D.exe] Error 1 Any help given would be greatly appreciated! Thanks EDIT: As Dustin pointed out below, please use the source tags! [Edited by - jollyjeffers on January 11, 2006 7:23:15 AM]

Share this post


Link to post
Share on other sites

This topic is 4354 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this