Hengband  2.1.4
 全て データ構造 ファイル 関数 変数 型定義 マクロ定義 ページ
マクロ定義 | 関数
readdib.c

Windows用ビットマップファイル読み込み処理パッケージ / This package provides a routine to read a DIB file and set up the device dependent version of the image. [詳細]

#include <windows.h>
#include "readdib.h"
readdib.cのインクルード依存関係図

マクロ定義

#define SEEK_SET   0
 
#define MAXREAD   32768
 一度にファイルから読み込むデータ量 / Number of bytes to be read during each read operation [詳細]
 

関数

static DWORD PASCAL lread (int fh, VOID FAR *pv, DWORD ul)
 32KBのデータ読み取りを繰り返すことで、64KB以上のデータを一度に読み取るサブルーチン Private routine to read more than 64K at a time Reads data in steps of 32k till all the data has been read. [詳細]
 
static HPALETTE PASCAL NEAR MakeDIBPalette (LPBITMAPINFOHEADER lpInfo)
 BITMAPINFOHEADERを取得してカラーテーブルを基本としたパレットを作成する。 Given a BITMAPINFOHEADER, create a palette based on the color table. [詳細]
 
static BOOL NEAR PASCAL MakeBitmapAndPalette (HDC hDC, HANDLE hDIB, HPALETTE *phPal, HBITMAP *phBitmap)
 ビットマップファイルを受け取り、画像のデバイス依存の描画のために使われる共通パレットとビットマップを作成する Given a DIB, create a bitmap and corresponding palette to be used for a device-dependent representation of the image. [詳細]
 
BOOL ReadDIB (HWND hWnd, LPSTR lpFileName, DIBINIT *pInfo)
 ビットマップファイルを読み込み、BITMAPINFO構造体にハンドルを取得する。 Reads a DIB from a file, obtains a handle to its BITMAPINFO struct, and loads the DIB. [詳細]
 

説明

Windows用ビットマップファイル読み込み処理パッケージ / This package provides a routine to read a DIB file and set up the device dependent version of the image.

日付
2014/08/08
作者
This file has been modified for use with "Angband 2.8.2"

COPYRIGHT:

(C) Copyright Microsoft Corp. 1993. All rights reserved.

You have a royalty-free right to use, modify, reproduce and distribute the Sample Files (and/or any modified version) in any way you find useful, provided that you agree that Microsoft has no warranty obligations or liability for any Sample Application Files which are modified.

mind.cとあるが実際には超能力者、練気術師、狂戦士、鏡使い、忍者までの 特殊技能を揃えて実装している。

マクロ定義

#define MAXREAD   32768

一度にファイルから読み込むデータ量 / Number of bytes to be read during each read operation

#define SEEK_SET   0

関数

static DWORD PASCAL lread ( int  fh,
VOID FAR *  pv,
DWORD  ul 
)
static

32KBのデータ読み取りを繰り返すことで、64KB以上のデータを一度に読み取るサブルーチン Private routine to read more than 64K at a time Reads data in steps of 32k till all the data has been read.

引数
fhファイルヘッダ
pv読み取りポインタ
ul読み込むバイト数
戻り値
取得できたデータ量をバイトで返す。0ならば何らかのエラー。 Returns number of bytes requested, or zero if something went wrong.

呼出しグラフ:

static BOOL NEAR PASCAL MakeBitmapAndPalette ( HDC  hDC,
HANDLE  hDIB,
HPALETTE *  phPal,
HBITMAP *  phBitmap 
)
static

ビットマップファイルを受け取り、画像のデバイス依存の描画のために使われる共通パレットとビットマップを作成する Given a DIB, create a bitmap and corresponding palette to be used for a device-dependent representation of the image.

引数
hDCデバイスコンテキストハンドル
hDIBビットマップ画像ハンドル
phPalパレット取得ハンドル
phBitmapビットマップ取得ハンドル
戻り値
成功したならばTRUEを返す。失敗の場合FALSE。 Returns TRUE on success (phPal and phBitmap are filled with appropriate handles. Caller is responsible for freeing objects) and FALSE on failure (unable to create objects, both pointer are invalid).

関数の呼び出しグラフ:

呼出しグラフ:

static HPALETTE PASCAL NEAR MakeDIBPalette ( LPBITMAPINFOHEADER  lpInfo)
static

BITMAPINFOHEADERを取得してカラーテーブルを基本としたパレットを作成する。 Given a BITMAPINFOHEADER, create a palette based on the color table.

引数
lpInfoBITMAPINFOHEADERのポインタ
戻り値
パレットの参照を返す。NULLならばエラー。 Returns the handle of a palette, or zero if something went wrong.

呼出しグラフ:

BOOL ReadDIB ( HWND  hWnd,
LPSTR  lpFileName,
DIBINIT pInfo 
)

ビットマップファイルを読み込み、BITMAPINFO構造体にハンドルを取得する。 Reads a DIB from a file, obtains a handle to its BITMAPINFO struct, and loads the DIB.

Once the DIB is loaded, the function also creates a bitmap and palette out of the DIB for a device-dependent form. device-dependent representation of the image.

引数
hWndウィンドウハンドル
lpFileName読み込むビットマップファイル
pInfo取得情報を補完するビットマップ情報構造体ポインタ
戻り値
Returns TRUE if the DIB is loaded and the bitmap/palette created, in which case, the DIBINIT structure pointed to by pInfo is filled with the appropriate handles, and FALSE if something went wrong.

Reads a DIB from a file, obtains a handle to its BITMAPINFO struct, and loads the DIB. Once the DIB is loaded, the function also creates a bitmap and palette out of the DIB for a device-dependent form.

関数の呼び出しグラフ: