@echo off
REM Help ID bases
REM #define HID_BASE_COMMAND    0x00010000UL        // ID and IDM
REM #define HID_BASE_RESOURCE   0x00020000UL        // IDR and IDD
REM #define HID_BASE_PROMPT     0x00030000UL        // IDP
REM #define HID_BASE_NCAREAS    0x00040000UL
REM #define HID_BASE_CONTROL    0x00050000UL        // IDC
REM #define HID_BASE_DISPATCH   0x00060000UL        // IDispatch help codes

REM -- First make map file from Microsoft Visual C++ generated resource.h
echo // MAKEHELP.BAT generated Help Map file.  Used by Atari800Win.HPJ. >"Help\Atari800Win.hm"
echo. >>"Help\Atari800Win.hm"
echo // Commands (ID_* and IDM_*) >>"Help\Atari800Win.hm"
makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"Help\Atari800Win.hm"
echo. >>"Help\Atari800Win.hm"
echo // Prompts (IDP_*) >>"Help\Atari800Win.hm"
makehm IDP_,HIDP_,0x30000 resource.h >>"Help\Atari800Win.hm"
echo. >>"Help\Atari800Win.hm"
echo // Resources (IDR_*) >>"Help\Atari800Win.hm"
makehm IDR_,HIDR_,0x20000 resource.h >>"Help\Atari800Win.hm"
echo. >>"Help\Atari800Win.hm"
echo // Dialogs (IDD_*) >>"Help\Atari800Win.hm"
makehm IDD_,HIDD_,0x20000 resource.h >>"Help\Atari800Win.hm"
echo. >>"Help\Atari800Win.hm"
echo // Frame Controls (IDW_*) >>"Help\Atari800Win.hm"
makehm IDW_,HIDW_,0x50000 resource.h >>"Help\Atari800Win.hm"
echo // Controls (IDC_*) >>"Help\Atari800Win.hm"
makehm IDC_,HIDC_,0x50000 resource.h >>"Help\Atari800Win.hm"
REM -- Make help for Project Atari800Win PLus


echo Building Win32 Help files
start /wait hcw /C /E /M "Help\Atari800Win.hpj"
if errorlevel 1 goto :Error
if not exist "Help\Atari800Win.hlp" goto :Error
if not exist "Help\Atari800Win.cnt" goto :Error
echo.
if exist Debug\nul copy "Help\Atari800Win.hlp" Debug
if exist Debug\nul copy "Help\Atari800Win.cnt" Debug
if exist Release\nul copy "Help\Atari800Win.hlp" Release
if exist Release\nul copy "Help\Atari800Win.cnt" Release
echo.
goto :done

:Error
echo Help\Atari800Win.hpj(1) : error: Problem encountered creating help file

:done
echo.
