wonx/WWCharacter.h
Hiroaki Sakai d1cde9116a Added dump of RGB value when dumping palette data.
Fixed a part of the data dump part.

Changed the line of perl script from / usr / bin / perl to / usr / local / bin / perl.
(On FreeBSD, Japanese perl is in / usr / local / bin)

For disp.c, libwwc.c, a function for reading and acquiring bitmap data of characters,
The type of bitmap data is not unsigned char *, but instead of short int *, long int *
It was modified to an appropriate type.
Let the bitmap of the WWCharacter class be union of uchar, ushort, ulong,
By accessing with an appropriate type in WWCharacter_GetPixel ()
The endian dependence of bitmap data is eliminated.  (i386, confirmed by SPARC)

Fixed how to get the value of WWCharacter_GetPixel () in 16 PACKED color mode.
(The bug that the character was displayed inverted horizontally was resolved)

Stop for 10 seconds at F11, forcibly end with Ctrl-c or F12,
Added iconization with Ctrl-i.  (It was a function that was originally, but I forgot that,
We modified it somewhat to make it formal support)

Move display / non-display change key from p to F10.  Manual correction.

XDisplay.c: generated with XColorGC_CreateFromRGB () with XDisplay_DrawLCDWindow ()
Since we did not Destroy () the XColorGC object, we made a bug that caused memory flow
Fix.  (XColorGC_Destroy (x_color_gc) addition)

Add wonx_include / fcntl.h.  The contents are / usr / include / fcntl.h,
Just include /usr/include/sys/fcntl.h.

Format change of serial output message (output to serial port:).
(I tried to enclose it with "".)
etc.c: wonx_print_character () Fixed.  (Add \ ", \ \ and others)
Fix sout2str.pl.  (Add \ ", \ \ etc .... The above message for serial output
It was modified according to format change)

Added int2sint.pl, filters.pl, challsrc.sh.
Change sys2wonx.pl.

in wonx_include / types.h
typedef unsigned short WORD;
typedef unsigned long DWORD;
To
typedef unsigned short int WORD;
typedef unsigned long int DWORD;
change to.

Fixed README.

Version 2.1 - from wonx-2.1.tar.gz
2018-03-07 23:07:23 +00:00

94 lines
4.5 KiB
C

#ifndef _WWCharacter_h_INCLUDED_
#define _WWCharacter_h_INCLUDED_
/*****************************************************************************/
/* ここから */
/*****************************************************************************/
/*****************************************************************************/
/* クラスの定義 */
/*****************************************************************************/
typedef struct _WWCharacter * WWCharacter;
/*****************************************************************************/
/* ヘッダファイルのインクルード */
/*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "WWDisplay.h"
#include "wonx_include/libwwc.h"
/*****************************************************************************/
/* メンバ関数の宣言 */
/*****************************************************************************/
/*===========================================================================*/
/* ナンバーの操作 */
/*===========================================================================*/
int WWCharacter_GetNumber(WWCharacter c);
int WWCharacter_SetNumber(WWCharacter c, int n);
/*===========================================================================*/
/* ビットマップの操作 */
/*===========================================================================*/
/*---------------------------------------------------------------------------*/
/* char 型として操作するための関数 */
/*---------------------------------------------------------------------------*/
unsigned char WWCharacter_GetBitmapAsChar(WWCharacter c, int n);
unsigned char WWCharacter_SetBitmapAsChar(WWCharacter c, int n,
unsigned char bitmap);
/*---------------------------------------------------------------------------*/
/* short int 型として操作するための関数 */
/*---------------------------------------------------------------------------*/
unsigned short int WWCharacter_GetBitmapAsShortInt(WWCharacter c, int n);
unsigned short int WWCharacter_SetBitmapAsShortInt(WWCharacter c, int n,
unsigned short int bitmap);
/*---------------------------------------------------------------------------*/
/* long int 型として操作するための関数 */
/*---------------------------------------------------------------------------*/
unsigned long int WWCharacter_GetBitmapAsLongInt(WWCharacter c, int n);
unsigned long int WWCharacter_SetBitmapAsLongInt(WWCharacter c, int n,
unsigned long int bitmap);
/*===========================================================================*/
/* オブジェクトの生成と削除 */
/*===========================================================================*/
WWCharacter WWCharacter_Create(int number);
WWCharacter WWCharacter_Destroy(WWCharacter character);
/*===========================================================================*/
/* ピクセルの操作 */
/*===========================================================================*/
int WWCharacter_GetPixel(WWCharacter character, int x, int y,
WWDisplay display);
int WWCharacter_ClearAllPixels(WWCharacter character);
int WWCharacter_CopyAllPixels(WWCharacter dst, WWCharacter src);
/*===========================================================================*/
/* 内部データ出力 */
/*===========================================================================*/
int WWCharacter_PrintData(WWCharacter character, WWDisplay display, FILE * f);
/*****************************************************************************/
/* ここまで */
/*****************************************************************************/
#endif
/*****************************************************************************/
/* End of File. */
/*****************************************************************************/