mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Fix clouds not moving when using Direct3D 9 build, remove somestuff from todo.txt and replace them with actual TODO comments in source code. Redesigned readme to use markdown and look nicer.
This commit is contained in:
parent
f88405330c
commit
b1ba2c0207
5 changed files with 60 additions and 57 deletions
|
@ -14,6 +14,7 @@ using System.Reflection;
|
|||
|
||||
namespace ClassicalSharp.GraphicsAPI {
|
||||
|
||||
// TODO: Should we use a native form wrapper instead of wrapping over OpenTK?
|
||||
public class DirectXApi : IGraphicsApi {
|
||||
|
||||
public Device device;
|
||||
|
@ -53,7 +54,7 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
caps = device.DeviceCaps;
|
||||
viewStack = new MatrixStack( 32, device, TransformType.View );
|
||||
projStack = new MatrixStack( 4, device, TransformType.Projection );
|
||||
texStack = new MatrixStack( 4, device, TransformType.Texture1 ); // TODO: Texture0?
|
||||
texStack = new MatrixStack( 4, device, TransformType.Texture0 );
|
||||
|
||||
device.SetRenderState( RenderStates.FillMode, (int)FillMode.Solid );
|
||||
FaceCulling = false;
|
||||
|
@ -113,7 +114,7 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
FogMode[] modes = { FogMode.Linear, FogMode.Exp, FogMode.Exp2 };
|
||||
public override void SetFogMode( Fog mode ) {
|
||||
device.SetRenderState( RenderStates.FogTableMode, (int)modes[(int)mode] );
|
||||
}
|
||||
}
|
||||
|
||||
public override bool FaceCulling {
|
||||
set {
|
||||
|
@ -307,12 +308,19 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
public unsafe override void LoadMatrix( ref Matrix4 matrix ) {
|
||||
Matrix4 transposed = matrix;
|
||||
Matrix dxMatrix = *(Matrix*)&transposed;
|
||||
if( curStack == texStack ) {
|
||||
dxMatrix.M31 = dxMatrix.M41; // NOTE: this hack fixes the texture movements.
|
||||
device.SetTextureStageState( 0, TextureStageStates.TextureTransform, (int)TextureTransform.Count2 );
|
||||
}
|
||||
curStack.SetTop( ref dxMatrix );
|
||||
}
|
||||
|
||||
Matrix identity = Matrix.Identity;
|
||||
public override void LoadIdentityMatrix() {
|
||||
curStack.SetTop( ref identity );
|
||||
if( curStack == texStack ) {
|
||||
device.SetTextureStageState( 0, TextureStageStates.TextureTransform, (int)TextureTransform.Disable );
|
||||
}
|
||||
curStack.SetTop( ref identity );
|
||||
}
|
||||
|
||||
public override void PushMatrix() {
|
||||
|
@ -387,15 +395,16 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
unsafe void memcpy( IntPtr sourcePtr, IntPtr destPtr, int bytes ) {
|
||||
byte* src = (byte*)sourcePtr;
|
||||
byte* dst = (byte*)destPtr;
|
||||
// TODO: check memcpy actually works and doesn't explode.
|
||||
int* srcInt = (int*)src;
|
||||
int* dstInt = (int*)dst;
|
||||
|
||||
while( bytes >= 4 ) {
|
||||
*( (int*)dst ) = *( (int*)src );
|
||||
*dstInt++ = *srcInt++;
|
||||
dst += 4;
|
||||
src += 4;
|
||||
bytes -= 4;
|
||||
}
|
||||
// Handle non-aligned last 1-3 bytes.
|
||||
// Handle non-aligned last few bytes.
|
||||
for( int i = 0; i < bytes; i++ ) {
|
||||
*dst++ = *src++;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace ClassicalSharp.Selections {
|
|||
pos = player.Position;
|
||||
if( selections.Count == 0 ) return;
|
||||
// TODO: Proper selection box sorting. But this is very difficult because
|
||||
// we can have boxes within boxes, intersecting boxes, etc..
|
||||
// we can have boxes within boxes, intersecting boxes, etc. Probably not worth it.
|
||||
comparer.pos = pos;
|
||||
selections.Sort( comparer );
|
||||
|
||||
|
|
44
readme.md
Normal file
44
readme.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
ClassicalSharp is a custom Minecraft Classic client written in C# that works on Windows and Linux.
|
||||
**It is not affiliated with (or supported by) Mojang AB, Minecraft, or Microsoft in any way.**
|
||||
|
||||
You can get the latest binaries [here](https://github.com/UnknownShadow200/ClassicalSharp/releases).
|
||||
|
||||
#### What ClassicalSharp is
|
||||
* Works with both minecraft.net and classicube.net accounts.
|
||||
* Lightweight, minimal memory usage compared to the standard client.
|
||||
* Works with effectively all graphics cards that support OpenGL.
|
||||
|
||||
**It does not:**
|
||||
* Work with 'modern/premium' Minecraft servers.
|
||||
* Provide single-player support.
|
||||
|
||||
#### Requirements
|
||||
* Windows: The .NET framework 2.0 or Mono. (Vista and later have .NET framework 2.0 built in)
|
||||
* Linux: Mono.
|
||||
* Mac OS X: Mono. (Not tested at all yet - likely just crashes)
|
||||
|
||||
*When building from source and targeting Mono, you must either use the Mono compiler or
|
||||
define `__MonoCS__` when building, otherwise you will get runtime errors when decompressing the map with Mono.*
|
||||
|
||||
#### Instructions
|
||||
The simple way to use ClassicalSharp is to use the launcher application. You can connect to LAN/locally hosted servers, minecraft.net servers, and classicube.net servers through the launcher.
|
||||
|
||||
Note that the first time you run the launcher, a dialog box will pop up saying: "Some required resources weren't found. Would you like to download them now?" Just click OK.
|
||||
(This is necessary because I cannot legally redistribute the assets of Minecraft Classic with the application)
|
||||
|
||||
*Alternatively, you can pass command line arguments directly to the client. The client expects these arguments to be in the form: `<username> <mppass> <ip> <port> <skin server>`, where skin server is optional.*
|
||||
|
||||
#### Key combinations
|
||||
* Press escape (after joining a world) to switch to the pause menu.
|
||||
* The pause menu lists all of the key combinations used by the client.
|
||||
These key combinations can be reassigned by clicking on a key combination.
|
||||
* Press escape or click "Back to game" to return to the game.
|
||||
|
||||
Some points to note:
|
||||
* If the server has disabled hacks, some of the key combinations such as fly, speed etc will not do anything.
|
||||
* Pressing F6 to change view distance can improve performance by limiting the number of visible chunks.
|
||||
* Pressing F7 to toggle VSync on or off. On minimises CPU usage, whereas off maximises chunk loading speed.
|
||||
|
||||
#### Client commands
|
||||
* To see a list of all built in commands, type `/client commands`.
|
||||
* To see help for a given built in command, type `/client help <command name>`.
|
47
readme.txt
47
readme.txt
|
@ -1,47 +0,0 @@
|
|||
ClassicalSharp is a custom MineCraft Classic client written in C# that works with Windows and Linux.
|
||||
It is not affiliated with (or supported by) Mojang AB, MineCraft, or Microsoft in any way.
|
||||
|
||||
You can get the latest binaries from github.com/UnknownShadow200/ClassicalSharp/releases
|
||||
|
||||
=== What ClassicalSharp is ===
|
||||
* Works with both MineCraft.net and ClassiCube.net
|
||||
* Lightweight, minimal memory usage compared to standard client.
|
||||
* Should work with effectively all graphics cards that support OpenGL.
|
||||
|
||||
It does not:
|
||||
* Work with 'modern/premium' MineCraft servers.
|
||||
* Provide single-player support.
|
||||
|
||||
=== Requirements ===
|
||||
* Windows: The .NET framework 2.0 or Mono. (Vista and later have .NET framework 2.0 built in)
|
||||
* Linux: Mono. (Not completely tested, but does work)
|
||||
* Mac OS X: Mono. (Not tested at all yet - may just crash)
|
||||
|
||||
* When building from source and targeting Mono, you must either use the Mono compiler or
|
||||
define '__MonoCS__' when building, otherwise you will get runtime errors when decompressing the map.
|
||||
|
||||
=== Instructions ===
|
||||
To use ClassicalSharp, you can either
|
||||
A) Use the launcher
|
||||
B) Pass command line arguments directly to classicalsharp.exe
|
||||
|
||||
* Note that the first time you run the launcher, a dialog box will pop up with the message
|
||||
"Some required resources weren't found." Just click OK. (This is because I cannot redistribute
|
||||
the assets of Minecraft Classic with the application as they are the copyrighted property of Mojang)
|
||||
|
||||
The launcher interface should be straightforward. If you are confused about how to use the launcher,
|
||||
please read "launcher instructions.txt"
|
||||
|
||||
=== Key combinations ===
|
||||
Press escape (after joining the first world) to switch to the pause menu.
|
||||
The pause menu lists all of the key combinations used by the client.
|
||||
Key combinations can be reassigned in the pause menu by clicking on a key combination.
|
||||
Press escape or click "Back to game" to return to the game.
|
||||
|
||||
* Note that if the server has disabled hacks, some of the key combinations will have no affect.
|
||||
* Pressing F6 to change view distance can improve performance by limiting the number of visible chunks.
|
||||
* Pressing F7 to toggle VSync on or off. On minimises CPU usage, whereas off maximises chunk loading speed.
|
||||
|
||||
=== Client commands ===
|
||||
ClassicalSharp comes with a number of built in commands. You can see a list of them by typing /client commands,
|
||||
and you can see help for a given command for typing /client help [command name].
|
3
todo.txt
3
todo.txt
|
@ -1,7 +1,4 @@
|
|||
* Texture animations.
|
||||
* Proper SelectionBox sorting.
|
||||
* DirectX API support.
|
||||
* Some of the remaining CPE extensions.
|
||||
* Test that Mojang Accounts work properly.
|
||||
* Fix issues with framerate limiting not working properly on same cards.
|
||||
(will require 'sleeping'of main thread)
|
Loading…
Reference in a new issue