#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
// Function prototypes
void change_hor_screen(int);
void change_ver_screen(int);
void prepare_screen();
void horizontal_flipped();
void vertical_flipped();
int dcHorzres; // HORZRES
int dcVertres; // VERTRES
HDC hDC;
HDC hMemoryDC;
HBITMAP hBitmap;
void change_hor_screen(int x)
{
int width;
int height;
int result;
width = dcHorzres;
height = dcVertres;
result = width - x;
x = ((width + x )% width) % width;
BitBlt(hDC, x, 0, width - x, height, hMemoryDC, 0, 0, SRCCOPY);
BitBlt(hDC, 0, 0, x, height, hMemoryDC, width - x, 0, SRCCOPY);
return;
}