mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 03:55:19 -04:00
fix C client not compiling on linux (oops)
This commit is contained in:
parent
4fcd1d9c2b
commit
9869fbfde5
@ -26,13 +26,6 @@ namespace ClassicalSharp.Entities {
|
||||
return degrees;
|
||||
}
|
||||
|
||||
const float NaN = float.NaN;
|
||||
|
||||
/// <summary> Constructs a location update that does not have any position or orientation information. </summary>
|
||||
public static LocationUpdate Empty() {
|
||||
return default(LocationUpdate);
|
||||
}
|
||||
|
||||
/// <summary> Constructs a location update that only consists of orientation information. </summary>
|
||||
public static LocationUpdate MakeOri(float rotY, float headX) {
|
||||
LocationUpdate update = default(LocationUpdate);
|
||||
|
@ -377,7 +377,7 @@ namespace ClassicalSharp.Network.Protocols {
|
||||
|
||||
Entity entity = game.Entities.List[id];
|
||||
if (entity == null) return;
|
||||
LocationUpdate update = LocationUpdate.Empty();
|
||||
LocationUpdate update = default(LocationUpdate);
|
||||
|
||||
switch (type) {
|
||||
case 0:
|
||||
|
@ -32,10 +32,6 @@ Real32 LocationUpdate_Clamp(Real32 degrees) {
|
||||
}
|
||||
|
||||
struct LocationUpdate loc_empty;
|
||||
void LocationUpdate_Empty(struct LocationUpdate* update) {
|
||||
*update = loc_empty;
|
||||
}
|
||||
|
||||
void LocationUpdate_MakeOri(struct LocationUpdate* update, Real32 rotY, Real32 headX) {
|
||||
*update = loc_empty;
|
||||
update->Flags = LOCATIONUPDATE_FLAG_HEADX | LOCATIONUPDATE_FLAG_HEADY;
|
||||
|
@ -49,7 +49,6 @@ struct LocationUpdate {
|
||||
|
||||
/* Clamps the given angle so it lies between [0, 360). */
|
||||
Real32 LocationUpdate_Clamp(Real32 degrees);
|
||||
void LocationUpdate_Empty(struct LocationUpdate* update);
|
||||
void LocationUpdate_MakeOri(struct LocationUpdate* update, Real32 rotY, Real32 headX);
|
||||
void LocationUpdate_MakePos(struct LocationUpdate* update, Vector3 pos, bool rel);
|
||||
void LocationUpdate_MakePosAndOri(struct LocationUpdate* update, Vector3 pos, Real32 rotY, Real32 headX, bool rel);
|
||||
|
@ -48,9 +48,9 @@ static void Platform_InitDisplay(void) {
|
||||
|
||||
/* TODO: Use Xinerama and XRandR for querying these */
|
||||
struct DisplayDevice device = { 0 };
|
||||
device.BoundsWidth = DisplayWidth(display, screen);
|
||||
device.Bounds.Height = DisplayHeight(display, screen);
|
||||
device.BitsPerPixel = DefaultDepth(display, screen);
|
||||
device.Bounds.Width = DisplayWidth(display, screen);
|
||||
device.Bounds.Height = DisplayHeight(display, screen);
|
||||
device.BitsPerPixel = DefaultDepth(display, screen);
|
||||
DisplayDevice_Default = device;
|
||||
|
||||
DisplayDevice_Meta[0] = display;
|
||||
|
@ -1102,7 +1102,7 @@ static void CPE_SetEntityProperty(struct Stream* stream) {
|
||||
|
||||
struct Entity* entity = Entities_List[id];
|
||||
if (!entity) return;
|
||||
struct LocationUpdate update; LocationUpdate_Empty(&update);
|
||||
struct LocationUpdate update = { 0 };
|
||||
|
||||
Real32 scale;
|
||||
switch (type) {
|
||||
|
@ -447,7 +447,7 @@ void Window_GetClipboardText(STRING_TRANSIENT String* value) {
|
||||
if (!hGlobal) { CloseClipboard(); return; }
|
||||
LPVOID src = GlobalLock(hGlobal);
|
||||
|
||||
UInt8 c;
|
||||
UChar c;
|
||||
if (isUnicode) {
|
||||
UInt16* text = (UInt16*)src;
|
||||
for (; *text; text++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user