Ola Pessoal Da IMP Games,Venho Trazer essa Source que Testei Mais Não Tive susseso poi errei em algum mais to postado para quem meche melhor do que eu em C++ possa ve oque tem de errado nesses codigos
ItemLoader.h
Código PHP:
#ifndef BRSTeam_H
#define BRSTeam_H
#include <windows.h>
#include <iostream>
#include <stdio.h>
#include <gl/gl.h>
#pragma comment(lib,"OpenGL32.lib")
typedef struct Item
{
char ModelName[64];
char ModelPath[128];
char TextureDir[128];
int Section;
int Id;
}ItemStruct;
extern ItemStruct Items[512];
typedef int(*TLoadSMD) ( ... );
TLoadSMD LoadSMD = (TLoadSMD) 0x005D5D59;
TLoadSMD LoadTEX = (TLoadSMD) 0x006C1222;
#define SKILL 0xC2
#define SWORD 0x342
#define AXE 0x542
#define MACE 0x742
#define SPEAR 0x942
#define BOW 0xB42
#define STAFF 0xD42
#define SHIELD 0xF42
#define HELM 0x1142
#define ARMOR 0x1342
#define PANTS 0x1542
#define GLOVES 0x1742
#define BOOTS 0x1942
#define MISC1 0x1B42
#define MISC2 0x1D42
#define MISC3 0x1F42
#define SCROLL 0x2142
#pragma warning(disable: 4010)
#pragma warning(disable: 4018)
#pragma warning(disable: 4101)
#pragma warning(disable: 4311)
#pragma warning(disable: 4482)
#pragma warning(disable: 4700)
#pragma warning(disable: 4996)
#pragma warning(disable: 4244)
#pragma warning(disable: 4800)
#pragma warning(disable: 4309)
#endif
ItemLoader.cpp
Código PHP:
#include "ItemLoader.h"
int InitItems()
{
strcpy( Items[0].ModelName,"Wing51.smd");
strcpy(Items[0].ModelPath,"Data\\Item\\");
strcpy(Items[0].TextureDir,"Item\\");
Items[0].Section = MISC1;
Items[0].Id = 51;
return 1;
}
int LoadModel(char dir[128],char model[64],char texdir[128],int section,int id)
{
if(model[0] != 0)
{
LoadSMD(section+id,dir,model,"end");
}
if(texdir[0] != 0)
{
LoadTEX(section+id,texdir,0x2901,0x2600,1);
}
return 1;
}
void LoadDMD()
{
for ( int a = 0 ; a < 64 ; a++ )
{
LoadModel ( Items[a].ModelPath , Items[a].ModelName , Items[a].TextureDir , Items[a].Section , Items[a].Id);
}
LoadSMD( MISC1 + 100 , "Data\\Item\\" , "Wing51.smd" , "Wing51.smd" , "Wing51.smd" , "end" );
LoadTEX( MISC1 + 100 , "Item\\" , 0x2901 , 0x2600 , 1);
}
Creditos:
Habit - Source
NighT - Offset e Definições dos Items No Main 1.03K+