This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<UsingTask TaskName="BuildContent" AssemblyName="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553" /> | |
<PropertyGroup> | |
<XnaInstall>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86</XnaInstall> | |
</PropertyGroup> | |
<ItemGroup> | |
<PipelineAssembly Include="$(XnaInstall)\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll" /> | |
<PipelineAssembly Include="$(XnaInstall)\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<!-- The server uses SlimMath while the client and the editor use the XNA Framework. --> | |
<Choose> | |
<When Condition=" '$(SolutionName)' == 'TinkerWorX.Legeria.Server' "> | |
<ItemGroup> | |
<Reference Include="SlimMath"> | |
<HintPath>..\Assemblies\SlimMath.dll</HintPath> | |
</Reference> | |
</ItemGroup> | |
</When> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// This is a box realm, which is a realm with a width and height. | |
/// </summary> | |
public abstract class BoxRealm : Realm | |
{ | |
public Int32 Width { get; protected set; } | |
public Int32 Height { get; protected set; } | |
protected BoxRealm(Int32 width, Int32 height) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TinkerWorX.Legeria | |
{ | |
/// <summary> | |
/// A simple Point struct that generates collision free hash codes. | |
/// </summary> | |
public struct HashPoint | |
{ | |
public Int16 X; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NetworkMessageData(0x0005, NetworkMessageTransport.TCP)] | |
public class NetworkMessageRealmSector : INetworkMessage | |
{ | |
public SectorPoint SectorPoint; | |
public Tile[,] Tiles; | |
public void Write(BinaryWriter writer) | |
{ | |
if (this.Tiles == null) throw new Exception("this.Tiles must be initialized with Tile data."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div align="center"> | |
<form id='login' action="login.xna" method='get' accept-charset='UTF-8' style="width:300px;"> | |
<fieldset> | |
<legend>Login</legend> | |
<label for='username'>Username:</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JCPM_MWX.Awesomium.Xna | |
{ | |
public class AwesomiumComponent : DrawableGameComponent | |
{ | |
private delegate Int32 ProcessMessagesDelegate(Int32 code, Int32 wParam, ref Message lParam); | |
private static class User32 | |
{ | |
[DllImport("user32.dll", SetLastError = true)] | |
internal static extern IntPtr SetWindowsHookEx(Int32 windowsHookId, ProcessMessagesDelegate function, IntPtr mod, Int32 threadId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
private void RenderTiles(GameTime gameTime) | |
{ | |
// Calculate which tiles to draw | |
var startX = (Int32)Math.Floor((Single)this.renderArea.Left / TileWorX.TILE_PIXEL_SIZE) - 1; | |
var endX = (Int32)Math.Ceiling((Single)this.renderArea.Right / TileWorX.TILE_PIXEL_SIZE) + 1; | |
var startY = (Int32)Math.Floor((Single)this.renderArea.Top / TileWorX.TILE_PIXEL_SIZE) - 1; | |
var endY = (Int32)Math.Ceiling((Single)this.renderArea.Bottom / TileWorX.TILE_PIXEL_SIZE) + 1; | |
var changeX = startX - this.lastStartX; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function update() { | |
var npc_speed = 3; //seconds it takes to go from one tile to the next | |
var npc_pos = 0; //position in array | |
var secs2 = 0; //seconds past since "starting walk" | |
var pos = 0; //position in the pdata[i][1] | |
for (var i in pdata) { //pdata array containing path tile sequence | |
var path_data = pdata[i]; | |
var path = path_data[1]; | |
var lastWalk = path_data[2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// c++ | |
#define FNV_32_PRIME ((unsigned int)0x01000193) | |
#define FNV_32_INIT ((unsigned int )2166136261) | |
#define FNV_MASK_8 (((unsigned int)1<<8)-1) | |
uint fnv_32_a_buf(void* buf, uint len) | |
{ | |
uint hval = (uint)FNV_32_INIT; | |
byte* bp = (byte*)buf; |
OlderNewer