Skip to content

Instantly share code, notes, and snippets.

View Glamhoth's full-sized avatar
🤔
Rust...?

Filip Demski (Glamhoth) Glamhoth

🤔
Rust...?
View GitHub Profile
internal void Win32FillSoundBuffer(win32_sound_output_buffer *SoundOutput, DWORD ByteToLock, DWORD BytesToWrite, game_sound_output_buffer *SourceSoundBuffer)
{
VOID *Region1;
DWORD Region1Size;
VOID *Region2;
DWORD Region2Size;
if(SUCCEEDED(GlobalSecondaryBuffer->Lock(ByteToLock, BytesToWrite, &Region1, &Region1Size, &Region2, &Region2Size, 0)))
{
int16_t *SourceSample;
@Glamhoth
Glamhoth / win32_cEngine.cpp
Created July 23, 2016 23:11
niskopoziomowość :3
if(SUCCEEDED(GlobalSecondaryBuffer->Lock(ByteToLock, BytesToWrite, &Region1, &Region1Size, &Region2, &Region2Size, 0)))
{
int16_t *SourceSample;
int16_t *DestSample;
DWORD Region1SampleCount = Region1Size/SoundOutput->BytesPerSample;
DestSample = (int16_t *)Region1;
SourceSample = SourceSoundBuffer->Samples;
for(DWORD SampleIndex = 0; SampleIndex < Region1SampleCount; ++SampleIndex)
{
#include <iostream>
using namespace std;
int main()
{
int a;
bool pierwsza;
cout << "Podaj liczbe\n";
@Glamhoth
Glamhoth / build.bat
Created September 12, 2016 12:10
build.bat
@echo off
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
set CommonCompilerFlags=-nologo -MTd -Od -Oi -Gm- -GR- -EHa- -WX -W4 -wd4201 -wd4100 -wd4189 -DCENGINE_INTERNAL=1 -DCENGINE_SLOW=1 -DCENGINE_WIN32=1 -FC -Z7
set CommonLinkerFlags= -incremental:no -opt:ref user32.lib gdi32.lib winmm.lib
cls
IF NOT EXIST ..\Build mkdir ..\Build
#ifndef COMMANDS_H_INCLUDED
#define COMMANDS_H_INCLUDED
void mainDir(std::string);
void makeReady();
void welcomeLogin();
std::string currLoc ("home");
std::string prevLoc ("");
#include <iostream>
#include <fstream>
#include <math.h>
#include <iomanip>
using namespace std;
inline double
ui(int i, double x)
{
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
typedef int bool;
#define false 0
#define true 1
const int SIZE = 4;
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
typedef int bool;
#define false 0
#define true 1
const int SIZE = 4;
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int SIZE = 4;
double matrix[4][6] = {-1, -5, 0.5, 5.5, 9.5, 0, -2, 0, -1, 3, -3, 1, -1.5, -1.25, 0.5, -0.75, -1.5, 2, 0, -1.25, 0.5, 5.5, 9.5, 3};
void
DrawMatrix()
{
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define SIZE 4
double matrix[4][5] = {-1, -5, 0.5, 5.5, 9.5, -2, 0, -1, 3, -3, -1.5, -1.25, 0.5, -0.75, -1.5, 0, -1.25, 0.5, 5.5, 9.5};
double bmatrix[4];
double xmatrix[4];
int maxi;