code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231
values | license stringclasses 13
values | size int64 1 2.01M |
|---|---|---|---|---|---|
using System;
using System.Collections.Generic;
using System.Text;
using Cores;
using System.Data;
using System.Data.SqlClient;
namespace DAOLayer
{
public class VeDao
{
private Connection _conn;
public Connection Conn
{
get { return _conn; }
se... | 07hc114 | trunk/RapPhimRollRoyce/DAOLayer/VeDao.cs | C# | gpl2 | 2,082 |
using System;
using System.Collections.Generic;
using System.Text;
using Cores;
using System.Data;
using System.Data.SqlClient;
namespace DAOLayer
{
public class DienVienDao
{
private Connection _conn;
public Connection Conn
{
get { return _conn; }
... | 07hc114 | trunk/RapPhimRollRoyce/DAOLayer/DienVienDao.cs | C# | gpl2 | 2,762 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTi... | 07hc114 | trunk/RapPhimRollRoyce/DAOLayer/Properties/AssemblyInfo.cs | C# | gpl2 | 1,387 |
using System;
using System.Collections.Generic;
using System.Text;
using Cores;
using System.Data;
using System.Data.SqlClient;
namespace DAOLayer
{
public class LichChieuDao
{
private Connection _conn;
public Connection Conn
{
get { return _conn; }
... | 07hc114 | trunk/RapPhimRollRoyce/DAOLayer/LichChieuDao.cs | C# | gpl2 | 1,973 |
using System;
using System.Collections.Generic;
using System.Text;
using Cores;
using System.Security.Cryptography;
using System.Data;
using System.Data.SqlClient;
namespace DAOLayer
{
public class KhachHangDao
{
private Connection _conn;
public Connection Conn
{
... | 07hc114 | trunk/RapPhimRollRoyce/DAOLayer/KhachHangDao.cs | C# | gpl2 | 1,268 |
using System;
using System.Collections.Generic;
using System.Text;
using Cores;
using System.Data;
using System.Data.SqlClient;
namespace DAOLayer
{
public class DatVeDao
{
private Connection _conn;
public Connection Conn
{
get { return _conn; }
... | 07hc114 | trunk/RapPhimRollRoyce/DAOLayer/DatVeDao.cs | C# | gpl2 | 997 |
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;
namespace Cores
{
public class Connection
{
private String _connString;
private SqlConnection _connObj;
public String ConnString
{
... | 07hc114 | trunk/RapPhimRollRoyce/Cores/Connection.cs | C# | gpl2 | 1,374 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class LichChieu
{
private int _MaPhim;
private DateTime _NgayChieu;
private string _ThoiGianBD;
private int _MaRap;
public int MaPhim
{
get { r... | 07hc114 | trunk/RapPhimRollRoyce/Cores/LichChieu.cs | C# | gpl2 | 1,040 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class DatVe
{
private int _MaKH;
private int _MaVe;
public int MaKH
{
get { return _MaKH; }
set { _MaKH = value; }
}
p... | 07hc114 | trunk/RapPhimRollRoyce/Cores/DatVe.cs | C# | gpl2 | 535 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class TaiKhoan
{
private string _UserName;
private string _Password;
private int _MaQuyen;
public string UserName
{
get { return _UserName; }
... | 07hc114 | trunk/RapPhimRollRoyce/Cores/TaiKhoan.cs | C# | gpl2 | 991 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class Phim
{
private string _Ten;
private int _ThoiGian;
private string _NuocSX;
private int _MaTheLoai;
private string _GioiThieu;
private string _N... | 07hc114 | trunk/RapPhimRollRoyce/Cores/Phim.cs | C# | gpl2 | 2,002 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTi... | 07hc114 | trunk/RapPhimRollRoyce/Cores/Properties/AssemblyInfo.cs | C# | gpl2 | 1,381 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class Ve
{
private int _MaLich;
private int _MaDay;
private int _ViTri;
public int MaLich
{
get { return _MaLich; }
set { _MaLich = value... | 07hc114 | trunk/RapPhimRollRoyce/Cores/Ve.cs | C# | gpl2 | 728 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class DienVien
{
private string _HoTen;
private string _LiLich;
private string _HinhMH;
public string HoTen
{
get { return _HoTen; }
set { ... | 07hc114 | trunk/RapPhimRollRoyce/Cores/DienVien.cs | C# | gpl2 | 803 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cores
{
public class KhachHang
{
private int _Ma;
public int Ma
{
get { return _Ma; }
set { _Ma = value; }
}
private string _Ten;
public string... | 07hc114 | trunk/RapPhimRollRoyce/Cores/KhachHang.cs | C# | gpl2 | 1,112 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUSLayer;
using Cores;
using DAOLayer;
... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/XemThongTinDienVien.aspx.cs | C# | gpl2 | 1,268 |
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="XemThongTinDienVien.aspx.cs" Inherits="XemThongTinDienVien" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td class="hea... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/XemThongTinDienVien.aspx | ASP.NET | gpl2 | 2,810 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUSLayer;
public partial class FormXemLic... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/FormXemLichChieu.aspx.cs | C# | gpl2 | 2,754 |
<%@ Application Language="C#" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
}
void Application_End(object sender, EventArgs e)
{
// Code that runs on application shutdown
}
... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/Global.asax | ASP.NET | gpl2 | 1,173 |
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ThongTinFilm.aspx.cs" Inherits="ThongTinFilm" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 476px; height: 147px">
<tr>
... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/ThongTinFilm.aspx | ASP.NET | gpl2 | 4,920 |
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FormHuyVe.aspx.cs" Inherits="FormHuyVe" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table width="100%">
<tr>
<td style="width: 160... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/FormHuyVe.aspx | ASP.NET | gpl2 | 2,908 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/Default.aspx.cs | C# | gpl2 | 406 |
a:link {
color: #C4940F;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:visited {
color: #C4940F;
}
*
{
border: 0;
margin: 0;
}
body
{
background: #000000 url(images/back_all.gif) repeat-x top;
font: 13px Tahoma, Arial, Helvetica, sans-serif;
color: #666666;
}
#main
... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/styles.css | CSS | gpl2 | 3,040 |
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
| 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/Default.aspx | ASP.NET | gpl2 | 261 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUSLayer;
using Cores;
using DAOLayer;
... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/DanhSachDienVien.aspx.cs | C# | gpl2 | 776 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Cores;
using BUSLayer;
public partial... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/MasterPage.master.cs | C# | gpl2 | 1,046 |
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DanhSachDienVien.aspx.cs" Inherits="DanhSachDienVien" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td class="header" c... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/DanhSachDienVien.aspx | ASP.NET | gpl2 | 1,126 |
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FormXemLichChieu.aspx.cs" Inherits="FormXemLichChieu" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript" type="text/javascript">
//... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/FormXemLichChieu.aspx | ASP.NET | gpl2 | 4,419 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUSLayer;
using DAOLayer;
public part... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/ThongTinFilm.aspx.cs | C# | gpl2 | 3,175 |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DAOLayer;
using BUSLayer;
public parti... | 07hc114 | trunk/RapPhimRollRoyce/RapPhimRollRoyce/FormHuyVe.aspx.cs | C# | gpl2 | 2,135 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTi... | 1042037-project | trunk/Source/QuanLyNhaSach/QuanLyNhaSach/Properties/AssemblyInfo.cs | C# | asf20 | 1,476 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace QuanLyNhaSach
{
public partial class Form1 : Form
{
public Form1()
{
Init... | 1042037-project | trunk/Source/QuanLyNhaSach/QuanLyNhaSach/Form1.cs | C# | asf20 | 1,315 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace QuanLyNhaSach
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
... | 1042037-project | trunk/Source/QuanLyNhaSach/QuanLyNhaSach/Program.cs | C# | asf20 | 505 |
#pragma once
#include "Graphics_Lib.h"
#include "HelpfulData.h"
class Line
{
private:
Texture * m_tex;
V2DF m_start;
V2DF m_end;
float m_length;
float m_angle;
int m_numSprites;
RECT m_lastSprite;
int m_spriteHeight;
int m_spriteWidth;
void calculate();
public:
Line();
~Line();
void re... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Line.h | C++ | bsd | 609 |
#include "Enemy.h"
Enemy::Enemy()
{
State = Wander;
}
void Enemy::update()
{
switch(State)
{
case Wander:
break;
case Chase:
break;
case Attack:
break;
case Advanced_Attack:
break;
case Flank:
break;
default:
break;
}
} | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Enemy.cpp | C++ | bsd | 270 |
#pragma once
#include "HelpfulData.h"
#include "Animation.h"
class Skills
{
private:
ClDwn cldwn;
int lvlReq;
int str;
Animation playerAnimation;
public:
void use();
}; | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Skills.h | C++ | bsd | 187 |
#include "Floor.h"
// default constructor
Floor::Floor() {}
// default deconstructor, make sure release is called
Floor::~Floor() { release(); }
// release all data safetly
void Floor::release()
{
}
// setup floor
void Floor::intialize(char * fileName)
{
// setup a default test room
for(int y = 0... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Floor.cpp | C++ | bsd | 1,290 |
#pragma once
#include "Graphics_Lib.h"
#include "HelpfulData.h"
class Tile
{
private:
SpriteSheet m_tex;
FRect m_bounds;
int m_tileType;
public:
V2DF m_position;
Tile();
~Tile();
void initialize(V2DF pos, int tileType);
void release();
void render();
void update(float dT);
FRect getBounds(... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Tile.h | C++ | bsd | 326 |
#include "Input.h"
// Return a reference to the input device
Input::Input()
{
// set devices to null
m_pDInput = 0;
m_pKeyboard = 0;
m_pMouse = 0;
}
Input* Input::getInstance()
{
static Input instance;
return &instance;
}
Input::~Input()
{
release();
}
void Input::initialize(HINSTANCE h... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Input.cpp | C++ | bsd | 3,288 |
#include "World.h"
// default constructor
World::World() {}
// default destructor, make sure release is called
World::~World() { release(); }
// safetly release all data
void World::release()
{
}
// setup the world
void World::initialize()
{
m_currentFloor = 0;
// setup every floor
for(int i = ... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/World.cpp | C++ | bsd | 1,422 |
#pragma once
#include "Entity.h"
#include "v2d.h"
#include "templatevector.h"
extern class Player;
enum ENEMY_TYPE {BASIC_ENEMY, RANGED_ENEMY, STRONG_ENEMY};
class Enemy : public Entity
{
Player * target;
int Attack_force;
TemplateVector<GraphNode*> Math;
GraphNode * node;
bool See_Player;... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Enemy.h | C++ | bsd | 547 |
#pragma once
#include "HelpfulData.h"
#include "Input.h"
#include "Entity.h"
class Player : public Entity
{
private:
//TemplateVector<Item> inventory;
ClDwn invincible;
int level;
int experience;
//Item* activeItem;
float speed;
int score;
/* Input */
Input* pInput;
public:
Player(void)... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Player.h | C++ | bsd | 367 |
#pragma once
#include "HelpfulData.h"
class GraphNode;
// used to easily store connections
struct Connection
{
GraphNode* neighbor;
float cost;
};
class GraphNode
{
public:
// all connections this node has
TemplateVector<Connection> m_neighbors;
// position in world space
V2DF m_position;
pu... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/GraphNode.h | C++ | bsd | 619 |
#include "Sound.h"
void Sound::initialize()
{
////////////////////////////////////////////////////////////////////////////
// Set up FMOD and sounds
///////////////////////////////////////////////////////////////////////////
// create system
FMOD::System_Create(&system);
// get version
system->getVers... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Sound.cpp | C++ | bsd | 1,338 |
#include "HelpfulData.h"
void seedRand()
{
srand(time(NULL));
}
bool colliding(FRect r1, FRect r2)
{
// check veritcal first
if( (r1.top > r2.top && r1.top < r2.bottom)
|| (r1.bottom > r2.top && r1.bottom < r2.bottom) )
{
// check horizantally
if( (r1.left > r2.left && r1.left < r2.right)
... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/HelpfulData.cpp | C++ | bsd | 3,139 |
#include "DX2DEngine.h"
#include "Texture.h"
#include <string.h>
#include <stdlib.h>
// make all pointers zero
DX2DEngine::DX2DEngine()
{
m_pD3DObject = 0;
m_pD3DDevice = 0;
m_pSprite = 0;
m_bVsync = false;
fps = 0;
frameCount = 0;
elapsedTime = 0.0;
}
// make sure the release is called
DX... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/DX2DEngine.cpp | C++ | bsd | 13,041 |
#include "Item.h"
#include "Player.h" | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Item.cpp | C++ | bsd | 38 |
#include "Entity.h"
Entity::Entity()
{
stats.health = 0;
stats.str = 0;
stats.tough = 0;
stats.agil = 0;
stats. weight = 0;
rotation = 0.0f;
dead = false;
}
Entity::~Entity() {}
void Entity::takeDamage(int amount)
{
stats.health -= amount/(amount+stats.tough);
if(stats.health <= 0)
dead... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Entity.cpp | C++ | bsd | 560 |
#pragma once
#include "DX2DEngine.h"
#include "v2d.h"
#include "HelpfulData.h"
enum Texture_Type {BASIC, SHEET, ANIMATION};
// Basic 2D Sprite object
// contains the necessary information to store for a single d3d texture
// ...and draw it to the screen
class Texture
{
protected:
// graphics engine refe... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Texture.h | C++ | bsd | 1,325 |
#include "GameEngine.h"
#include "HelpfulData.h"
GameEngine::GameEngine()
{
}
// Make sure release is called
GameEngine::~GameEngine()
{
release();
}
// set up all game components
void GameEngine::initialize()
{
// get sound engine reference
pSound = Sound::getInstance();
// set camera move s... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/GameEngine.cpp | C++ | bsd | 2,099 |
#pragma once
#include "templatearray.h"
/**
* simple templated vector. Ideal for dynamic lists of primitive types and single pointers.
* @WARNING template with virtual types, or types that will be pointed to at your own risk!
* in those situations, templates of pointers to those types are a much better idea... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/templatevector.h | C++ | bsd | 7,504 |
#include "Animation.h"
// basic constructor
Animation::Animation()
{
m_index = 0;
m_playing = false;
}
// make sure safer release is called
Animation::~Animation() {}
// setup the animation based on the appopriate spritesheet values
void Animation::initialize(LPCWSTR fileName, int count, int numRows,... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Animation.cpp | C++ | bsd | 2,405 |
#pragma once
#include "HelpfulData.h"
#include "Texture.h"
extern class Item;
// used as return type for collision function
// NONE = no collision occured
// MAIN = only the main rect was collided with or only the main rect was checked
// RIGHT, LEFT, TOP, BOT = corresponding side was collided
enum SIDE {NON... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Entity.h | C++ | bsd | 9,118 |
#pragma once
/**
* a simple HashMap data structure, using TemplateVectors of KeyValuePairs as
* buckets. The hash size is DEFAULT_BUCKET_SIZE, or 32. The hashFunction
* values between 0 and 31 by bitshifting and masking
*/
template <class KEY, class VALUE>
class TemplateHashMap
{
struct KeyValuePair
... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/templatehashmap.h | C++ | bsd | 1,781 |
#pragma once
#include <math.h>
// drawing and math methods that require the libraries above
#define V2D_SIN sin
#define V2D_COS cos
// modify this if changing V2D's data types
#define V2D_GLVERTEX_METHOD glVertex2fv
// PI defined to reduce dependency on other math libraries
#define V2D_PI (3.141592653... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/v2d.h | C++ | bsd | 16,091 |
#include "Graph.h"
// default constructor
Graph::Graph() {}
// default destructor
// :make sure safer release is called
Graph::~Graph() { release(); }
// safetly release all data
void Graph::release()
{
// release the adjacency matrix
for(int i = 0; i < m_size; ++i)
{
delete [] m_AdjacencyMatrix[... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Graph.cpp | C++ | bsd | 3,908 |
#pragma once
#include "Texture.h"
#include "Animation.h"
#include "HelpfulData.h"
#include "Entity.h"
enum WeaponType { FISTS, MANUAL, BAT, AIRPLANE, STAPLEGUN, SPRAY, NAILGUN } ;
class Item
{
private:
enum Type {CURRENCY, WEAPON, MISC, AMMO};
Type itemType ;
int amount ;
public:
Item( ) {}
/... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Item.h | C++ | bsd | 1,370 |
#include "Tile.h"
// default constructor
Tile::Tile() {}
// default destructor make sure release is called
Tile::~Tile() { release(); }
// safetly release all data
void Tile::release()
{
m_tex.release();
}
// setup tile of given type
void Tile::initialize(V2DF pos, int tileType)
{
// load texture... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Tile.cpp | C++ | bsd | 1,043 |
#pragma once
/** ideal when the size is known at creation time */
template<typename DATA_TYPE>
class TemplateArray
{
protected:
/** pointer to the allocated data for the vector */
DATA_TYPE * m_data;
/** actual number of allocated elements that we can use */
int m_allocated;
public:
/** @return valu... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/templatearray.h | C++ | bsd | 6,548 |
#pragma once
#include "Sound.h"
#include "Input.h"
#include "Graphics_Lib.h"
#include "Entity.h"
#include "Player.h"
#include "World.h"
enum G_State {MENU, CLASS, GAME, DEAD, VICTORY};
// contains all game components
class GameEngine
{
private:
bool running;
G_State m_state;
// audio
Sound* pSo... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/GameEngine.h | C++ | bsd | 720 |
//
// This header file is full of usual unversal functions, structs, classes and other includes
//
#pragma once
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <Windows.h>
#include "templatearray.h"
#include "templatevector.h"
#include "v2d.h"
#include <stdio.h>
//#include <vld.h>
#inclu... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/HelpfulData.h | C++ | bsd | 1,911 |
#pragma once
#include "SpriteSheet.h"
#include "HelpfulData.h"
class Animation : public SpriteSheet
{
private:
ClDwn m_frameSwitch;
bool m_playing;
bool m_loop;
public:
Animation();
~Animation();
void initialize(LPCWSTR fileName, int count, int numRows, int numColumns, int spriteWidth, int spriteHei... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Animation.h | C++ | bsd | 539 |
#include "Texture.h"
// default constructor setting initial values to 0
Texture::Texture()
{
// set view rect to default
m_viewRect.right = m_viewRect.left = m_viewRect.bottom = m_viewRect.top = -1;
// set pointers to null
engine = 0;
}
// make sure that safe release is called
Texture::~Texture()
{
... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Texture.cpp | C++ | bsd | 3,021 |
#pragma once
//////////////////////////////////////////////////////////////////////////
// FMOD
//////////////////////////////////////////////////////////////////////////
#include <fmod.h>
#include <fmod.hpp>
#pragma comment(lib, "Fmodex_vc.lib")
#define HIT 0
#define PRESS 1
#define FIRE 2
class Sound
{... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Sound.h | C++ | bsd | 705 |
#include "SpriteSheet.h"
SpriteSheet::SpriteSheet() {}
// make sure safer release is called
SpriteSheet::~SpriteSheet() { release(); }
// safetly release all data
void SpriteSheet::release()
{
m_rects.release();
}
// setup the texture and rects for the sprite sheet
// numColumns : number of columns i... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/SpriteSheet.cpp | C++ | bsd | 4,094 |
#pragma once
#include "Player.h"
Player::Player() {
tex.initialize(L"\images\test.png",true);
stats.str = 0;
stats.health = 0;
stats.tough = 0;
stats.agil = 0;
stats.weight = 0;
orientation = NORTH;
speed = 300.0f;
pInput = Input::getInstance();
}
Player::~Player() {
pInput->release();
}
... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Player.cpp | C++ | bsd | 972 |
#pragma once
#include "Graphics_Lib.h"
#include "HelpfulData.h"
#include "Floor.h"
extern class Entity;
extern class GraphNode;
#define NUM_FLOORS 10
class World
{
private:
Floor m_floors[NUM_FLOORS];
int m_currentFloor;
public:
World();
~World();
void release();
void initialize();
void se... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/World.h | C++ | bsd | 953 |
#pragma once
// Direct Input includes
#include <dinput.h>
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
#include "v2d.h"
// This class handles input for the entire game and is a singleton for ease of use
class Input
{
private:
HWND m_hWnd;
IDirectInput8 * m_pDInput; // Direct ... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Input.h | C++ | bsd | 890 |
#pragma once
#include "HelpfulData.h"
#include "GraphNode.h"
#include "Texture.h"
class Graph
{
private:
// the number of nodes in the graph
int m_size;
// relation ship of nodes in the graph
bool **m_AdjacencyMatrix;
// all nodes in the graph
TemplateVector<GraphNode*> m_nodes;
// texture used fo... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Graph.h | C++ | bsd | 742 |
#pragma once
#include "DX2DEngine.h"
#include "HelpfulData.h"
enum Orientation {TOP_LEFT,TOP_RIGHT,CENTER,BOT_RIGHT,BOT_LEFT,TOP_CENTER,BOT_CENTER};
class Message_Box
{
private:
char * m_message;
int m_length;
V2DF m_pos;
int m_width;
int m_height;
Orientation m_drawPoint;
Orientation m_textPoin... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/MessageBox.h | C++ | bsd | 1,056 |
#pragma once
// all DirectX 2D classes
#include "DX2DEngine.h"
#include "Texture.h"
#include "SpriteSheet.h"
#include "Animation.h"
#include "Line.h"
#include "MessageBox.h" | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Graphics_Lib.h | C | bsd | 182 |
#include "GraphNode.h"
GraphNode::GraphNode() {}
// make sure the safer release is called
GraphNode::~GraphNode() {release();}
void GraphNode::release()
{
m_neighbors.release();
}
// setup node at given position
void GraphNode::initialize(V2DF a_pos)
{
totalNeighbors = 0;
m_position = a_pos;
}
... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/GraphNode.cpp | C++ | bsd | 1,063 |
#include "MessageBox.h"
// set data to defaults
Message_Box::Message_Box()
{
m_message = 0;
m_length = 0;
}
// make sure safer release is called
Message_Box::~Message_Box() { release(); }
// safetly release all data
void Message_Box::release()
{
if(m_message)
{
delete [] m_message;
m_messa... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/MessageBox.cpp | C++ | bsd | 3,052 |
#pragma once
#include "Texture.h"
class SpriteSheet : public Texture
{
protected:
TemplateVector<RECT> m_rects;
int m_index;
int m_rows;
int m_columns;
public:
SpriteSheet();
~SpriteSheet();
void release();
void initialize(LPCWSTR fileName, int count, int numRows, int numColumns, int spriteWidth,... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/SpriteSheet.h | C++ | bsd | 771 |
#pragma once
///////////////////////////////////////////////////////////////////////////
// General Windows includes
///////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#pragma comment(lib, "winmm.lib")
////////////////////////////////////////////////////////////////////... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/DX2DEngine.h | C++ | bsd | 3,328 |
#include "Line.h"
// make sure pointer is 0
Line::Line() { m_tex = 0; }
// make sure safe release is called
Line::~Line() { release(); }
// safetly release all stored data
void Line::release()
{
}
// setup texture and start and end points
void Line::initialize(Texture * a_tex, V2DF start, V2DF end)
{... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Line.cpp | C++ | bsd | 3,971 |
#pragma once
#include "Tile.h"
#include "Entity.h"
#include "Graph.h"
#define FLOORSIZE 30
class Floor
{
private:
Tile m_layout[FLOORSIZE][FLOORSIZE];
bool m_cleared;
bool m_visited;
public:
Floor();
~Floor();
void release();
void intialize(char * fileName);
void update(float dT);
void ren... | 011913-gdg-incorpserated | trunk/Incorpserated/Incorpserated/Floor.h | C++ | bsd | 540 |
#region Header
/**
* IJsonWrapper.cs
* Interface that represents a type capable of handling all kinds of JSON
* data. This is mainly used when mapping objects through JsonMapper, and
* it's implemented by JsonData.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING ... | 13159828-litjsonmd | IJsonWrapper.cs | C# | gpl3 | 1,407 |
#region Header
/**
* JsonReader.cs
* Stream-like access to JSON text.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace... | 13159828-litjsonmd | JsonReader.cs | C# | gpl3 | 14,303 |
#region Header
/**
* JsonMapper.cs
* JSON to .Net object and object to JSON conversions.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
using System;
using System.Collections;
using System.Collection... | 13159828-litjsonmd | JsonMapper.cs | C# | gpl3 | 32,111 |
#region Header
/**
* JsonWriter.cs
* Stream-like facility to output JSON text.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
using System;
using System.Collections.Generic;
using System.Globalizatio... | 13159828-litjsonmd | JsonWriter.cs | C# | gpl3 | 12,184 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("LitJSON")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[... | 13159828-litjsonmd | Properties/AssemblyInfo.cs | C# | gpl3 | 1,364 |
#region Header
/**
* Lexer.cs
* JSON lexer implementation based on a finite state machine.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using Sys... | 13159828-litjsonmd | Lexer.cs | C# | gpl3 | 25,621 |
#region Header
/**
* JsonData.cs
* Generic type to hold JSON data (objects, arrays, and so on). This is
* the default type returned by JsonMapper.ToObject().
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
usin... | 13159828-litjsonmd | JsonData.cs | C# | gpl3 | 28,517 |
#region Header
/**
* JsonException.cs
* Base class throwed by LitJSON when a parsing error occurs.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
using System;
namespace LitJson
{
public class JsonException... | 13159828-litjsonmd | JsonException.cs | C# | gpl3 | 1,487 |
#region Header
/**
* ParserToken.cs
* Internal representation of the tokens used by the lexer and the parser.
*
* The authors disclaim copyright to this source code. For more details, see
* the COPYING file included with this distribution.
**/
#endregion
namespace LitJson
{
internal enum ParserToken
{... | 13159828-litjsonmd | ParserToken.cs | C# | gpl3 | 781 |
package b_Money;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class AccountTest {
Currency SEK, DKK;
Bank Nordea;
Bank DanskeBank;
Bank SweBank;
Account testAccount;
@Before
public void setUp() throws Exception {
SEK = new Currency("SEK", 0.15);
SweBank = new B... | 123-taimur | trunk/b_Money_1/AccountTest.java | Java | gpl3 | 876 |
package b_Money;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class CurrencyTest {
Currency SEK, DKK, NOK, EUR;
@Before
public void setUp() throws Exception {
/* Setup currencies with exchange rates */
SEK = new Currency("SEK", 0.15);
DKK = new Currency("DKK", 0... | 123-taimur | trunk/b_Money_1/CurrencyTest.java | Java | gpl3 | 746 |
package b_Money;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class MoneyTest {
Currency SEK, DKK, NOK, EUR;
Money SEK100, EUR10, SEK200, EUR20, SEK0, EUR0, SEKn100;
@Before
public void setUp() throws Exception {
SEK = new Currency("SEK", 0.15);
DKK = new Currenc... | 123-taimur | trunk/b_Money_1/MoneyTest.java | Java | gpl3 | 1,326 |
package b_Money;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class BankTest {
Currency SEK, DKK;
Bank SweBank, Nordea, DanskeBank;
@Before
public void setUp() throws Exception {
DKK = new Currency("DKK", 0.20);
SEK = new Currency("SEK", 0.15);
SweBank = new Ba... | 123-taimur | trunk/b_Money_1/BankTest.java | Java | gpl3 | 1,391 |
package b_Money;
public class Currency {
private String name;
private Double rate;
/**
* New Currency
* The rate argument of each currency indicates that Currency's "universal" exchange rate.
* Imagine that we define the rate of each currency in relation to some universal currency.
* This means that the r... | 123-taimur | trunk/b_Money/Currency.java | Java | gpl3 | 1,532 |
package b_Money;
import java.util.Hashtable;
public class Account {
private Money content;
private Hashtable<String, TimedPayment> timedpayments = new Hashtable<String, TimedPayment>();
Account(String name, Currency currency) {
this.content = new Money(0, currency);
}
/**
* Add a timed payment
* @param i... | 123-taimur | trunk/b_Money/Account.java | Java | gpl3 | 2,811 |
package b_Money;
public class Money implements Comparable {
private int amount;
private Currency currency;
/**
* New Money
* @param amount The amount of money
* @param currency The currency of the money
*/
Money (Integer amount, Currency currency) {
this.amount = amount;
this.currency = currency;
}
... | 123-taimur | trunk/b_Money/Money.java | Java | gpl3 | 3,160 |
package b_Money;
public class AccountDoesNotExistException extends Exception {
static final long serialVersionUID = 1L;
}
| 123-taimur | trunk/b_Money/AccountDoesNotExistException.java | Java | gpl3 | 125 |
package b_Money;
import java.util.Hashtable;
public class Bank {
private Hashtable<String, Account> accountlist = new Hashtable<String, Account>();
private String name;
private Currency currency;
/**
* New Bank
* @param name Name of this bank
* @param currency Base currency of this bank (If this is a Swed... | 123-taimur | trunk/b_Money/Bank.java | Java | gpl3 | 4,814 |
package b_Money;
public class AccountExistsException extends Exception {
static final long serialVersionUID = 1L;
}
| 123-taimur | trunk/b_Money/AccountExistsException.java | Java | gpl3 | 119 |
addpath([pwd,"/lib"]);
addpath([pwd,"/src"]);
load("rec.dat");
load("tstl.dat");
stats=[rec, tstl];
scores=[];
startTime = cputime;
confidenceLevel=0.44;
errors=[];
credibilityMatrix=[];
for(trial=1:size(rec,1))
trainSet=stats(1:end!=trial,:);
testSet=stats(trial,:);
credibilityMatrix = getPerformanceMatrix(tr... | 12l-rob-lab | trunk/lab7/initHandicapLeaveOneOut.m | MATLAB | gpl3 | 1,217 |
addpath([pwd,"/lib"]);
addpath([pwd,"/src"]);
load("rec.dat");
load("tstl.dat");
stats=[rec, tstl];
scores=[];
iterations = 10;
startTime = cputime;
confidenceLevel=0.44;
for(trial=1:iterations)
[trainSet testSet] = splitSet(stats, 0.5);
credibilityMatrix = getPerformanceMatrix(trainSet);
[testAnswers confide... | 12l-rob-lab | trunk/lab7/initHandicap.m | MATLAB | gpl3 | 1,047 |
function [answers confidence times] = bayesianMeta(results, cms, zeroSubstitute=0.000001)
answers=[];
confidence=[];
times=zeros(1,10);
for(sample=1:size(results,1))
bel=zeros(10,1);
for(i=1:size(bel,1))
if(sum(results(sample,:)==(i-1))==0)
continue;
end;
numerator=NaN;
firstLoopStart=cputim... | 12l-rob-lab | trunk/lab7/src/bayesianMeta.m | MATLAB | gpl3 | 1,726 |
#assumes last column contains labels
function perfMat = getPerformanceMatrix(stats)
classes = unique(stats(:,size(stats,2)));
perfMat= zeros(size(classes,1),size(stats,2)-1);
ansCol = size(stats,2);
for(i=1:size(classes))
digit=classes(i);
for(classifier=1:size(stats,2)-1)
falseNegatives = sum(stats(:... | 12l-rob-lab | trunk/lab7/src/getPerformanceMatrix.m | MATLAB | gpl3 | 837 |