Initial commit: ROW Client source code

Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,58 @@
//-----------------------------------------------------------------------------
//
// Sample Name: Scrawl Sample
//
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
Description
===========
The Scrawl application demonstrates use of the mouse in exclusive mode in a
windowed application.
Path
====
Source: DXSDK\Samples\Multimedia\DInput\Scrawl
Executable: DXSDK\Samples\Multimedia\DInput\Bin
User's Guide
============
The main mouse button is always the left button, and the secondary button is
always the right button, regardless of any settings the user may have made in
Control Panel.
To scrawl, hold down the left button and move the mouse. Click the right
mouse button to invoke a pop-up menu. From the pop-up menu you can clear the
client window, set the mouse sensitivity, or close the application.
Programming Notes
=================
The Scrawl application demonstrates many aspects of DirectInput programming,
including the following:
 Using the mouse in exclusive mode in a windowed application.
 Releasing the mouse when Windows needs to use it for menu access.
 Reacquiring the mouse when Windows no longer needs it.
 Reading buffered device data.
 Deferring screen updates till movement on both axes has been fully
processed.
 Event notifications of device activity.
 Restricting the cursor to an arbitrary region.
 Scaling raw mouse coordinates before using them.
 Using relative axis mode.

View File

@@ -0,0 +1,23 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Scrawl.rc
//
#define IDM_SENSITIVITY 1
#define IDC_SENSITIVITY_LOW 96
#define IDC_SENSITIVITY_NORMAL 97
#define IDC_SENSITIVITY_HIGH 98
#define IDI_ICON1 101
#define IDI_MAIN 101
#define IDI_ICON2 102
#define IDI_ICON3 103
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 104
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,997 @@
//-----------------------------------------------------------------------------
// File: Scrawl.cpp
//
// Desc: Demonstrates an application which receives relative mouse data
// in non-exclusive mode via a dialog timer.
//
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#define STRICT
#include <tchar.h>
#include <windows.h>
#include <windowsx.h>
#include <basetsd.h>
#include <dinput.h>
#include "resource.h"
//-----------------------------------------------------------------------------
// Function prototypes
//-----------------------------------------------------------------------------
HRESULT InitVariables();
HWND RegisterWindowClass( HINSTANCE hInst );
LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );
HRESULT OnClear( HWND hWnd );
VOID InvalidateCursorRect(HWND hWnd);
VOID OnPaint( HWND hWnd );
BOOL OnCreate( HWND hWnd, LPCREATESTRUCT lpCreateStruct );
VOID OnInitMenuPopup( HWND hWnd, HMENU hMenu, UINT item, BOOL fSystemMenu );
VOID OnKeyDown( HWND hWnd, UINT vk, BOOL fDown, int cRepeat, UINT flags );
HRESULT InitDirectInput( HWND hWnd );
HRESULT SetAcquire();
HRESULT FreeDirectInput();
VOID OnMouseInput( HWND hWnd );
VOID OnLeftButtonDown( HWND hWnd );
VOID OnRightButtonUp( HWND hWnd );
//-----------------------------------------------------------------------------
// Defines, constants, and global variables
//-----------------------------------------------------------------------------
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
#define SCRAWL_CXBITMAP 512
#define SCRAWL_CYBITMAP 300
#define SAMPLE_BUFFER_SIZE 16
#define IDC_CLEAR 64
#define IDC_ABOUT 65
struct LEFTBUTTONINFO
{
HDC hdcWindow;
BOOL bMoved;
DWORD dwSeqLastSeen;
};
HDC g_hDC = NULL; // Memory DC our picture lives in
HBITMAP g_hBitmap = NULL; // Our picture
HBITMAP g_hbmpDeselect = NULL; // Stock bitmap for deselecting
HCURSOR g_hCursorCross = NULL; // cross hair
int g_cxCross; // Width of crosshairs cursor
int g_cyCross; // Height of crosshairs cursor
int g_dxCrossHot; // Hotspot location of crosshairs
int g_dyCrossHot; // Hotspot location of crosshairs
BOOL g_bShowCursor = TRUE; // Should the cursor be shown?
int g_x; // Virtual x-coordinate
int g_y; // Virtual y-coordinate
int g_dxFuzz; // Leftover x-fuzz from scaling
int g_dyFuzz; // Leftover y-fuzz from scaling
int g_iSensitivity; // Mouse sensitivity
LPDIRECTINPUT8 g_pDI = NULL;
LPDIRECTINPUTDEVICE8 g_pMouse = NULL;
HANDLE g_hMouseEvent = NULL;
BOOL g_bActive = TRUE;
BOOL g_bSwapMouseButtons;
//-----------------------------------------------------------------------------
// Name: WinMain()
// Desc: Entry point for the application. Since we use a simple dialog for
// user interaction we don't need to pump messages.
//-----------------------------------------------------------------------------
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int )
{
HRESULT hr;
HWND hWnd;
BOOL bDone;
DWORD dwResult;
MSG msg;
// Initialize global varibles
if ( FAILED( hr = InitVariables() ) )
{
MessageBox( NULL, _T("Error Initializing Variables"),
_T("Scrawl"), MB_ICONERROR | MB_OK );
return TRUE;
}
// Display the main dialog box.
hWnd = RegisterWindowClass( hInstance );
if( NULL == hWnd )
{
MessageBox( NULL, _T("Error Creating Window"),
_T("Scrawl"), MB_ICONERROR | MB_OK );
return TRUE;
}
// Start message pump. Since we use notification handles, we need to use
// MsgWaitForMultipleObjects() to wait for the event or a message,
// whichever comes first.
bDone = FALSE;
while( !bDone )
{
dwResult = MsgWaitForMultipleObjects( 1, &g_hMouseEvent,
FALSE, INFINITE, QS_ALLINPUT );
switch( dwResult )
{
// WAIT_OBJECT_0 + 0 means that g_hevtMouse was signalled
case WAIT_OBJECT_0 + 0:
OnMouseInput( hWnd );
break;
// WAIT_OBJECT_0 + 1 means that we have messages to process
case WAIT_OBJECT_0 + 1:
while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
if( msg.message == WM_QUIT )
{
// Stop loop if it's a quit message
bDone = TRUE;
}
else
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
break;
}
}
// Clean up
FreeDirectInput();
// Delete bitmaps
if( g_hDC )
{
if( g_hbmpDeselect )
SelectObject( g_hDC, g_hbmpDeselect );
DeleteDC( g_hDC );
}
if( g_hBitmap )
DeleteObject( g_hBitmap );
return TRUE;
}
//-----------------------------------------------------------------------------
// Name: InitVariables()
// Desc: Initialize global varibles
//-----------------------------------------------------------------------------
HRESULT InitVariables()
{
ICONINFO iconInfo;
BITMAP bitmap;
HDC hDC;
// Get our crosshairs cursor and extract the the width and
// hotspot location so we can draw it manually.
g_hCursorCross = LoadCursor( NULL, IDC_CROSS );
GetIconInfo( g_hCursorCross, &iconInfo );
GetObject( iconInfo.hbmMask, sizeof(BITMAP), &bitmap );
// Delete un-needed handles
if( iconInfo.hbmMask)
DeleteObject( iconInfo.hbmMask );
if( iconInfo.hbmColor)
DeleteObject( iconInfo.hbmColor );
// Save x-y info
g_dxCrossHot = iconInfo.xHotspot;
g_dyCrossHot = iconInfo.yHotspot;
g_cxCross = bitmap.bmWidth;
g_cyCross = bitmap.bmHeight;
// create and setup our scrawl bitmap.
hDC = GetDC( NULL );
g_hDC = CreateCompatibleDC( hDC );
ReleaseDC( NULL, hDC );
if( NULL == g_hDC )
return E_FAIL;
g_hBitmap = CreateBitmap( SCRAWL_CXBITMAP, SCRAWL_CYBITMAP, 1, 1, 0 );
if( NULL == g_hBitmap )
return E_FAIL;
g_hbmpDeselect = (HBITMAP)SelectObject( g_hDC, g_hBitmap );
// Clear bitmap
OnClear( NULL );
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: RegisterWindowClass()
// Desc: Set up the window class.
//-----------------------------------------------------------------------------
HWND RegisterWindowClass( HINSTANCE hInst )
{
WNDCLASS wc;
wc.hCursor = LoadCursor( 0, IDC_ARROW );
wc.hIcon = LoadIcon( hInst, MAKEINTRESOURCE(IDI_MAIN) );
wc.lpszMenuName = NULL;
wc.lpszClassName = _T("Scrawl");
wc.hbrBackground = NULL;
wc.hInstance = hInst;
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
if( FALSE == RegisterClass(&wc) )
return NULL;
RECT rc;
rc.left = 0;
rc.top = 0;
rc.right = SCRAWL_CXBITMAP;
rc.bottom = SCRAWL_CYBITMAP;
AdjustWindowRectEx( &rc, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,
FALSE, WS_EX_APPWINDOW );
HWND hWnd = CreateWindowEx( WS_EX_APPWINDOW, _T("Scrawl"), _T("Scrawl"),
WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT,
rc.right - rc.left,
rc.bottom - rc.top,
NULL, NULL, hInst, NULL );
ShowWindow( hWnd, TRUE );
return hWnd;
}
//-----------------------------------------------------------------------------
// Name: WndProc()
// Desc: Handles window messages
//-----------------------------------------------------------------------------
LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam )
{
LRESULT lr = 0;
switch( msg )
{
// Pass these messages to user defined functions
HANDLE_MSG( hWnd, WM_CREATE, OnCreate );
HANDLE_MSG( hWnd, WM_PAINT, OnPaint );
HANDLE_MSG( hWnd, WM_INITMENUPOPUP, OnInitMenuPopup );
HANDLE_MSG( hWnd, WM_KEYDOWN, OnKeyDown );
case WM_ACTIVATE: // sent when window changes active state
if( WA_INACTIVE == wParam )
g_bActive = FALSE;
else
g_bActive = TRUE;
// Set exclusive mode access to the mouse based on active state
SetAcquire();
return 0;
case WM_NCLBUTTONDOWN:
switch (wParam)
{
case HTMINBUTTON:
ShowWindow( hWnd, SW_MINIMIZE);
break;
case HTCLOSE:
PostQuitMessage(0);
break;
}
case WM_ENTERMENULOOP:
case WM_ENTERSIZEMOVE:
// un-acquire device when entering menu or re-sizing
// this will show the mouse cursor again
g_bActive = FALSE;
SetAcquire();
return 0;
case WM_EXITMENULOOP:
// If we aren't returning from the popup menu, let the user continue
// to be in non-exclusive mode (to move the window for example)
if( (BOOL)wParam == FALSE )
return 0;
case WM_EXITSIZEMOVE:
// re-acquire device when leaving menu or re-sizing
// this will show the mouse cursor again
// even though the menu is going away, the app
// might have lost focus or be an icon
if( GetActiveWindow() == hWnd || !IsIconic( hWnd ) )
g_bActive = TRUE;
else
g_bActive = FALSE;
SetAcquire();
return 0;
case WM_SYSCOMMAND:
lr = 0;
switch ( LOWORD(wParam) )
{
case IDC_CLEAR:
OnClear( hWnd );
break;
case IDC_ABOUT:
MessageBox( hWnd, _T("Scrawl DirectInput Sample v1.0"),
_T("Scrawl"), MB_OK );
break;
case SC_SCREENSAVE:
// eat the screen-saver notification.
break;
case IDC_SENSITIVITY_LOW:
g_iSensitivity = -1;
break;
case IDC_SENSITIVITY_NORMAL:
g_iSensitivity = 0;
break;
case IDC_SENSITIVITY_HIGH:
g_iSensitivity = 1;
break;
default:
lr = DefWindowProc( hWnd, msg, wParam, lParam );
break;
}
// The WM_SYSCOMMAND might've been a WM_CLOSE,
// in which case our window no longer exists.
if( IsWindow(hWnd) )
SetAcquire();
return lr;
case WM_DESTROY:
PostQuitMessage(0);
break;
}
return DefWindowProc( hWnd, msg, wParam, lParam );
}
//-----------------------------------------------------------------------------
// Name: OnCreate()
// Desc: Handles the WM_CREATE window message
//-----------------------------------------------------------------------------
BOOL OnCreate( HWND hWnd, LPCREATESTRUCT lpCreateStruct )
{
HRESULT hr;
HMENU hMenu;
// Initialize direct input
hr = InitDirectInput( hWnd );
if( FAILED(hr) )
{
MessageBox( NULL, _T("Error Initializing DirectInput"),
_T("Scrawl"), MB_ICONERROR | MB_OK );
return FALSE;
}
// Fix up the popup system menu with custom commands
hMenu = GetSystemMenu( hWnd, FALSE );
EnableMenuItem( hMenu, SC_SIZE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
EnableMenuItem( hMenu, SC_MAXIMIZE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
AppendMenu( hMenu, MF_ENABLED | MF_STRING, IDC_CLEAR, _T("C&lear\tDel") );
AppendMenu( hMenu, MF_ENABLED | MF_STRING, IDC_ABOUT, _T("&About\tF1") );
AppendMenu( hMenu, MF_ENABLED | MF_STRING | MF_POPUP,
(UINT_PTR)LoadMenu( (HINSTANCE)GetModuleHandle(NULL),
MAKEINTRESOURCE(IDM_SENSITIVITY) ),
_T("Sensitivit&y") );
return TRUE;
}
//-----------------------------------------------------------------------------
// Name: OnPaint()
// Desc: Handles the WM_PAINT window message
//-----------------------------------------------------------------------------
VOID OnPaint( HWND hWnd )
{
PAINTSTRUCT ps;
HDC hDC;
hDC = BeginPaint( hWnd, &ps );
if( NULL == hDC )
return;
BitBlt( hDC, ps.rcPaint.left, ps.rcPaint.top,
ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top,
g_hDC, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY );
if( g_bActive && g_bShowCursor )
DrawIcon( hDC, g_x - g_dxCrossHot, g_y - g_dyCrossHot, g_hCursorCross );
EndPaint( hWnd, &ps );
}
//-----------------------------------------------------------------------------
// Name: OnInitMenuPopup()
// Desc: Handles the WM_INITMENUPOPUP window message
//-----------------------------------------------------------------------------
VOID OnInitMenuPopup( HWND hWnd, HMENU hMenu, UINT item, BOOL fSystemMenu )
{
for( int iSensitivity = -1; iSensitivity <= 1; iSensitivity++ )
{
if( g_iSensitivity == iSensitivity )
{
CheckMenuItem( hMenu, IDC_SENSITIVITY_NORMAL + iSensitivity,
MF_BYCOMMAND | MF_CHECKED );
}
else
{
CheckMenuItem( hMenu, IDC_SENSITIVITY_NORMAL + iSensitivity,
MF_BYCOMMAND | MF_UNCHECKED );
}
}
}
//-----------------------------------------------------------------------------
// Name: OnKeyDown()
// Desc: Handles the WM_KEYDOWN window message
//-----------------------------------------------------------------------------
VOID OnKeyDown( HWND hWnd, UINT vk, BOOL fDown, int cRepeat, UINT flags )
{
switch( vk )
{
case '1':
case '2':
case '3':
PostMessage( hWnd, WM_SYSCOMMAND, IDC_SENSITIVITY_NORMAL + vk - '2', 0 );
break;
case VK_DELETE:
PostMessage( hWnd, WM_SYSCOMMAND, IDC_CLEAR, 0 );
break;
case VK_F1:
PostMessage( hWnd, WM_SYSCOMMAND, IDC_ABOUT, 0 );
break;
}
}
//-----------------------------------------------------------------------------
// Name: OnClear()
// Desc: Makes the bitmap white
//-----------------------------------------------------------------------------
HRESULT OnClear( HWND hWnd )
{
PatBlt( g_hDC, 0, 0, SCRAWL_CXBITMAP, SCRAWL_CYBITMAP, WHITENESS );
if( hWnd )
InvalidateRect( hWnd, 0, 0 );
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: InvalidateCursorRect()
// Desc: Invalidate the rectangle that contains the cursor.
// The coordinates are in client coordinates.
//-----------------------------------------------------------------------------
VOID InvalidateCursorRect( HWND hWnd )
{
RECT rc = { g_x - g_dxCrossHot, g_y - g_dyCrossHot,
g_x - g_dxCrossHot + g_cxCross, g_y - g_dyCrossHot + g_cyCross };
InvalidateRect( hWnd, &rc, 0 );
}
//-----------------------------------------------------------------------------
// Name: UpdateCursorPosition()
// Desc: Move our private cursor in the requested direction, subject
// to clipping, scaling, and all that other stuff.
//
// This does not redraw the cursor. You need to do that yourself.
//-----------------------------------------------------------------------------
VOID UpdateCursorPosition( int dx, int dy )
{
// Pick up any leftover fuzz from last time. This is important
// when scaling down mouse motions. Otherwise, the user can
// drag to the right extremely slow for the length of the table
// and not get anywhere.
dx += g_dxFuzz;
g_dxFuzz = 0;
dy += g_dyFuzz;
g_dyFuzz = 0;
switch( g_iSensitivity )
{
case 1: // High sensitivity: Magnify!
dx *= 2;
dy *= 2;
break;
case -1: // Low sensitivity: Scale down
g_dxFuzz = dx % 2; // remember the fuzz for next time
g_dyFuzz = dy % 2;
dx /= 2;
dy /= 2;
break;
case 0: // normal sensitivity
// No adjustments needed
break;
}
g_x += dx;
g_y += dy;
// clip the cursor to our client area
if( g_x < 0 )
g_x = 0;
if( g_x >= SCRAWL_CXBITMAP )
g_x = SCRAWL_CXBITMAP - 1;
if( g_y < 0 )
g_y = 0;
if( g_y >= SCRAWL_CYBITMAP )
g_y = SCRAWL_CYBITMAP - 1;
}
//-----------------------------------------------------------------------------
// Name: StartPenDraw()
// Desc: Called when starting pen draw.
//-----------------------------------------------------------------------------
VOID StartPenDraw( HWND hWnd, LEFTBUTTONINFO* plbInfo )
{
// Hide the cursor while scrawling
g_bShowCursor = FALSE;
plbInfo->hdcWindow = GetDC( hWnd );
MoveToEx( plbInfo->hdcWindow, g_x, g_y, 0 );
MoveToEx( g_hDC, g_x, g_y, 0 );
SelectObject( plbInfo->hdcWindow, GetStockObject(BLACK_PEN) );
SelectObject( g_hDC, GetStockObject(BLACK_PEN) );
plbInfo->bMoved = FALSE;
plbInfo->dwSeqLastSeen = 0;
}
//-----------------------------------------------------------------------------
// Name: FinishPenDraw()
// Desc: Called when ending pen draw.
//-----------------------------------------------------------------------------
VOID FinishPenDraw( HANDLE hWnd )
{
g_bShowCursor = TRUE;
}
//-----------------------------------------------------------------------------
// Name: OnLeftButtonDown_FlushMotion()
// Desc: Flush out any motion that we are holding.
//-----------------------------------------------------------------------------
VOID OnLeftButtonDown_FlushMotion( LEFTBUTTONINFO* plbInfo )
{
if( plbInfo->bMoved )
{
plbInfo->bMoved = FALSE;
plbInfo->dwSeqLastSeen = 0;
LineTo( plbInfo->hdcWindow, g_x, g_y );
LineTo( g_hDC, g_x, g_y );
}
}
//-----------------------------------------------------------------------------
// Name: OnRightButtonUp()
// Desc: Pop up a context menu.
//-----------------------------------------------------------------------------
VOID OnRightButtonUp( HWND hWnd )
{
// Place a popup menu where the mouse curent is
POINT pt;
pt.x = g_x;
pt.y = g_y;
ClientToScreen( hWnd, &pt );
HMENU hMenuPopup = GetSystemMenu( hWnd, FALSE );
// Hide the cursor while moving it so you don't get annoying flicker.
ShowCursor( FALSE );
InvalidateCursorRect( hWnd );
// Unacquire the devices so the user can interact with the menu.
g_bActive = FALSE;
SetAcquire();
// Put the Windows cursor at the same location as our virtual cursor.
SetCursorPos( pt.x, pt.y );
// Show the cursor now that it is moved
ShowCursor( TRUE );
InvalidateCursorRect( hWnd );
// Track the popup menu and return the menu item selected
UINT iMenuID = TrackPopupMenuEx( hMenuPopup, TPM_RIGHTBUTTON|TPM_RETURNCMD,
pt.x, pt.y, hWnd, 0 );
if( 0 != iMenuID ) // If a menu item was selected
PostMessage( hWnd, WM_SYSCOMMAND, iMenuID, 0L );
}
//-----------------------------------------------------------------------------
// Name: InitDirectInput()
// Desc: Initialize the DirectInput variables.
//-----------------------------------------------------------------------------
HRESULT InitDirectInput( HWND hWnd )
{
HRESULT hr;
// Register with the DirectInput subsystem and get a pointer
// to a IDirectInput interface we can use.
// Create a DInput object
if( FAILED( hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION,
IID_IDirectInput8, (VOID**)&g_pDI, NULL ) ) )
return hr;
// Obtain an interface to the system mouse device.
if( FAILED( hr = g_pDI->CreateDevice( GUID_SysMouse, &g_pMouse, NULL ) ) )
return hr;
// Set the data format to "mouse format" - a predefined data format
//
// A data format specifies which controls on a device we
// are interested in, and how they should be reported.
//
// This tells DirectInput that we will be passing a
// DIMOUSESTATE structure to IDirectInputDevice::GetDeviceState.
if( FAILED( hr = g_pMouse->SetDataFormat( &c_dfDIMouse ) ) )
return hr;
// Set the cooperativity level to let DirectInput know how
// this device should interact with the system and with other
// DirectInput applications.
if( FAILED( hr = g_pMouse->SetCooperativeLevel( hWnd,
DISCL_EXCLUSIVE|DISCL_FOREGROUND ) ) )
return hr;
// Create a win32 event which is signaled when mouse data is availible
g_hMouseEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
if( NULL == g_hMouseEvent )
return E_FAIL;
// Give the event to the mouse device
if( FAILED( hr = g_pMouse->SetEventNotification( g_hMouseEvent ) ) )
return hr;
// Setup the buffer size for the mouse data
DIPROPDWORD dipdw;
dipdw.diph.dwSize = sizeof(DIPROPDWORD);
dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
dipdw.diph.dwObj = 0;
dipdw.diph.dwHow = DIPH_DEVICE;
dipdw.dwData = SAMPLE_BUFFER_SIZE; // Arbitary buffer size
if( FAILED( hr = g_pMouse->SetProperty( DIPROP_BUFFERSIZE, &dipdw.diph ) ) )
return hr;
// Not necessary, but nice for left handed users that have
// their swapped mouse buttons
g_bSwapMouseButtons = GetSystemMetrics( SM_SWAPBUTTON );
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: SetAcquire()
// Desc: Acquire or unacquire the mouse, depending on if the app is active
// Input device must be acquired before the GetDeviceState is called
//-----------------------------------------------------------------------------
HRESULT SetAcquire()
{
// Nothing to do if g_pMouse is NULL
if( NULL == g_pMouse )
return S_FALSE;
if( g_bActive )
g_pMouse->Acquire();
else
g_pMouse->Unacquire();
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: FreeDirectInput()
// Desc: Initialize the DirectInput variables.
//-----------------------------------------------------------------------------
HRESULT FreeDirectInput()
{
// Unacquire the device one last time just in case
// the app tried to exit while the device is still acquired.
if( g_pMouse )
g_pMouse->Unacquire();
// Release any DirectInput objects.
SAFE_RELEASE( g_pMouse );
SAFE_RELEASE( g_pDI );
if( g_hMouseEvent )
CloseHandle( g_hMouseEvent );
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: OnMouseInput()
// Desc: Handles responding to any mouse input that is generated from
// the mouse event being triggered.
//-----------------------------------------------------------------------------
VOID OnMouseInput( HWND hWnd )
{
BOOL bDone;
DIDEVICEOBJECTDATA od;
DWORD dwElements;
HRESULT hr;
// Invalidate the old cursor so it will be erased
InvalidateCursorRect( hWnd );
// Attempt to read one data element. Continue as long as
// device data is available.
bDone = FALSE;
while( !bDone )
{
dwElements = 1;
hr = g_pMouse->GetDeviceData( sizeof(DIDEVICEOBJECTDATA),
&od, &dwElements, 0 );
if( hr == DIERR_INPUTLOST )
{
SetAcquire();
break;
}
// Unable to read data or no data available
if( FAILED(hr) || dwElements == 0 )
{
break;
}
// Look at the element to see what happened
switch( od.dwOfs )
{
case DIMOFS_X: // Mouse horizontal motion
UpdateCursorPosition( od.dwData, 0 );
break;
case DIMOFS_Y: // Mouse vertical motion
UpdateCursorPosition( 0, od.dwData );
break;
case DIMOFS_BUTTON0: // Right button pressed or released
case DIMOFS_BUTTON1: // Left button pressed or released
// Is the right or a swapped left button down?
if( ( g_bSwapMouseButtons && DIMOFS_BUTTON1 == od.dwOfs ) ||
( !g_bSwapMouseButtons && DIMOFS_BUTTON0 == od.dwOfs ) )
{
if( od.dwData & 0x80 )
{
// left button pressed, so go into button-down mode
bDone = TRUE;
OnLeftButtonDown( hWnd );
}
}
// is the left or a swapped right button down?
if( ( g_bSwapMouseButtons && DIMOFS_BUTTON0 == od.dwOfs ) ||
( !g_bSwapMouseButtons && DIMOFS_BUTTON1 == od.dwOfs ) )
{
if( !(od.dwData & 0x80) )
{
// button released, so check context menu
bDone = TRUE;
OnRightButtonUp( hWnd );
}
}
break;
}
}
// Invalidate the new cursor so it will be drawn
InvalidateCursorRect( hWnd );
}
//-----------------------------------------------------------------------------
// Name: OnLeftButtonDown()
// Desc: If we are drawing a curve, then read buffered data and draw
// lines from point to point. By reading buffered data, we can
// track the motion of the mouse accurately without coalescing.
//
// This function illustrates how a non-message-based program can
// process buffered data directly from a device, processing
// messages only occasionally (as required by Windows).
//
// This function also illustrates how an application can piece
// together buffered data elements based on the sequence number.
// A single mouse action (e.g., moving diagonally) is reported
// as a series of events, all with the same sequence number.
// Zero is never a valid DirectInput sequence number, so it is
// safe to use it as a sentinel value.
//-----------------------------------------------------------------------------
VOID OnLeftButtonDown( HWND hWnd )
{
HRESULT hr;
LEFTBUTTONINFO lbInfo;
BOOL bDone;
DIDEVICEOBJECTDATA od;
DWORD dwElements;
MSG msg;
// For performance, draw directly onto the window's DC instead of
// invalidating and waiting for the WM_PAINT message. Of course,
// we always draw onto our bitmap, too, since that's what really
// counts.
// hide cursor and initialize button info with cursor position
StartPenDraw( hWnd, &lbInfo );
InvalidateCursorRect( hWnd );
UpdateWindow( hWnd );
// Keep reading data elements until we see a "mouse button up" event.
bDone = FALSE;
while( !bDone )
{
dwElements = 1;
hr = g_pMouse->GetDeviceData( sizeof(DIDEVICEOBJECTDATA),
&od, &dwElements, 0 );
if( FAILED(hr) )
break;
// If theres no data available, finish the element
// we have been collecting, and then process our message
// queue so the system doesn't think the app has hung.
if( dwElements == 0 )
{
// if there is a partial motion, flush it out
OnLeftButtonDown_FlushMotion( &lbInfo );
while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
// If it's a quit message, we're outta here
if( msg.message == WM_QUIT )
{
// Re-post the quit message so the
// outer loop will see it and exit.
PostQuitMessage( (int)msg.wParam );
bDone = TRUE;
break;
}
else
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
continue;
}
// If this is the start of a new event, flush out the old one
if( od.dwSequence != lbInfo.dwSeqLastSeen )
{
OnLeftButtonDown_FlushMotion( &lbInfo );
lbInfo.dwSeqLastSeen = od.dwSequence;
}
// Look at the element to see what happened
switch( od.dwOfs )
{
case DIMOFS_X: // Mouse horizontal motion
UpdateCursorPosition( od.dwData, 0 );
lbInfo.bMoved = TRUE;
break;
case DIMOFS_Y: // Mouse vertical motion
UpdateCursorPosition( 0, od.dwData );
lbInfo.bMoved = TRUE;
break;
case DIMOFS_BUTTON0: // Button 0 pressed or released
case DIMOFS_BUTTON1: // Button 1 pressed or released
if( ( g_bSwapMouseButtons && DIMOFS_BUTTON1 == od.dwOfs ) ||
( !g_bSwapMouseButtons && DIMOFS_BUTTON0 == od.dwOfs ) )
{
if( !(od.dwData & 0x80) )
{
// Button released, so flush out dregs
bDone = TRUE;
OnLeftButtonDown_FlushMotion( &lbInfo );
}
}
break;
}
}
ReleaseDC( hWnd, lbInfo.hdcWindow );
// Re-show the cursor now that scrawling is finished
FinishPenDraw( hWnd );
InvalidateCursorRect( hWnd );
}

View File

@@ -0,0 +1,173 @@
# Microsoft Developer Studio Project File - Name="scrawl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=scrawl - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "scrawl.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "scrawl.mak" CFG="scrawl - Win32 Debug Unicode"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "scrawl - Win32 Debug Unicode" (based on "Win32 (x86) Application")
!MESSAGE "scrawl - Win32 Release Unicode" (based on "Win32 (x86) Application")
!MESSAGE "scrawl - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "scrawl - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "scrawl - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
!ELSEIF "$(CFG)" == "scrawl - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386 /stack:0x200000,0x200000
!ELSEIF "$(CFG)" == "scrawl - Win32 Debug Unicode"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Win32_Debug_Unicode"
# PROP BASE Intermediate_Dir "Win32_Debug_Unicode"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Win32_Debug_Unicode"
# PROP Intermediate_Dir "Win32_Debug_Unicode"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /stack:0x200000,0x200000
!ELSEIF "$(CFG)" == "scrawl - Win32 Release Unicode"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Win32_Release_Unicode"
# PROP BASE Intermediate_Dir "Win32_Release_Unicode"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Win32_Release_Unicode"
# PROP Intermediate_Dir "Win32_Release_Unicode"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
!ENDIF
# Begin Target
# Name "scrawl - Win32 Release"
# Name "scrawl - Win32 Debug"
# Name "scrawl - Win32 Debug Unicode"
# Name "scrawl - Win32 Release Unicode"
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\directx.ico
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File
SOURCE=.\scrawl.rc
# End Source File
# End Group
# Begin Source File
SOURCE=.\readme.txt
# End Source File
# Begin Source File
SOURCE=.\scrawl.cpp
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "scrawl"=.\scrawl.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,350 @@
# Microsoft Developer Studio Generated NMAKE File, Based on scrawl.dsp
!IF "$(CFG)" == ""
CFG=scrawl - Win32 Debug Unicode
!MESSAGE No configuration specified. Defaulting to scrawl - Win32 Debug Unicode.
!ENDIF
!IF "$(CFG)" != "scrawl - Win32 Release" && "$(CFG)" != "scrawl - Win32 Debug" && "$(CFG)" != "scrawl - Win32 Debug Unicode" && "$(CFG)" != "scrawl - Win32 Release Unicode"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "scrawl.mak" CFG="scrawl - Win32 Debug Unicode"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "scrawl - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "scrawl - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "scrawl - Win32 Debug Unicode" (based on "Win32 (x86) Application")
!MESSAGE "scrawl - Win32 Release Unicode" (based on "Win32 (x86) Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "scrawl - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
ALL : "$(OUTDIR)\scrawl.exe"
CLEAN :
-@erase "$(INTDIR)\scrawl.obj"
-@erase "$(INTDIR)\scrawl.res"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\scrawl.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\scrawl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\scrawl.res" /d "NDEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\scrawl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\scrawl.pdb" /machine:I386 /out:"$(OUTDIR)\scrawl.exe" /stack:0x200000,0x200000
LINK32_OBJS= \
"$(INTDIR)\scrawl.obj" \
"$(INTDIR)\scrawl.res"
"$(OUTDIR)\scrawl.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "scrawl - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "$(OUTDIR)\scrawl.exe"
CLEAN :
-@erase "$(INTDIR)\scrawl.obj"
-@erase "$(INTDIR)\scrawl.res"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\scrawl.exe"
-@erase "$(OUTDIR)\scrawl.ilk"
-@erase "$(OUTDIR)\scrawl.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\scrawl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\scrawl.res" /d "_DEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\scrawl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\scrawl.pdb" /debug /machine:I386 /out:"$(OUTDIR)\scrawl.exe" /stack:0x200000,0x200000
LINK32_OBJS= \
"$(INTDIR)\scrawl.obj" \
"$(INTDIR)\scrawl.res"
"$(OUTDIR)\scrawl.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "scrawl - Win32 Debug Unicode"
OUTDIR=.\Win32_Debug_Unicode
INTDIR=.\Win32_Debug_Unicode
# Begin Custom Macros
OutDir=.\Win32_Debug_Unicode
# End Custom Macros
ALL : "$(OUTDIR)\scrawl.exe"
CLEAN :
-@erase "$(INTDIR)\scrawl.obj"
-@erase "$(INTDIR)\scrawl.res"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\scrawl.exe"
-@erase "$(OUTDIR)\scrawl.ilk"
-@erase "$(OUTDIR)\scrawl.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" /Fp"$(INTDIR)\scrawl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\scrawl.res" /d "_DEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\scrawl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\scrawl.pdb" /debug /machine:I386 /out:"$(OUTDIR)\scrawl.exe" /stack:0x200000,0x200000
LINK32_OBJS= \
"$(INTDIR)\scrawl.obj" \
"$(INTDIR)\scrawl.res"
"$(OUTDIR)\scrawl.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "scrawl - Win32 Release Unicode"
OUTDIR=.\Win32_Release_Unicode
INTDIR=.\Win32_Release_Unicode
# Begin Custom Macros
OutDir=.\Win32_Release_Unicode
# End Custom Macros
ALL : "$(OUTDIR)\scrawl.exe"
CLEAN :
-@erase "$(INTDIR)\scrawl.obj"
-@erase "$(INTDIR)\scrawl.res"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\scrawl.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" /Fp"$(INTDIR)\scrawl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\scrawl.res" /d "NDEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\scrawl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=ole32.lib oleaut32.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\scrawl.pdb" /machine:I386 /out:"$(OUTDIR)\scrawl.exe" /stack:0x200000,0x200000
LINK32_OBJS= \
"$(INTDIR)\scrawl.obj" \
"$(INTDIR)\scrawl.res"
"$(OUTDIR)\scrawl.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("scrawl.dep")
!INCLUDE "scrawl.dep"
!ELSE
!MESSAGE Warning: cannot find "scrawl.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "scrawl - Win32 Release" || "$(CFG)" == "scrawl - Win32 Debug" || "$(CFG)" == "scrawl - Win32 Debug Unicode" || "$(CFG)" == "scrawl - Win32 Release Unicode"
SOURCE=.\scrawl.rc
"$(INTDIR)\scrawl.res" : $(SOURCE) "$(INTDIR)"
$(RSC) $(RSC_PROJ) $(SOURCE)
SOURCE=.\scrawl.cpp
"$(INTDIR)\scrawl.obj" : $(SOURCE) "$(INTDIR)"
!ENDIF

View File

@@ -0,0 +1,85 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAIN ICON DISCARDABLE "directx.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDM_SENSITIVITY MENU DISCARDABLE
BEGIN
MENUITEM "&Low\t1", IDC_SENSITIVITY_LOW
MENUITEM "&Normal\t2", IDC_SENSITIVITY_NORMAL
MENUITEM "&High\t3", IDC_SENSITIVITY_HIGH
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED