View mousehandler.cpp
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
/////////////////////////////////////////////////////////////////////////// | |
// | |
// MODULE: MOUSINFO.C | |
// | |
// DESCRIPTION: SDK sample for handling the WM_MOUSEWHEEL message and | |
// the TrackMouseEvent() API. | |
// | |
// Applet displays MouseButton, MouseWheel, MouseMovement, and | |
// any mouse messages in the title bar. | |
// |
View memory.cpp
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
#include "memory.h" | |
#if defined(MEM_PLATFORM_WINDOWS) | |
#include <windows.h> | |
mem_cfunc void PrintDebugString(const char* str) { | |
OutputDebugStringA(str); | |
} | |
#ifdef _DEBUG | |
#define MemInternal_Assert(cond) if (!(cond)) {*(u8*)0 = 0;} |
View SimpleSound.cpp
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
#include "SimpleSound.h" | |
#include <windows.h> | |
#include <atomic> | |
#include <dsound.h> | |
#include <iostream> | |
#undef PlaySound | |
#define SIMPLE_SOUND_MAX_CHANNELS 6 | |
#define SIMPLE_SOUND_NUM_COMMANDS 512 |
View UI.js
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 UpdateMetaData(WebFS, info) { | |
let infoDiv = document.getElementById('size'); | |
//let location = window.location.href; | |
let location = (new URL(window.location.href)); | |
let target = "filesystem:" + location.protocol; | |
if (target.endsWith(":")) { | |
target += "//"; | |
} | |
else { |
View types.h
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
#pragma once | |
typedef unsigned char u8; | |
typedef unsigned short u16; | |
typedef unsigned int u32; | |
typedef unsigned long long u64; | |
typedef __int8 i8; | |
typedef __int16 i16; | |
typedef __int32 i32; |
View ASTNode.cs
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ExpressionParser { | |
class ASTNode { | |
} |
View MathParser.cs
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
// <expression> -> <term> (("+" | "-") <term>)* | |
// <term> -> <power> (("*" | "/") <power>)* | |
// <power> -> <unary> ("^" <power>)* | |
// <unary> -> ("-")? <unary> | <factor> | |
// <factor> -> NUMBER | "(" <expression> ")" | |
class Program { | |
public static void Main(String[] args) { | |
Program p = new Program("3"); | |
Console.ReadLine(); |
View Polygon.cpp
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
#include "Polygon.h" | |
#include <list> | |
#include <algorithm> | |
#include <bitset> | |
#include <vector> | |
#include <list> | |
void DrawPixel(int x, int y, unsigned char r, unsigned char g, unsigned char b); | |
void DrawPixel(int x, int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a); |
View PolyRasterV0.cpp
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
#include "PolyRasterV0.h" | |
#include <cmath> | |
#include <iostream> | |
namespace Rasterizer { | |
void raster_polygon_assert(bool b) { | |
if (!b) { | |
*((u8*)0) = 42; | |
} | |
} |
View Font.cpp
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
#define _CRT_SECURE_NO_WARNINGS | |
#include "Font.h" | |
#include <tuple> | |
using std::vector; | |
using std::tuple; | |
using std::get; | |
void DrawPixel(i32 x, i32 y, u8 r, u8 g, u8 b); |
NewerOlder