All pastes #424099 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-04-04 16:02 UTC
rendered paste body
Csprite_b.h--------------------------------------------------------------------------------------------------#include "definitions.h"class sprite_b {public:	LPD3DXSPRITE sprite;	LPDIRECT3DTEXTURE9 pTexture;	RECT posit;	void CreateSprite(LPDIRECT3DDEVICE9 g_pd3dDevice);	void TextureIt(LPCWSTR path,LPDIRECT3DDEVICE9 g_pd3dDevice);	void DrawIt();};Csprite_b.cpp--------------------------------------------------------------------------------------------------#include "stdafx.h"#include "Csprite_b.h"void sprite_b::CreateSprite(LPDIRECT3DDEVICE9 g_pd3dDevice) {	D3DXCreateSprite(g_pd3dDevice,&sprite);}void sprite_b::TextureIt(LPCWSTR path,LPDIRECT3DDEVICE9 g_pd3dDevice) {	D3DXCreateTextureFromFile(g_pd3dDevice,L"C:\\woodfloor2.bmp", &pTexture ); //temp}void sprite_b::DrawIt() {	posit.left=64;  //temp	posit.right=0;  //temp	posit.top=64;   //temp	posit.bottom=0; //temp	sprite->Begin(D3DXSPRITE_ALPHABLEND);	sprite->Draw(pTexture,&posit,NULL,NULL,NULL);	sprite->End();}MAIN:--------------------------------------------------------------------------------------------------init() {    buton.CreateSprite(g_pd3dDevice);    buton.TextureIt(L"C:\\woodfloor2.bmp",g_pd3dDevice); //w/e}render() {   buton.DrawIt();}