Compare commits
6 Commits
v0.0.2-alp
...
v0.1-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb06f7f4f8 | ||
|
|
95d1135996 | ||
|
|
3547ae13a1 | ||
|
|
0cc1bd45ae | ||
|
|
aa38e7adab | ||
|
|
9c414a9117 |
106
HISTORY
106
HISTORY
@@ -1,3 +1,109 @@
|
|||||||
|
2000/10/8(<28><>)
|
||||||
|
|
||||||
|
wonx-a08 ̤<><CCA4><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD>ɲá<EFBFBD>(0<><30>127<32><37>ASCIIʸ<49><CAB8><EFBFBD>Τߤǡ<DFA4><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤<EFBFBD>б<EFBFBD>)
|
||||||
|
|
||||||
|
Wonx <20><><EFBFBD>饹<EFBFBD><E9A5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>٤ƤΥ<CEA5><EAA5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Wonx <20><><EFBFBD>饹<EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>褦<EFBFBD><E8A4A6><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD>
|
||||||
|
(Wonx.x WonxP.h <20><><EFBFBD><EFBFBD>)
|
||||||
|
|
||||||
|
p <20><EFBFBD><F2B2A1A4>Ʋ<EFBFBD><C6B2>̤<EFBFBD>ɽ<EFBFBD><C9BD>/<2F><>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؤ<EFBFBD><D8A4><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ˡ<EFBFBD>LCD<43>ѥͥ<D1A5><CDA5>κ<EFBFBD><CEBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4>褦<EFBFBD><E8A4A6>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ɡ<EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD>륪<EFBFBD>ץ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -Wall <20><><EFBFBD>ɲá<C9B2>
|
||||||
|
|
||||||
|
disp.c <20>ǽ<EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<F2A4B7A4><C6A4><EFBFBD><EFBFBD>ؿ<EFBFBD><D8BF>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD>ʬ<EFBFBD><CAAC><EFBFBD>ޤȤ<C8A4><E1A4BF>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2000/10/5(<28><>)
|
||||||
|
|
||||||
|
wonx-a07 ̤<><CCA4><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
WWLCDPanel <20>˥ӥåȥޥåץǡ<D7A5><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>褷<EFBFBD><E8A4B7><EFBFBD>ӥåȥޥåפ<C3A5>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>褷<EFBFBD>ʤ<EFBFBD><EFBFBD>褦<EFBFBD>˽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD><EFBFBD><EFBFBD><EFBFBD>٤餷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
(WWLCDPanel<65><6C>Ϣ<EFBFBD>ȡ<EFBFBD>XDisplay.c <20><> XDisplay_DrawLCDWindow() <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
|
(XDisplay.c <20><> XDisplay_DrawLCDWindow() <20>ˤϡ<CBA4>̵<EFBFBD>̤<EFBFBD> malloc() <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τǡ<CEA4>
|
||||||
|
<20><><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɤ<EFBFBD>ɬ<EFBFBD><C9AC>)
|
||||||
|
|
||||||
|
wonx-a05 <20><> wonx-a06 <20><> WWDisplay.c (WWDisplay_DrawScreen()) <20><>
|
||||||
|
ξ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̡<EFBFBD>wonx-a05 <20>Τۤ<CEA4><DBA4><EFBFBD><EFBFBD><EFBFBD>®<EFBFBD><C2AE><EFBFBD>ä<EFBFBD><C3A4>Τǡ<CEA4>wonx-a05 <20>Τۤ<CEA4><DBA4><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>Ѥ<EFBFBD><EFBFBD>뤳<EFBFBD>Ȥˤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2000/10/4(<28><>)
|
||||||
|
|
||||||
|
wonx-a06 ̤<><CCA4><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
WWDisplay_DrawScreen() <20>Υ<EFBFBD><CEA5>르<EFBFBD>ꥺ<EFBFBD><EAA5BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD>®<EFBFBD>ˤʤ<EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>ä<EFBFBD><EFBFBD><EFBFBD>X <20><><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD><D0A4><EFBFBD><EFBFBD>褬<EFBFBD>ۥåȥ<C3A5><C8A5>ݥåȤˤʤäƤ<C3A4><C6A4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD>פ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤餹<EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD>ɬ<EFBFBD>ס<EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2000/10/3(<28><>)
|
||||||
|
|
||||||
|
wonx-a05 ̤<><CCA4><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
XDisplay_DrawLCDWindow() <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>̤ʷ<CAB7><D7BB><EFBFBD><EFBFBD>롼<EFBFBD>׳<EFBFBD><D7B3>˽Ф<CBBD><D0A4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
WWDisplay_DrawScreen() <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>̤ʷ<CAB7><D7BB><EFBFBD><EFBFBD>롼<EFBFBD>׳<EFBFBD><D7B3>˽Ф<CBBD><D0A4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>ۥåȥ<EFBFBD><EFBFBD>ݥåȤ<EFBFBD>Ĵ<EFBFBD>٤<EFBFBD><EFBFBD>顤X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʬ(XDisplay.c <20><> XDisplay_DrawLCDWindow()<29><>
|
||||||
|
<EFBFBD>롼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʬ)<29><><EFBFBD>ۥåȥ<C3A5><C8A5>ݥåȤˤʤäƤ<C3A4><C6A4><EFBFBD><EFBFBD>Τǡ<CEA4><C7A1>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD>뤴<EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>äơ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>®<EFBFBD>٤<EFBFBD><EFBFBD>夲<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2000/9/30(<28><>)
|
||||||
|
|
||||||
|
wonx-a04 <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
XDisplay.c <20><><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>롼<EFBFBD><EBA1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD>®<EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
WWLCDPanel <20>Υǡ<CEA5><C7A1><EFBFBD><EFBFBD>γ<EFBFBD>Ǽ<EFBFBD><C7BC>ˡ<EFBFBD><CBA1><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
(<28><><EFBFBD>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3>Х<EFBFBD><D0A5>Ȥ<EFBFBD><C8A4>ä<EFBFBD><C3A4>Τ<CEA4><F2A1A4A3>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3>Х<EFBFBD><D0A5>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>褦<EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD>)
|
||||||
|
(<28><>®<EFBFBD><C2AE><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><CEA5>顼<EFBFBD>б<EFBFBD>(241<34><31><EFBFBD><EFBFBD>)<29>Τ<EFBFBD><CEA4>Ȥ<EFBFBD><C8A4>ͤ<EFBFBD><CDA4><EFBFBD>)
|
||||||
|
|
||||||
|
WonxDisplay_Sync() <20><><EFBFBD>ɲá<C9B2>get <20>Ϥδؿ<CEB4><D8BF><EFBFBD><EFBFBD>Ǥ<EFBFBD>̵<EFBFBD>̤<EFBFBD><CCA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>餷<F2B8BAA4><E9A4B7><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ץ饤<EFBFBD>ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(̤<>ƥ<EFBFBD><C6A5><EFBFBD>)
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>δؿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(timer.c)
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ץ饤<EFBFBD>Ȥ<EFBFBD>ͥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>ֹ椬<D6B9>㤤<EFBFBD><E3A4A4><EFBFBD>ΤΤۤ<CEA4><DBA4><EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD>פ˽<D7A4><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2000/9/28(<28><>)
|
||||||
|
|
||||||
|
wonx-a03 <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
screen2_set_window()<29><>ɽ<EFBFBD><C9BD><EFBFBD>ϰϤ<CFB0><CFA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD>ޥ˥奢<EFBFBD><EFBFBD><EFBFBD><EFBFBD> screen2_set_window() <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϡ<CBA4>ɽ<EFBFBD><C9BD><EFBFBD>ΰ<EFBFBD><CEB0>β<EFBFBD><CEB2><EFBFBD><EFBFBD>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD>פ<EFBFBD>
|
||||||
|
<EFBFBD>Ƥ<EFBFBD><EFBFBD>뤬<EFBFBD><EFBFBD><EFBFBD>ºݤˤϡ<EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD>+1<>Ƚ<EFBFBD><C8BD><EFBFBD>+1<>פ<EFBFBD>ư<EFBFBD><EFBFBD><EEA4B9>
|
||||||
|
<EFBFBD>ߤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(̤<><CCA4>ǧ)<29>ʤΤǡ<CEA4>-1 <20><><EFBFBD>ʤ<EFBFBD><CAA4>Ƥ褤<C6A4><E8A4A4>
|
||||||
|
<EFBFBD>⤷<EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>WonderWitch <20>Ǥμºݤ<C2BA>ư<EFBFBD><C6B0><EFBFBD>ϡ<EFBFBD>
|
||||||
|
ex = sx + WWScreen_GetDrawWidth( screen);
|
||||||
|
<EFBFBD>Ǥʤ<EFBFBD>
|
||||||
|
ex = WWScreen_GetDrawWidth( screen);
|
||||||
|
<EFBFBD>ʤΤ<EFBFBD><EFBFBD>⤷<EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ץ饤<EFBFBD>Ȥ<EFBFBD>ͭ<EFBFBD><EFBFBD>/̵<><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
LCD<EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD>ޥåס<EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD>åȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץ饤<EFBFBD>ȤΥǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>ؿ<EFBFBD><EFBFBD>ƤӽФ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɡ<EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2000/9/27(<28><>)
|
2000/9/27(<28><>)
|
||||||
|
|
||||||
Wonx-a02 <20><><EFBFBD><EFBFBD>
|
Wonx-a02 <20><><EFBFBD><EFBFBD>
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -2,10 +2,10 @@ XINCLUDEDIR = /usr/X11R6/include
|
|||||||
INCLUDEDIR = .
|
INCLUDEDIR = .
|
||||||
XLIBDIR = /usr/X11R6/lib
|
XLIBDIR = /usr/X11R6/lib
|
||||||
|
|
||||||
VERSION = Wonx-a02
|
VERSION = Wonx-b01
|
||||||
PKGNAME = wonx-a02
|
PKGNAME = wonx-b01
|
||||||
|
|
||||||
OBJS = WWCharacter.o WWColorMap.o WWDisplay.o WWLCDPanel.o WWPalette.o WWScreen.o WWSprite.o WonxDisplay.o XDisplay.o bank.o comm.o disp.o text.o key.o sound.o system.o timer.o etc.o wonx.o
|
OBJS = WWCharacter.o WWColorMap.o WWDisplay.o WWLCDPanel.o WWPalette.o WWScreen.o WWSprite.o WWText.o Wonx.o WonxDisplay.o WonxText.o XDisplay.o bank.o comm.o disp.o text.o key.o sound.o system.o timer.o etc.o
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ libwonx.a : $(OBJS)
|
|||||||
# ranlib libwonx.a
|
# ranlib libwonx.a
|
||||||
|
|
||||||
.c.o : $*.c
|
.c.o : $*.c
|
||||||
gcc -c $*.c -O -I$(INCLUDEDIR) -I$(XINCLUDEDIR)
|
gcc -c $*.c -O -Wall -I$(INCLUDEDIR) -I$(XINCLUDEDIR)
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -f libwonx.a *.o
|
rm -f libwonx.a *.o
|
||||||
|
|||||||
43
README
43
README
@@ -34,7 +34,7 @@ Wonx
|
|||||||
<EFBFBD><EFBFBD>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>٥<EFBFBD><EFBFBD>Ǹߴ<EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>äƤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τǡ<EFBFBD>WonderWitch <20>ѤΥץ<CEA5><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>٥<EFBFBD><EFBFBD>Ǹߴ<EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>äƤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τǡ<EFBFBD>WonderWitch <20>ѤΥץ<CEA5><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
UNIX<49><58><EFBFBD>Ǥ<EFBFBD><C7A4>Τޤޥ<DEA4><DEA5><EFBFBD><EFBFBD>ѥ<EFBFBD><D1A5><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4>롥(-lwonx <20>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ѥ<EFBFBD><D1A5>뤹<EFBFBD><EBA4B9>)
|
UNIX<49><58><EFBFBD>Ǥ<EFBFBD><C7A4>Τޤޥ<DEA4><DEA5><EFBFBD><EFBFBD>ѥ<EFBFBD><D1A5><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4>롥(-lwonx <20>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ѥ<EFBFBD><D1A5>뤹<EFBFBD><EBA4B9>)
|
||||||
<EFBFBD><EFBFBD>UNIX<EFBFBD><EFBFBD><EFBFBD>ǥǥХå<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѥ<EFBFBD><EFBFBD>ƥǥХå<EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>褦<EFBFBD>ˤʤ롥(<28><><EFBFBD><EFBFBD>!)
|
<EFBFBD><EFBFBD>UNIX<EFBFBD><EFBFBD><EFBFBD>ǥǥХå<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѥ<EFBFBD><EFBFBD>ƥǥХå<EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>褦<EFBFBD>ˤʤ롥(<28><><EFBFBD><EFBFBD>!)
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD>ǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD>åȥǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD>Ĥ<EFBFBD><EFBFBD><EFBFBD>ͽ<EFBFBD>ꡥ
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD>ǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD>åȥǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롥
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͤ䡤<EFBFBD>ѥ<EFBFBD><EFBFBD>åȤ䥭<EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>ǻ<EFBFBD><EFBFBD>Ѥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤɤ<EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͤ䡤<EFBFBD>ѥ<EFBFBD><EFBFBD>åȤ䥭<EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>ǻ<EFBFBD><EFBFBD>Ѥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤɤ<EFBFBD>
|
||||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD><E9A1BC><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD>(<28>褦<EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD>)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD><E9A1BC><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD>롥
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD><E9A1BC><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD>(<28>褦<EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD>)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD><E9A1BC><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD>롥
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѤǤ<EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD>ǽ(<28>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD>Ѱդ<D1B0><D5A4>Ƥ<EFBFBD><C6A4>뤬<EFBFBD><EBA4AC><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥʤ<C6A4><CAA4>ä<EFBFBD><C3A4>ꡤ
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѤǤ<EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD>ǽ(<28>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD>Ѱդ<D1B0><D5A4>Ƥ<EFBFBD><C6A4>뤬<EFBFBD><EBA4AC><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥʤ<C6A4><CAA4>ä<EFBFBD><C3A4>ꡤ
|
||||||
@@ -206,9 +206,48 @@ smac
|
|||||||
<EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>START<EFBFBD>ܥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>롥
|
<EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>START<EFBFBD>ܥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>롥
|
||||||
<EFBFBD><EFBFBD>p <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD>ɽ<EFBFBD><C9BD>/<2F><>ɽ<EFBFBD><C9BD><EFBFBD>⡼<EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD>ؤ<EFBFBD><D8A4>롥
|
<EFBFBD><EFBFBD>p <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD>ɽ<EFBFBD><C9BD>/<2F><>ɽ<EFBFBD><C9BD><EFBFBD>⡼<EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD>ؤ<EFBFBD><D8A4>롥
|
||||||
(<28><>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>̤ؤ<CCA4><D8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD>®)
|
(<28><>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>̤ؤ<CCA4><D8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD>®)
|
||||||
|
<EFBFBD><EFBFBD>F1 <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD>LCD<43><44><EFBFBD>顼<EFBFBD>ޥåפΥǡ<CEA5><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>Ϥ<EFBFBD><CFA4>롥
|
||||||
|
<EFBFBD><EFBFBD>F2 <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD><C8A1>ѥ<EFBFBD><D1A5>åȤΥǡ<CEA5><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>Ϥ<EFBFBD><CFA4>롥
|
||||||
|
<EFBFBD><EFBFBD>F3 <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><E9A5AF><EFBFBD><EFBFBD><EFBFBD>Υǡ<CEA5><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>Ϥ<EFBFBD><CFA4>롥
|
||||||
|
<EFBFBD><EFBFBD>F4 <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ץ饤<D7A5>ȤΥǡ<CEA5><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>Ϥ<EFBFBD><CFA4>롥
|
||||||
|
|
||||||
ɸ<EFBFBD><EFBFBD><EFBFBD>ǤϤʤˤ<EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƤФ<EFBFBD><EFBFBD>뤿<EFBFBD>Ӥ˲<EFBFBD><EFBFBD>̤κ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᡤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>®<EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD>
|
ɸ<EFBFBD><EFBFBD><EFBFBD>ǤϤʤˤ<EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƤФ<EFBFBD><EFBFBD>뤿<EFBFBD>Ӥ˲<EFBFBD><EFBFBD>̤κ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᡤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>®<EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
<EFBFBD><EFBFBD><EFBFBD>Τ褦<EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD>⡼<EFBFBD>ɤˤ<EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ʲ<EFBFBD><EFBFBD>Τ褦<EFBFBD>ʤ<EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>äƤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>®<EFBFBD>ˤʤ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
for (y = 0; y < 32; y++)
|
||||||
|
for (x = 0; x < 32; x++) {
|
||||||
|
screen_fill_char(0, x, y, 1, 1, 0x0000); /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>褵<EFBFBD><E8A4B5><EFBFBD><EFBFBD> */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>Τ褦<EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>p <20><EFBFBD><F2B2A1A4><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>⡼<EFBFBD>ɤˤ<C9A4><CBA4>ơ<EFBFBD><C6A1>롼<EFBFBD><EFBFBD><D7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4><EFBFBD>
|
||||||
|
<EFBFBD>Ƥ<EFBFBD> p <20><EFBFBD><F2B2A1A4><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>⡼<EFBFBD>ɤ<EFBFBD><C9A4>ᤷ<EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
F1 <20><> F2 <20><EFBFBD><F2B2A1A4>ȡ<EFBFBD><C8A1>ǡ<EFBFBD><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD>ΤǤ<CEA4><C7A4><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><C9B8><EFBFBD>ǤϤ<C7A4><CFA4><EFBFBD>¾<EFBFBD>ˤ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤˽<EFBFBD><EFBFBD>Ϥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τǡ<EFBFBD><EFBFBD>դĤ<EFBFBD><EFBFBD><EFBFBD> F1 <20><EFBFBD><F2B2A1A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥϡ<C7A4>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>äȤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤Υ<EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ή<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>Τ褦<EFBFBD>ʤȤ<EFBFBD><EFBFBD>ϡ<EFBFBD><EFBFBD>ʲ<EFBFBD><EFBFBD>Τ褦<EFBFBD>ˤ<EFBFBD><EFBFBD>Ƶ<EFBFBD>ư<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD>Х<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD>뤷<EFBFBD><EFBFBD>
|
||||||
|
smac <20>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD>¹Է<C2B9><D4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>Τʤ顤
|
||||||
|
|
||||||
|
> smac | grep -v call
|
||||||
|
|
||||||
|
<EFBFBD>⤷<EFBFBD>⥭<EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD>10<EFBFBD>֤Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>饯<EFBFBD><EFBFBD><EFBFBD>Υǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϡ<EFBFBD>
|
||||||
|
<EFBFBD>ʲ<EFBFBD><EFBFBD>Τ褦<EFBFBD>˼¹Ԥ<EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>顤F3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B2A1A4><EFBFBD><EFBFBD>ɤ<EFBFBD><C9A4>Ǥ<EFBFBD><C7A4>礦<EFBFBD><E7A4A6>
|
||||||
|
|
||||||
|
> smac | grep "character\[10\]"
|
||||||
|
|
||||||
|
wonx <20>ϡ<EFBFBD><CFA1><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD>Ƥˡ<C6A4>grep <20>ǥե<C7A5><D5A5>륿<EFBFBD><EBA5BF><EFBFBD>Ǥ<F3A5B0A4><C7A4><EFBFBD><EFBFBD>褦<EFBFBD>ˡ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ʤ餺<EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲä<EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD>ƤӽФ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϡ<EFBFBD><EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD>ɬ<EFBFBD><EFBFBD>
|
||||||
|
"call" <20>Ȥ<EFBFBD><C8A4><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲä<C9B2><C3A4><EFBFBD><EFBFBD>Ƥޤ<C6A4><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>äơ<C3A4>grep -v call <20><><EFBFBD>̤<EFBFBD><CCA4>С<EFBFBD>
|
||||||
|
<EFBFBD>ؿ<EFBFBD><EFBFBD>ƤӽФ<EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Фʤ<EFBFBD><EFBFBD>ʤ롤<EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>褦<EFBFBD>ˤʤäƤޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
ɸ<EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤Υ<EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ФƤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τǡ<EFBFBD>grep <20>ޤ<F2A4A6A4><DEA4>Ȥ<EFBFBD><C8A4>褦<EFBFBD>ˤ<EFBFBD><CBA4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD>⤷<EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>
|
||||||
|
|
||||||
|
> smac | grep call > function_call.log
|
||||||
|
|
||||||
|
<EFBFBD>Τ褦<EFBFBD>ˤ<EFBFBD><EFBFBD>ơ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD>Τ<EFBFBD>ͭ<EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD>礦<EFBFBD><EFBFBD>
|
||||||
|
|
||||||
<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWCharacterP.h"
|
#include "WWCharacterP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -63,8 +64,6 @@ int WWCharacter_SetBitmap(WWCharacter character, unsigned char * bitmap)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int WWCharacter_GetPixel(WWCharacter character, int x, int y)
|
int WWCharacter_GetPixel(WWCharacter character, int x, int y)
|
||||||
{
|
{
|
||||||
if (character == NULL)
|
if (character == NULL)
|
||||||
@@ -105,6 +104,35 @@ int WWCharacter_SetPixel(WWCharacter character, int x, int y, int pixel)
|
|||||||
return (pixel);
|
return (pixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WWCharacter_CopyBitmap(WWCharacter dst, WWCharacter src)
|
||||||
|
{
|
||||||
|
return (WWCharacter_SetBitmap(dst, src->bitmap));
|
||||||
|
}
|
||||||
|
|
||||||
|
int WWCharacter_PrintData(WWCharacter character, FILE * f)
|
||||||
|
{
|
||||||
|
int x, y, n;
|
||||||
|
|
||||||
|
n = WWCharacter_GetNumber(character);
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
|
||||||
|
fprintf(f, "character[%d] :\tnumber = %d\n",
|
||||||
|
n, WWCharacter_GetNumber(character));
|
||||||
|
|
||||||
|
for (y = 0; y < 8; y++) {
|
||||||
|
fprintf(f, "character[%d] :\tbitmap : ", n);
|
||||||
|
for (x = 0; x < 8; x++) {
|
||||||
|
fprintf(f, "%d", WWCharacter_GetPixel(character, x, y));
|
||||||
|
}
|
||||||
|
fprintf(f, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush(f);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -24,6 +25,8 @@ WWCharacter WWCharacter_Destroy(WWCharacter character);
|
|||||||
int WWCharacter_SetBitmap(WWCharacter character, unsigned char * bitmap);
|
int WWCharacter_SetBitmap(WWCharacter character, unsigned char * bitmap);
|
||||||
int WWCharacter_GetPixel(WWCharacter character, int x, int y);
|
int WWCharacter_GetPixel(WWCharacter character, int x, int y);
|
||||||
int WWCharacter_SetPixel(WWCharacter character, int x, int y, int pixel);
|
int WWCharacter_SetPixel(WWCharacter character, int x, int y, int pixel);
|
||||||
|
int WWCharacter_CopyBitmap(WWCharacter dst, WWCharacter src);
|
||||||
|
int WWCharacter_PrintData(WWCharacter character, FILE * f);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
|||||||
17
WWColorMap.c
17
WWColorMap.c
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWColorMapP.h"
|
#include "WWColorMapP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -63,6 +64,22 @@ int WWColorMap_SetLCDColor(WWColorMap color_map, int color, int lcd_color)
|
|||||||
return (color_map->lcd_color[color] = lcd_color);
|
return (color_map->lcd_color[color] = lcd_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WWColorMap_PrintData(WWColorMap c, FILE * f)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
|
||||||
|
for (i = 0; i < 8; i++) {
|
||||||
|
fprintf(f, "colormap :\tcolor[%d] = %d\n",
|
||||||
|
i, WWColorMap_GetLCDColor(c, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush(f);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -23,6 +24,7 @@ int * WWColorMap_GetLCDColors(WWColorMap color_map, int * lcd_colors);
|
|||||||
int WWColorMap_SetLCDColors(WWColorMap color_map, int * lcd_colors);
|
int WWColorMap_SetLCDColors(WWColorMap color_map, int * lcd_colors);
|
||||||
int WWColorMap_GetLCDColor(WWColorMap color_map, int color);
|
int WWColorMap_GetLCDColor(WWColorMap color_map, int color);
|
||||||
int WWColorMap_SetLCDColor(WWColorMap color_map, int color, int lcd_color);
|
int WWColorMap_SetLCDColor(WWColorMap color_map, int color, int lcd_color);
|
||||||
|
int WWColorMap_PrintData(WWColorMap c, FILE * f);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
|||||||
134
WWDisplay.c
134
WWDisplay.c
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWDisplayP.h"
|
#include "WWDisplayP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -24,6 +25,15 @@ int WWDisplay_GetSpriteEnable(WWDisplay d) { return (d->sprite_enable); }
|
|||||||
int WWDisplay_GetSpriteWindowEnable(WWDisplay d)
|
int WWDisplay_GetSpriteWindowEnable(WWDisplay d)
|
||||||
{ return (d->sprite_window_enable); }
|
{ return (d->sprite_window_enable); }
|
||||||
|
|
||||||
|
int WWDisplay_GetSpriteWindowX(WWDisplay d)
|
||||||
|
{ return (d->sprite_window_x); }
|
||||||
|
int WWDisplay_GetSpriteWindowY(WWDisplay d)
|
||||||
|
{ return (d->sprite_window_y); }
|
||||||
|
int WWDisplay_GetSpriteWindowWidth(WWDisplay d)
|
||||||
|
{ return (d->sprite_window_width); }
|
||||||
|
int WWDisplay_GetSpriteWindowHeight(WWDisplay d)
|
||||||
|
{ return (d->sprite_window_height); }
|
||||||
|
|
||||||
int WWDisplay_GetBorder(WWDisplay d) { return (d->border); }
|
int WWDisplay_GetBorder(WWDisplay d) { return (d->border); }
|
||||||
|
|
||||||
int WWDisplay_GetForegroundColor(WWDisplay d) { return (d->foreground_color); }
|
int WWDisplay_GetForegroundColor(WWDisplay d) { return (d->foreground_color); }
|
||||||
@@ -54,6 +64,15 @@ int WWDisplay_SetSpriteEnable(WWDisplay d, int f)
|
|||||||
int WWDisplay_SetSpriteWindowEnable(WWDisplay d, int f)
|
int WWDisplay_SetSpriteWindowEnable(WWDisplay d, int f)
|
||||||
{ return (d->sprite_window_enable = f); }
|
{ return (d->sprite_window_enable = f); }
|
||||||
|
|
||||||
|
int WWDisplay_SetSpriteWindowX(WWDisplay d, int n)
|
||||||
|
{ return (d->sprite_window_x = n); }
|
||||||
|
int WWDisplay_SetSpriteWindowY(WWDisplay d, int n)
|
||||||
|
{ return (d->sprite_window_y = n); }
|
||||||
|
int WWDisplay_SetSpriteWindowWidth(WWDisplay d, int n)
|
||||||
|
{ return (d->sprite_window_width = n); }
|
||||||
|
int WWDisplay_SetSpriteWindowHeight(WWDisplay d, int n)
|
||||||
|
{ return (d->sprite_window_height = n); }
|
||||||
|
|
||||||
int WWDisplay_SetBorder(WWDisplay d, int b) { return (d->border = b); }
|
int WWDisplay_SetBorder(WWDisplay d, int b) { return (d->border = b); }
|
||||||
|
|
||||||
int WWDisplay_SetForegroundColor(WWDisplay d, int c)
|
int WWDisplay_SetForegroundColor(WWDisplay d, int c)
|
||||||
@@ -112,6 +131,11 @@ WWDisplay WWDisplay_Create(int lcd_panel_width, int lcd_panel_height,
|
|||||||
WWDisplay_SetSpriteEnable(display, 0);
|
WWDisplay_SetSpriteEnable(display, 0);
|
||||||
WWDisplay_SetSpriteWindowEnable(display, 0);
|
WWDisplay_SetSpriteWindowEnable(display, 0);
|
||||||
|
|
||||||
|
WWDisplay_SetSpriteWindowX( display, 0);
|
||||||
|
WWDisplay_SetSpriteWindowY( display, 0);
|
||||||
|
WWDisplay_SetSpriteWindowWidth( display, lcd_panel_width);
|
||||||
|
WWDisplay_SetSpriteWindowHeight(display, lcd_panel_height);
|
||||||
|
|
||||||
WWDisplay_SetBorder(display, 0);
|
WWDisplay_SetBorder(display, 0);
|
||||||
|
|
||||||
WWDisplay_SetForegroundColor(display, 3);
|
WWDisplay_SetForegroundColor(display, 3);
|
||||||
@@ -180,7 +204,7 @@ static int WWDisplay_DrawScreen(WWDisplay display, WWScreen screen)
|
|||||||
|
|
||||||
int pixel;
|
int pixel;
|
||||||
int x, y, px, py;
|
int x, y, px, py;
|
||||||
int sx, sy, ex, ey;
|
int sx = 0, sy = 0, ex = 0, ey = 0;
|
||||||
int mode;
|
int mode;
|
||||||
|
|
||||||
if (!WWScreen_GetEnable(screen)) return (0);
|
if (!WWScreen_GetEnable(screen)) return (0);
|
||||||
@@ -193,8 +217,25 @@ static int WWDisplay_DrawScreen(WWDisplay display, WWScreen screen)
|
|||||||
(WWScreen_GetMode(screen) == WWSCREEN_OUTSIDE_ONLY) ) {
|
(WWScreen_GetMode(screen) == WWSCREEN_OUTSIDE_ONLY) ) {
|
||||||
sx = WWScreen_GetDrawX(screen);
|
sx = WWScreen_GetDrawX(screen);
|
||||||
sy = WWScreen_GetDrawX(screen);
|
sy = WWScreen_GetDrawX(screen);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20>ޥ˥奢<CBA5><E5A5A2><EFBFBD><EFBFBD> screen2_set_window() <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϡ<CBA4>ɽ<EFBFBD><C9BD><EFBFBD>ΰ<EFBFBD><CEB0>β<EFBFBD><CEB2><EFBFBD><EFBFBD>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD>פ<EFBFBD>
|
||||||
|
* <20>Ƥ<F1A4A4A4><C6A4>뤬<EFBFBD><EBA4AC><EFBFBD>ºݤˤϡ<CBA4>ɽ<EFBFBD><C9BD><EFBFBD>ΰ<EFBFBD><CEB0>β<EFBFBD><CEB2><EFBFBD>+1<>Ƚ<EFBFBD><C8BD><EFBFBD>+1<>פ<EFBFBD>ư<EFBFBD><EFBFBD><EEA4B9>
|
||||||
|
* <20>ߤ<EFBFBD><DFA4><EFBFBD><EFBFBD><EFBFBD>(̤<><CCA4>ǧ)<29>ʤΤǡ<CEA4>-1 <20><><EFBFBD>ʤ<EFBFBD><CAA4>Ƥ褤<C6A4><E8A4A4>
|
||||||
|
* <20>⤷<EFBFBD><E2A4B7><EFBFBD>ϡ<EFBFBD>WonderWitch <20>Ǥμºݤ<C2BA>ư<EFBFBD><C6B0><EFBFBD>ϡ<EFBFBD>
|
||||||
|
* ex = sx + WWScreen_GetDrawWidth( screen);
|
||||||
|
* <20>Ǥʤ<C7A4>
|
||||||
|
* ex = WWScreen_GetDrawWidth( screen);
|
||||||
|
* <20>ʤΤ<CAA4><CEA4>⤷<EFBFBD><E2A4B7><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
ex = sx + WWScreen_GetDrawWidth( screen) - 1;
|
ex = sx + WWScreen_GetDrawWidth( screen) - 1;
|
||||||
ey = sy + WWScreen_GetDrawHeight(screen) - 1;
|
ey = sy + WWScreen_GetDrawHeight(screen) - 1;
|
||||||
|
#else
|
||||||
|
ex = sx + WWScreen_GetDrawWidth( screen);
|
||||||
|
ey = sy + WWScreen_GetDrawHeight(screen);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
mode = WWScreen_GetMode(screen);
|
mode = WWScreen_GetMode(screen);
|
||||||
@@ -203,15 +244,17 @@ static int WWDisplay_DrawScreen(WWDisplay display, WWScreen screen)
|
|||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ۤ<EFBFBD><DBA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ۤ<EFBFBD><DBA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
|
||||||
for (y = 0; y < lcd_panel_height; y++) {
|
for (y = 0; y < lcd_panel_height; y++) {
|
||||||
|
|
||||||
|
if (mode == WWSCREEN_INSIDE_ONLY) {
|
||||||
|
if (y > ey) { break; }
|
||||||
|
if (y < sy) { y = sy - 1; continue; }
|
||||||
|
}
|
||||||
|
|
||||||
|
py = y + WWScreen_GetRollY(screen);
|
||||||
|
|
||||||
for (x = 0; x < lcd_panel_width; x++) {
|
for (x = 0; x < lcd_panel_width; x++) {
|
||||||
px = x + WWScreen_GetRollX(screen);
|
|
||||||
py = y + WWScreen_GetRollY(screen);
|
|
||||||
|
|
||||||
if (mode == WWSCREEN_INSIDE_ONLY) {
|
if (mode == WWSCREEN_INSIDE_ONLY) {
|
||||||
if (y > ey) {
|
|
||||||
x = lcd_panel_width - 1; y = lcd_panel_height - 1; continue;
|
|
||||||
}
|
|
||||||
if (y < sy) { x = lcd_panel_width - 1; y = sy - 1; continue; }
|
|
||||||
if (x > ex) { x = lcd_panel_width - 1; continue; }
|
if (x > ex) { x = lcd_panel_width - 1; continue; }
|
||||||
if (x < sx) { x = sx - 1; continue; }
|
if (x < sx) { x = sx - 1; continue; }
|
||||||
} else if (mode == WWSCREEN_OUTSIDE_ONLY) {
|
} else if (mode == WWSCREEN_OUTSIDE_ONLY) {
|
||||||
@@ -221,6 +264,8 @@ static int WWDisplay_DrawScreen(WWDisplay display, WWScreen screen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
px = x + WWScreen_GetRollX(screen);
|
||||||
|
|
||||||
pixel = WWScreen_GetPixel(screen, px, py);
|
pixel = WWScreen_GetPixel(screen, px, py);
|
||||||
|
|
||||||
/* Ʃ<><C6A9><EFBFBD><EFBFBD><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> */
|
/* Ʃ<><C6A9><EFBFBD><EFBFBD><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> */
|
||||||
@@ -236,8 +281,21 @@ static int WWDisplay_DrawScreen(WWDisplay display, WWScreen screen)
|
|||||||
|
|
||||||
static int WWDisplay_DrawSprite(WWDisplay display, WWSprite sprite)
|
static int WWDisplay_DrawSprite(WWDisplay display, WWSprite sprite)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y, lcd_x, lcd_y;
|
||||||
int pixel;
|
int sx, sy, ex, ey;
|
||||||
|
int pixel, outside;
|
||||||
|
|
||||||
|
sx = WWDisplay_GetSpriteWindowX(display) - 1;
|
||||||
|
sy = WWDisplay_GetSpriteWindowY(display) - 1;
|
||||||
|
|
||||||
|
/* <20>ʲ<EFBFBD><CAB2><EFBFBD> WWDisplay_DrawScreen() <20>˹<EFBFBD><CBB9>碌<EFBFBD><EFA4BB> */
|
||||||
|
#if 0
|
||||||
|
ex = sx + WWDisplay_GetSpriteWindowWidth(display) - 1;
|
||||||
|
ey = sy + WWDisplay_GetSpriteWindowHeight(display) - 1;
|
||||||
|
#else
|
||||||
|
ex = sx + WWDisplay_GetSpriteWindowWidth(display);
|
||||||
|
ey = sy + WWDisplay_GetSpriteWindowHeight(display);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (y = 0; y < 8; y++) {
|
for (y = 0; y < 8; y++) {
|
||||||
for (x = 0; x < 8; x++) {
|
for (x = 0; x < 8; x++) {
|
||||||
@@ -246,11 +304,24 @@ static int WWDisplay_DrawSprite(WWDisplay display, WWSprite sprite)
|
|||||||
/* Ʃ<><C6A9><EFBFBD><EFBFBD><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> */
|
/* Ʃ<><C6A9><EFBFBD><EFBFBD><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> */
|
||||||
if (pixel == -1) continue;
|
if (pixel == -1) continue;
|
||||||
|
|
||||||
|
lcd_x = WWSprite_GetX(sprite) + x;
|
||||||
|
lcd_y = WWSprite_GetY(sprite) + y;
|
||||||
|
|
||||||
|
if (WWDisplay_GetSpriteWindowEnable(display)) {
|
||||||
|
if ( (lcd_x < sx) || (lcd_y < sy) || (lcd_x > ex) || (lcd_y > ey) )
|
||||||
|
outside = 1;
|
||||||
|
else
|
||||||
|
outside = 0;
|
||||||
|
|
||||||
|
if (WWSprite_GetClipping(sprite)) { /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5>γ<EFBFBD>¦<EFBFBD><C2A6>ʬ<EFBFBD><CAAC>ɽ<EFBFBD><C9BD> */
|
||||||
|
if (!outside) continue;
|
||||||
|
} else { /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD><EFBFBD><EFBFBD>¦<EFBFBD><C2A6>ʬ<EFBFBD><CAAC>ɽ<EFBFBD><C9BD> */
|
||||||
|
if (outside) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pixel = WWColorMap_GetLCDColor(WWDisplay_GetColorMap(display), pixel);
|
pixel = WWColorMap_GetLCDColor(WWDisplay_GetColorMap(display), pixel);
|
||||||
WWLCDPanel_SetPixel(WWDisplay_GetLCDPanel(display),
|
WWLCDPanel_SetPixel(WWDisplay_GetLCDPanel(display), lcd_x, lcd_y, pixel);
|
||||||
WWSprite_GetX(sprite) + x,
|
|
||||||
WWSprite_GetY(sprite) + y,
|
|
||||||
pixel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +331,6 @@ static int WWDisplay_DrawSprite(WWDisplay display, WWSprite sprite)
|
|||||||
int WWDisplay_DrawLCDPanel(WWDisplay display)
|
int WWDisplay_DrawLCDPanel(WWDisplay display)
|
||||||
{
|
{
|
||||||
WWLCDPanel lcd_panel;
|
WWLCDPanel lcd_panel;
|
||||||
WWScreen screen;
|
|
||||||
int x, y, i;
|
int x, y, i;
|
||||||
int lcd_panel_width;
|
int lcd_panel_width;
|
||||||
int lcd_panel_height;
|
int lcd_panel_height;
|
||||||
@@ -269,7 +339,7 @@ int WWDisplay_DrawLCDPanel(WWDisplay display)
|
|||||||
WWSprite sprite;
|
WWSprite sprite;
|
||||||
|
|
||||||
lcd_panel = WWDisplay_GetLCDPanel(display);
|
lcd_panel = WWDisplay_GetLCDPanel(display);
|
||||||
lcd_panel_width = WWLCDPanel_GetWidth(lcd_panel);
|
lcd_panel_width = WWLCDPanel_GetWidth( lcd_panel);
|
||||||
lcd_panel_height = WWLCDPanel_GetHeight(lcd_panel);
|
lcd_panel_height = WWLCDPanel_GetHeight(lcd_panel);
|
||||||
color_map = WWDisplay_GetColorMap(display);
|
color_map = WWDisplay_GetColorMap(display);
|
||||||
border = WWDisplay_GetBorder(display);
|
border = WWDisplay_GetBorder(display);
|
||||||
@@ -286,11 +356,14 @@ int WWDisplay_DrawLCDPanel(WWDisplay display)
|
|||||||
WWDisplay_DrawScreen(display, WWDisplay_GetScreen(display, 0));
|
WWDisplay_DrawScreen(display, WWDisplay_GetScreen(display, 0));
|
||||||
|
|
||||||
/* <20><><EFBFBD>ץ饤<D7A5><E9A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3B2A4><EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD>Ǥʤ<C7A4><CAA4><EFBFBD><EFBFBD><EFBFBD>) */
|
/* <20><><EFBFBD>ץ饤<D7A5><E9A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3B2A4><EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD>Ǥʤ<C7A4><CAA4><EFBFBD><EFBFBD><EFBFBD>) */
|
||||||
for (i = 0; i < WWDisplay_GetSpriteCount(display); i++) {
|
/* <20>Ťʤä<CAA4><C3A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD><CFA1>ֹ<EFBFBD><D6B9>μ㤤<CEBC><E3A4A4><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
sprite = WWDisplay_GetSprite(display,
|
if (WWDisplay_GetSpriteEnable(display)) {
|
||||||
i + WWDisplay_GetSpriteStart(display));
|
for (i = WWDisplay_GetSpriteCount(display) - 1; i >= 0; i--) {
|
||||||
if (!WWSprite_GetPriority(sprite)) {
|
sprite = WWDisplay_GetSprite(display,
|
||||||
WWDisplay_DrawSprite(display, sprite);
|
i + WWDisplay_GetSpriteStart(display));
|
||||||
|
if (!WWSprite_GetPriority(sprite)) {
|
||||||
|
WWDisplay_DrawSprite(display, sprite);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,22 +371,17 @@ int WWDisplay_DrawLCDPanel(WWDisplay display)
|
|||||||
WWDisplay_DrawScreen(display, WWDisplay_GetScreen(display, 1));
|
WWDisplay_DrawScreen(display, WWDisplay_GetScreen(display, 1));
|
||||||
|
|
||||||
/* <20><><EFBFBD>ץ饤<D7A5><E9A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3B2A4><EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD>) */
|
/* <20><><EFBFBD>ץ饤<D7A5><E9A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3B2A4><EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD>) */
|
||||||
for (i = 0; i < WWDisplay_GetSpriteCount(display); i++) {
|
/* <20>Ťʤä<CAA4><C3A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD><CFA1>ֹ<EFBFBD><D6B9>μ㤤<CEBC><E3A4A4><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
sprite = WWDisplay_GetSprite(display,
|
if (WWDisplay_GetSpriteEnable(display)) {
|
||||||
i + WWDisplay_GetSpriteStart(display));
|
for (i = WWDisplay_GetSpriteCount(display) - 1; i >= 0; i--) {
|
||||||
if (WWSprite_GetPriority(sprite)) {
|
sprite = WWDisplay_GetSprite(display,
|
||||||
WWDisplay_DrawSprite(display, sprite);
|
i + WWDisplay_GetSpriteStart(display));
|
||||||
|
if (WWSprite_GetPriority(sprite)) {
|
||||||
|
WWDisplay_DrawSprite(display, sprite);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
for (x = 0; x < lcd_panel_width; x++) {
|
|
||||||
for (y = 0; y < lcd_panel_height; y++) {
|
|
||||||
printf("%d", WWLCDPanel_GetPixel(lcd_panel, x, y));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
WWDisplay.h
10
WWDisplay.h
@@ -35,6 +35,11 @@ WWLCDPanel WWDisplay_GetLCDPanel(WWDisplay d);
|
|||||||
int WWDisplay_GetSpriteEnable(WWDisplay d);
|
int WWDisplay_GetSpriteEnable(WWDisplay d);
|
||||||
int WWDisplay_GetSpriteWindowEnable(WWDisplay d);
|
int WWDisplay_GetSpriteWindowEnable(WWDisplay d);
|
||||||
|
|
||||||
|
int WWDisplay_GetSpriteWindowX(WWDisplay d);
|
||||||
|
int WWDisplay_GetSpriteWindowY(WWDisplay d);
|
||||||
|
int WWDisplay_GetSpriteWindowWidth(WWDisplay d);
|
||||||
|
int WWDisplay_GetSpriteWindowHeight(WWDisplay d);
|
||||||
|
|
||||||
int WWDisplay_GetBorder(WWDisplay d);
|
int WWDisplay_GetBorder(WWDisplay d);
|
||||||
|
|
||||||
int WWDisplay_GetForegroundColor(WWDisplay d);
|
int WWDisplay_GetForegroundColor(WWDisplay d);
|
||||||
@@ -57,6 +62,11 @@ WWLCDPanel WWDisplay_SetLCDPanel(WWDisplay d, WWLCDPanel p);
|
|||||||
int WWDisplay_SetSpriteEnable(WWDisplay d, int f);
|
int WWDisplay_SetSpriteEnable(WWDisplay d, int f);
|
||||||
int WWDisplay_SetSpriteWindowEnable(WWDisplay d, int f);
|
int WWDisplay_SetSpriteWindowEnable(WWDisplay d, int f);
|
||||||
|
|
||||||
|
int WWDisplay_SetSpriteWindowX(WWDisplay d, int n);
|
||||||
|
int WWDisplay_SetSpriteWindowY(WWDisplay d, int n);
|
||||||
|
int WWDisplay_SetSpriteWindowWidth(WWDisplay d, int n);
|
||||||
|
int WWDisplay_SetSpriteWindowHeight(WWDisplay d, int n);
|
||||||
|
|
||||||
int WWDisplay_SetBorder(WWDisplay d, int b);
|
int WWDisplay_SetBorder(WWDisplay d, int b);
|
||||||
|
|
||||||
int WWDisplay_SetForegroundColor(WWDisplay d, int c);
|
int WWDisplay_SetForegroundColor(WWDisplay d, int c);
|
||||||
|
|||||||
@@ -21,8 +21,12 @@ typedef struct _WWDisplay {
|
|||||||
WWLCDPanel lcd_panel;
|
WWLCDPanel lcd_panel;
|
||||||
|
|
||||||
/* <20>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ץ쥤<D7A5><ECA5A4>°<EFBFBD><C2B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ץ쥤<D7A5><ECA5A4>°<EFBFBD><C2B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
int sprite_enable; /* <20><><EFBFBD>ץ饤<D7A5><E9A5A4>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD><CDA1>֥<EFBFBD><D6A5>ե饰 */
|
int sprite_enable; /* <20><><EFBFBD>ץ饤<D7A5><E9A5A4>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD><CDA1>֥<EFBFBD><D6A5>ե饰 */
|
||||||
int sprite_window_enable; /* <20><><EFBFBD>ץ饤<D7A5>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD>͡<EFBFBD><CDA1>֥<EFBFBD><D6A5>ե饰 */
|
int sprite_window_enable; /* <20><><EFBFBD>ץ饤<D7A5>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD>͡<EFBFBD><CDA1>֥<EFBFBD><D6A5>ե饰 */
|
||||||
|
int sprite_window_x; /* <20><><EFBFBD>ץ饤<D7A5>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD> */
|
||||||
|
int sprite_window_y; /* <20><><EFBFBD>ץ饤<D7A5>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD> */
|
||||||
|
int sprite_window_width; /* <20><><EFBFBD>ץ饤<D7A5>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD> */
|
||||||
|
int sprite_window_height; /* <20><><EFBFBD>ץ饤<D7A5>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD> */
|
||||||
|
|
||||||
int border; /* <20>ܡ<EFBFBD><DCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD><E9A1BC>0<EFBFBD><30>7<EFBFBD>Υ<EFBFBD><CEA5>顼<EFBFBD>ޥå<DEA5><C3A5>ֹ<EFBFBD> */
|
int border; /* <20>ܡ<EFBFBD><DCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>顼<EFBFBD><E9A1BC>0<EFBFBD><30>7<EFBFBD>Υ<EFBFBD><CEA5>顼<EFBFBD>ޥå<DEA5><C3A5>ֹ<EFBFBD> */
|
||||||
|
|
||||||
|
|||||||
82
WWLCDPanel.c
82
WWLCDPanel.c
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWLCDPanelP.h"
|
#include "WWLCDPanelP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -13,58 +14,95 @@ int WWLCDPanel_GetHeight(WWLCDPanel p) { return (p->height); }
|
|||||||
int WWLCDPanel_SetWidth( WWLCDPanel p, int n) { return (p->width = n); }
|
int WWLCDPanel_SetWidth( WWLCDPanel p, int n) { return (p->width = n); }
|
||||||
int WWLCDPanel_SetHeight(WWLCDPanel p, int n) { return (p->height = n); }
|
int WWLCDPanel_SetHeight(WWLCDPanel p, int n) { return (p->height = n); }
|
||||||
|
|
||||||
unsigned char * WWLCDPanel_GetPixelMap(WWLCDPanel p) { return (p->pixel); }
|
int WWLCDPanel_ResetCurrent(WWLCDPanel p)
|
||||||
|
{
|
||||||
|
return (p->current = 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int WWLCDPanel_ReverseCurrent(WWLCDPanel p)
|
||||||
|
{
|
||||||
|
return (p->current = 1 - p->current);
|
||||||
|
}
|
||||||
|
|
||||||
|
int WWLCDPanel_ResetAllDraw(WWLCDPanel p) { return (p->all_draw = 0); }
|
||||||
|
int WWLCDPanel_SetAllDraw(WWLCDPanel p) { return (p->all_draw = 1); }
|
||||||
|
int WWLCDPanel_IsAllDraw(WWLCDPanel p) { return (p->all_draw); }
|
||||||
|
|
||||||
|
unsigned char * WWLCDPanel_GetPixelMap(WWLCDPanel p)
|
||||||
|
{
|
||||||
|
return (p->pixel[p->current]);
|
||||||
|
}
|
||||||
|
|
||||||
/* LCD<43>ϣ<EFBFBD><CFA3>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD>16<31><36>(<28><><EFBFBD>ӥå<D3A5>ɬ<EFBFBD><C9AC>) */
|
/* LCD<43>ϣ<EFBFBD><CFA3>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD>16<31><36>(<28><><EFBFBD>ӥå<D3A5>ɬ<EFBFBD><C9AC>) */
|
||||||
int WWLCDPanel_GetPixel(WWLCDPanel lcd_panel, int x, int y)
|
static int WWLCDPanel_GetPixelByCurrent(WWLCDPanel lcd_panel, int current,
|
||||||
|
int x, int y)
|
||||||
{
|
{
|
||||||
unsigned char pixel;
|
unsigned char pixel;
|
||||||
|
|
||||||
if ( (x < 0) || (x > WWLCDPanel_GetWidth(lcd_panel) - 1) ||
|
if ( (x < 0) || (x > WWLCDPanel_GetWidth( lcd_panel) - 1) ||
|
||||||
(y < 0) || (y > WWLCDPanel_GetHeight(lcd_panel) - 1) )
|
(y < 0) || (y > WWLCDPanel_GetHeight(lcd_panel) - 1) )
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
pixel = lcd_panel->pixel[y * (WWLCDPanel_GetWidth(lcd_panel) / 2) + x / 2];
|
pixel = lcd_panel->pixel[current][y * WWLCDPanel_GetWidth(lcd_panel) + x];
|
||||||
if (x % 2) pixel = pixel >> 4;
|
|
||||||
pixel &= 0x0f;
|
pixel &= 0x0f;
|
||||||
return ((int)pixel);
|
return ((int)pixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int WWLCDPanel_GetOldPixel(WWLCDPanel lcd_panel, int x, int y)
|
||||||
|
{
|
||||||
|
return (WWLCDPanel_GetPixelByCurrent(lcd_panel, 1 - lcd_panel->current, x, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
int WWLCDPanel_GetPixel(WWLCDPanel lcd_panel, int x, int y)
|
||||||
|
{
|
||||||
|
return (WWLCDPanel_GetPixelByCurrent(lcd_panel, lcd_panel->current, x, y));
|
||||||
|
}
|
||||||
|
|
||||||
int WWLCDPanel_SetPixel(WWLCDPanel lcd_panel, int x, int y, int pixel)
|
int WWLCDPanel_SetPixel(WWLCDPanel lcd_panel, int x, int y, int pixel)
|
||||||
{
|
{
|
||||||
unsigned char p;
|
unsigned char p;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if ( (x < 0) || (x > WWLCDPanel_GetWidth(lcd_panel) - 1) ||
|
if ( (x < 0) || (x > WWLCDPanel_GetWidth( lcd_panel) - 1) ||
|
||||||
(y < 0) || (y > WWLCDPanel_GetHeight(lcd_panel) - 1) )
|
(y < 0) || (y > WWLCDPanel_GetHeight(lcd_panel) - 1) )
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
p = 0x0f;
|
|
||||||
if (x % 2) p = p << 4;
|
|
||||||
n = y * (WWLCDPanel_GetWidth(lcd_panel) / 2) + x / 2;
|
|
||||||
lcd_panel->pixel[n] &= ~p;
|
|
||||||
|
|
||||||
p = ((unsigned char)pixel) & 0x0f;
|
p = ((unsigned char)pixel) & 0x0f;
|
||||||
if (x % 2) p = p << 4;
|
n = y * WWLCDPanel_GetWidth(lcd_panel) + x;
|
||||||
lcd_panel->pixel[n] |= p;
|
lcd_panel->pixel[lcd_panel->current][n] = p;
|
||||||
|
|
||||||
return (pixel);
|
return (pixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WWLCDPanel_IsPixelChanged(WWLCDPanel lcd_panel, int x, int y)
|
||||||
|
{
|
||||||
|
int old_pixel;
|
||||||
|
int current_pixel;
|
||||||
|
|
||||||
|
if (WWLCDPanel_IsAllDraw(lcd_panel)) return (1);
|
||||||
|
old_pixel = WWLCDPanel_GetOldPixel(lcd_panel, x, y);
|
||||||
|
current_pixel = WWLCDPanel_GetPixel(lcd_panel, x, y);
|
||||||
|
|
||||||
|
return (!(old_pixel == current_pixel));
|
||||||
|
}
|
||||||
|
|
||||||
WWLCDPanel WWLCDPanel_Create(int width, int height)
|
WWLCDPanel WWLCDPanel_Create(int width, int height)
|
||||||
{
|
{
|
||||||
WWLCDPanel lcd_panel;
|
WWLCDPanel lcd_panel;
|
||||||
int x, y;
|
int x, y, i;
|
||||||
|
|
||||||
lcd_panel = (WWLCDPanel)malloc(sizeof(_WWLCDPanel));
|
lcd_panel = (WWLCDPanel)malloc(sizeof(_WWLCDPanel));
|
||||||
if (lcd_panel == NULL) Error("WWLCDPanel_Create", "Cannot allocate memory.");
|
if (lcd_panel == NULL) Error("WWLCDPanel_Create", "Cannot allocate memory.");
|
||||||
|
|
||||||
WWLCDPanel_SetWidth( lcd_panel, width);
|
WWLCDPanel_SetWidth( lcd_panel, width);
|
||||||
WWLCDPanel_SetHeight(lcd_panel, height);
|
WWLCDPanel_SetHeight(lcd_panel, height);
|
||||||
lcd_panel->pixel =
|
|
||||||
(unsigned char *)malloc(sizeof(unsigned char) *
|
for (i = 0; i < 2; i++) {
|
||||||
(WWLCDPanel_GetWidth(lcd_panel) / 2) *
|
lcd_panel->pixel[i] =
|
||||||
WWLCDPanel_GetHeight(lcd_panel));
|
(unsigned char *)malloc(sizeof(unsigned char) *
|
||||||
|
WWLCDPanel_GetWidth(lcd_panel) *
|
||||||
|
WWLCDPanel_GetHeight(lcd_panel));
|
||||||
|
}
|
||||||
|
|
||||||
for (y = 0; y < lcd_panel->height; y++) {
|
for (y = 0; y < lcd_panel->height; y++) {
|
||||||
for (x = 0; x < lcd_panel->width / 2; x++) {
|
for (x = 0; x < lcd_panel->width / 2; x++) {
|
||||||
@@ -72,13 +110,19 @@ WWLCDPanel WWLCDPanel_Create(int width, int height)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WWLCDPanel_ResetCurrent(lcd_panel);
|
||||||
|
WWLCDPanel_SetAllDraw(lcd_panel); /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̤<EFBFBD><CCA4><EFBFBD><EFBFBD>褹<EFBFBD><E8A4B9> */
|
||||||
|
|
||||||
return (lcd_panel);
|
return (lcd_panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
WWLCDPanel WWLCDPanel_Destroy(WWLCDPanel lcd_panel)
|
WWLCDPanel WWLCDPanel_Destroy(WWLCDPanel lcd_panel)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
if (lcd_panel == NULL) return (NULL);
|
if (lcd_panel == NULL) return (NULL);
|
||||||
if (lcd_panel->pixel) free(lcd_panel->pixel);
|
for (i = 0; i < 2; i++) {
|
||||||
|
if (lcd_panel->pixel[i]) free(lcd_panel->pixel[i]);
|
||||||
|
}
|
||||||
free(lcd_panel);
|
free(lcd_panel);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,17 @@ int WWLCDPanel_GetWidth( WWLCDPanel p);
|
|||||||
int WWLCDPanel_GetHeight(WWLCDPanel p);
|
int WWLCDPanel_GetHeight(WWLCDPanel p);
|
||||||
int WWLCDPanel_SetWidth( WWLCDPanel p, int n);
|
int WWLCDPanel_SetWidth( WWLCDPanel p, int n);
|
||||||
int WWLCDPanel_SetHeight(WWLCDPanel p, int n);
|
int WWLCDPanel_SetHeight(WWLCDPanel p, int n);
|
||||||
|
|
||||||
|
int WWLCDPanel_ResetCurrent(WWLCDPanel p);
|
||||||
|
int WWLCDPanel_ReverseCurrent(WWLCDPanel p);
|
||||||
|
int WWLCDPanel_ResetAllDraw(WWLCDPanel p);
|
||||||
|
int WWLCDPanel_SetAllDraw(WWLCDPanel p);
|
||||||
|
int WWLCDPanel_IsAllDraw(WWLCDPanel p);
|
||||||
|
|
||||||
unsigned char * WWLCDPanel_GetPixelMap(WWLCDPanel p);
|
unsigned char * WWLCDPanel_GetPixelMap(WWLCDPanel p);
|
||||||
int WWLCDPanel_GetPixel(WWLCDPanel lcd_panel, int x, int y);
|
int WWLCDPanel_GetPixel(WWLCDPanel lcd_panel, int x, int y);
|
||||||
int WWLCDPanel_SetPixel(WWLCDPanel lcd_panel, int x, int y, int pixel);
|
int WWLCDPanel_SetPixel(WWLCDPanel lcd_panel, int x, int y, int pixel);
|
||||||
|
int WWLCDPanel_IsPixelChanged(WWLCDPanel lcd_panel, int x, int y);
|
||||||
WWLCDPanel WWLCDPanel_Create(int width, int height);
|
WWLCDPanel WWLCDPanel_Create(int width, int height);
|
||||||
WWLCDPanel WWLCDPanel_Destroy(WWLCDPanel lcd_panel);
|
WWLCDPanel WWLCDPanel_Destroy(WWLCDPanel lcd_panel);
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,19 @@
|
|||||||
typedef struct _WWLCDPanel {
|
typedef struct _WWLCDPanel {
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
/* 16<31><36><EFBFBD>Υ<EFBFBD><CEA5>顼<EFBFBD><E9A1BC><EFBFBD><EFBFBD><F3A1A5A3>Х<EFBFBD><D0A5>Ȥǣ<C8A4><C7A3>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD>ʬ<EFBFBD>ξ<EFBFBD><CEBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
||||||
unsigned char * pixel;
|
/* X<><58><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD><D0A4><EFBFBD><EFBFBD>٤餹<F2B8BAA4><E9A4B9><EFBFBD>ᡤ<EFBFBD>ӥåȥޥåפ<C3A5><D7A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ʬ<EFBFBD>Ͻ<CFBD><F1A4ADB4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4>褦<EFBFBD>ˤ<EFBFBD><CBA4>롥 */
|
||||||
|
/* pixel[current] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υӥåȥޥåפˤʤ롥 */
|
||||||
|
/* pixel[1 - current] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υӥåȥޥåפˤʤ롥 */
|
||||||
|
int current;
|
||||||
|
|
||||||
|
/* all_draw == 1 <20>ΤȤ<CEA4><C8A4>ϡ<EFBFBD><CFA1><EFBFBD><EFBFBD><EFBFBD>ʬ<EFBFBD><CAAC>̵<EFBFBD><CCB5><EFBFBD>Τǡ<CEA4> */
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>褹<EFBFBD>뤳<EFBFBD>Ȥ<C8A4><F2BCA8A4><EFBFBD> */
|
||||||
|
int all_draw;
|
||||||
|
|
||||||
|
/* 16<31><36><EFBFBD>Υ<EFBFBD><CEA5>顼<EFBFBD><E9A1BC><EFBFBD><EFBFBD><F3A1A5A3>Х<EFBFBD><D0A5>Ȥǣ<C8A4><C7A3>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD>ʬ<EFBFBD>ξ<EFBFBD><CEBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
unsigned char * pixel[2];
|
||||||
} _WWLCDPanel;
|
} _WWLCDPanel;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
23
WWPalette.c
23
WWPalette.c
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWPaletteP.h"
|
#include "WWPaletteP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -79,6 +80,28 @@ int WWPalette_SetMappedColor(WWPalette palette, int color, int mapped_color)
|
|||||||
return (palette->mapped_color[color] = mapped_color);
|
return (palette->mapped_color[color] = mapped_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WWPalette_PrintData(WWPalette p, FILE * f)
|
||||||
|
{
|
||||||
|
int i, n;
|
||||||
|
|
||||||
|
n = WWPalette_GetNumber(p);
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
|
||||||
|
fprintf(f, "palette[%d] :\tnumber = %d\n", n, WWPalette_GetNumber(p));
|
||||||
|
fprintf(f, "palette[%d] :\ttransparent = %s\n",
|
||||||
|
n, true_false(WWPalette_GetTransparent(p)));
|
||||||
|
|
||||||
|
for (i = 0; i < 4; i++) {
|
||||||
|
fprintf(f, "palette[%d] :\tcolor[%d] = %d\n",
|
||||||
|
n, i, WWPalette_GetMappedColor(p, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush(f);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -27,6 +28,7 @@ int * WWPalette_GetMappedColors(WWPalette palette, int * mapped_colors);
|
|||||||
int WWPalette_SetMappedColors(WWPalette palette, int * mapped_colors);
|
int WWPalette_SetMappedColors(WWPalette palette, int * mapped_colors);
|
||||||
int WWPalette_GetMappedColor(WWPalette palette, int color);
|
int WWPalette_GetMappedColor(WWPalette palette, int color);
|
||||||
int WWPalette_SetMappedColor(WWPalette palette, int color, int mapped_color);
|
int WWPalette_SetMappedColor(WWPalette palette, int color, int mapped_color);
|
||||||
|
int WWPalette_PrintData(WWPalette p, FILE * f);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
|||||||
55
WWScreen.c
55
WWScreen.c
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWScreenP.h"
|
#include "WWScreenP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -74,22 +75,60 @@ static WWScreenCharacter WWScreen_SetScreenCharacter(WWScreen s, int x, int y,
|
|||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
int WWScreen_GetHorizontal(WWScreen s, int x, int y)
|
int WWScreen_GetHorizontal(WWScreen s, int x, int y)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->horizontal); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_GetHorizontal(sc));
|
||||||
|
}
|
||||||
|
|
||||||
int WWScreen_GetVertical(WWScreen s, int x, int y)
|
int WWScreen_GetVertical(WWScreen s, int x, int y)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->vertical); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_GetVertical(sc));
|
||||||
|
}
|
||||||
|
|
||||||
WWPalette WWScreen_GetPalette(WWScreen s, int x, int y)
|
WWPalette WWScreen_GetPalette(WWScreen s, int x, int y)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->palette); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_GetPalette(sc));
|
||||||
|
}
|
||||||
|
|
||||||
WWCharacter WWScreen_GetCharacter(WWScreen s, int x, int y)
|
WWCharacter WWScreen_GetCharacter(WWScreen s, int x, int y)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->character); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_GetCharacter(sc));
|
||||||
|
}
|
||||||
|
|
||||||
int WWScreen_SetHorizontal(WWScreen s, int x, int y, int f)
|
int WWScreen_SetHorizontal(WWScreen s, int x, int y, int f)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->horizontal = f); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_SetHorizontal(sc, f));
|
||||||
|
}
|
||||||
|
|
||||||
int WWScreen_SetVertical(WWScreen s, int x, int y, int f)
|
int WWScreen_SetVertical(WWScreen s, int x, int y, int f)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->vertical = f); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_SetVertical(sc, f));
|
||||||
|
}
|
||||||
|
|
||||||
WWPalette WWScreen_SetPalette(WWScreen s, int x, int y, WWPalette palette)
|
WWPalette WWScreen_SetPalette(WWScreen s, int x, int y, WWPalette palette)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->palette = palette); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_SetPalette(sc, palette));
|
||||||
|
}
|
||||||
|
|
||||||
WWCharacter WWScreen_SetCharacter(WWScreen s, int x, int y, WWCharacter c)
|
WWCharacter WWScreen_SetCharacter(WWScreen s, int x, int y, WWCharacter c)
|
||||||
{ return (WWScreen_GetScreenCharacter(s, x, y)->character = c); }
|
{
|
||||||
|
WWScreenCharacter sc;
|
||||||
|
sc = WWScreen_GetScreenCharacter(s, x, y);
|
||||||
|
return (WWScreenCharacter_SetCharacter(sc, c));
|
||||||
|
}
|
||||||
|
|
||||||
int WWScreen_GetNumber(WWScreen s) { return (s->number); }
|
int WWScreen_GetNumber(WWScreen s) { return (s->number); }
|
||||||
int WWScreen_GetWidth( WWScreen s) { return (s->width ); }
|
int WWScreen_GetWidth( WWScreen s) { return (s->width ); }
|
||||||
|
|||||||
30
WWSprite.c
30
WWSprite.c
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WWSpriteP.h"
|
#include "WWSpriteP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -84,6 +85,35 @@ WWSprite WWSprite_Destroy(WWSprite sprite)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WWSprite_PrintData(WWSprite s, FILE * f)
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = WWSprite_GetNumber(s);
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
|
||||||
|
fprintf(f, "sprite[%d] :\tnumber = %d\n", n, WWSprite_GetNumber(s));
|
||||||
|
fprintf(f, "sprite[%d] :\thorizontal = %s\n",
|
||||||
|
n, true_false(WWSprite_GetHorizontal(s)));
|
||||||
|
fprintf(f, "sprite[%d] :\tvertical = %s\n",
|
||||||
|
n, true_false(WWSprite_GetVertical( s)));
|
||||||
|
fprintf(f, "sprite[%d] :\tpriority = %s\n",
|
||||||
|
n, true_false(WWSprite_GetPriority( s)));
|
||||||
|
fprintf(f, "sprite[%d] :\tclipping = %s\n",
|
||||||
|
n, true_false(WWSprite_GetClipping( s)));
|
||||||
|
fprintf(f, "sprite[%d] :\tpalette number = %d\n",
|
||||||
|
n, WWPalette_GetNumber(WWSprite_GetPalette(s)));
|
||||||
|
fprintf(f, "sprite[%d] :\tcharacter number = %d\n",
|
||||||
|
n, WWCharacter_GetNumber(WWSprite_GetCharacter(s)));
|
||||||
|
fprintf(f, "sprite[%d] :\tx = %d\n", n, WWSprite_GetX(s));
|
||||||
|
fprintf(f, "sprite[%d] :\ty = %d\n", n, WWSprite_GetY(s));
|
||||||
|
|
||||||
|
fflush(f);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -39,12 +39,14 @@ WWCharacter WWSprite_SetCharacter(WWSprite s, WWCharacter c);
|
|||||||
int WWSprite_GetX(WWSprite sprite);
|
int WWSprite_GetX(WWSprite sprite);
|
||||||
int WWSprite_GetY(WWSprite sprite);
|
int WWSprite_GetY(WWSprite sprite);
|
||||||
int WWSprite_SetPosition(WWSprite sprite, int x, int y);
|
int WWSprite_SetPosition(WWSprite sprite, int x, int y);
|
||||||
|
int WWSprite_GetPixel(WWSprite sprite, int x, int y);
|
||||||
|
|
||||||
WWSprite WWSprite_Create(int number, int x, int y,
|
WWSprite WWSprite_Create(int number, int x, int y,
|
||||||
int horizontal, int vertical,
|
int horizontal, int vertical,
|
||||||
int priority, int clipping,
|
int priority, int clipping,
|
||||||
WWPalette palette, WWCharacter character);
|
WWPalette palette, WWCharacter character);
|
||||||
WWSprite WWSprite_Destroy(WWSprite sprite);
|
WWSprite WWSprite_Destroy(WWSprite sprite);
|
||||||
|
int WWSprite_PrintData(WWSprite s, FILE * f);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
|||||||
161
WWText.c
Normal file
161
WWText.c
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "WWTextP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
|
/* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD>ȤΥӥåȥޥåץǡ<D7A5><C7A1><EFBFBD> */
|
||||||
|
#include "WWTextFonts.c"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>Фμ<D0A4><CEBC><EFBFBD> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
WWScreen WWText_GetScreen(WWText t) { return (t->screen); }
|
||||||
|
int WWText_GetX(WWText t) { return (t->x); }
|
||||||
|
int WWText_GetY(WWText t) { return (t->y); }
|
||||||
|
int WWText_GetWidth( WWText t) { return (t->width ); }
|
||||||
|
int WWText_GetHeight(WWText t) { return (t->height); }
|
||||||
|
int WWText_GetBase(WWText t) { return (t->base); }
|
||||||
|
WWPalette WWText_GetPalette(WWText t) { return (t->palette); }
|
||||||
|
static WWCharacter WWText_GetFont(WWText t, int n) { return (t->font[n]); }
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD><D0A4><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
WWScreen WWText_SetScreen(WWText t, WWScreen s) { return (t->screen = s); }
|
||||||
|
int WWText_SetX(WWText t, int n) { return (t->x = n); }
|
||||||
|
int WWText_SetY(WWText t, int n) { return (t->y = n); }
|
||||||
|
int WWText_SetWidth( WWText t, int n) { return (t->width = n); }
|
||||||
|
int WWText_SetHeight(WWText t, int n) { return (t->height = n); }
|
||||||
|
int WWText_SetBase(WWText t, int n) { return (t->base = n); }
|
||||||
|
WWPalette WWText_SetPalette(WWText t, WWPalette p) { return (t->palette = p); }
|
||||||
|
static WWCharacter WWText_SetFont(WWText t, int n, WWCharacter c)
|
||||||
|
{ return (t->font[n] = c); }
|
||||||
|
|
||||||
|
int WWText_SetTextWindow(WWText ww_text, int x, int y,
|
||||||
|
int width, int height, int base,
|
||||||
|
WWDisplay ww_display)
|
||||||
|
{
|
||||||
|
int tx, ty, c;
|
||||||
|
WWCharacter ww_character;
|
||||||
|
|
||||||
|
WWText_SetX(ww_text, x);
|
||||||
|
WWText_SetY(ww_text, y);
|
||||||
|
WWText_SetWidth(ww_text, width);
|
||||||
|
WWText_SetHeight(ww_text, height);
|
||||||
|
WWText_SetBase(ww_text, base);
|
||||||
|
|
||||||
|
c = WWText_GetBase(ww_text);
|
||||||
|
for (ty = 0; ty < WWText_GetHeight(ww_text); ty++) {
|
||||||
|
for (tx = 0; tx < WWText_GetWidth(ww_text); tx++) {
|
||||||
|
if (c >= 512) Error("WWText_SetTextWindow", "Over character.");
|
||||||
|
ww_character = WWDisplay_GetCharacter(ww_display, c);
|
||||||
|
WWCharacter_SetBitmap(ww_character, NULL);
|
||||||
|
WWScreen_SetCharacter(WWText_GetScreen(ww_text),
|
||||||
|
WWText_GetX(ww_text) + tx,
|
||||||
|
WWText_GetY(ww_text) + ty,
|
||||||
|
ww_character);
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int WWText_PutCharacter(WWText ww_text, int x, int y, int character,
|
||||||
|
WWDisplay ww_display)
|
||||||
|
{
|
||||||
|
WWCharacter ww_character;
|
||||||
|
|
||||||
|
if ((character < 0) || (character > 127))
|
||||||
|
Error("WWText_PutCharacter", "Character number is out of range.");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>ϡ<EFBFBD>text_window_init() <20>ǻ<EFBFBD><C7BB>ꤷ<EFBFBD><EAA4B7><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD>
|
||||||
|
* <20><>ɸ<EFBFBD>ϤǹԤ<C7B9>(<28>餷<EFBFBD><E9A4B7>)<29><>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD><EFBFBD>κ<EFBFBD><CEBA>夬(0,0)<29>ˤʤ<CBA4>)
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( (x < 0) || (x > WWText_GetWidth( ww_text) - 1) ||
|
||||||
|
(y < 0) || (y > WWText_GetHeight(ww_text) - 1) )
|
||||||
|
Error("WWText_PutCharacter", "Position is out of range.");
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
n = WWText_GetBase(ww_text) +
|
||||||
|
(x - WWText_GetX(ww_text)) +
|
||||||
|
(y - WWText_GetY(ww_text)) * WWText_GetWidth(ww_text);
|
||||||
|
ww_character = WWDisplay_GetCharacter(ww_display, n);
|
||||||
|
#else
|
||||||
|
ww_character = WWScreen_GetCharacter(WWText_GetScreen(ww_text),
|
||||||
|
WWText_GetX(ww_text) + x,
|
||||||
|
WWText_GetY(ww_text) + y);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
WWCharacter_CopyBitmap(ww_character, WWText_GetFont(ww_text, character));
|
||||||
|
|
||||||
|
/* ɽ<><C9BD><EFBFBD><EFBFBD><EFBFBD>˥ѥ<CBA5><D1A5>åȤ<C3A5><C8A4><EFBFBD><EFBFBD>ꤹ<EFBFBD><EAA4B9><EFBFBD>ΤǤ<CEA4><C7A4><EFBFBD><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||||
|
WWScreen_SetPalette(WWText_GetScreen(ww_text),
|
||||||
|
WWText_GetX(ww_text) + x,
|
||||||
|
WWText_GetY(ww_text) + y,
|
||||||
|
WWText_GetPalette(ww_text));
|
||||||
|
|
||||||
|
return (character);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* <20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦõ<C8BE> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
WWText WWText_Create(WWScreen screen,
|
||||||
|
int x, int y, int width, int height,
|
||||||
|
WWPalette palette)
|
||||||
|
{
|
||||||
|
WWText ww_text;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
ww_text = (WWText)malloc(sizeof(_WWText));
|
||||||
|
if (ww_text == NULL) Error("WWText_Create", "Cannot allocate memory.");
|
||||||
|
|
||||||
|
WWText_SetScreen(ww_text, screen);
|
||||||
|
WWText_SetX(ww_text, 0);
|
||||||
|
WWText_SetY(ww_text, 0);
|
||||||
|
WWText_SetWidth( ww_text, width );
|
||||||
|
WWText_SetHeight(ww_text, height);
|
||||||
|
WWText_SetPalette(ww_text, palette);
|
||||||
|
|
||||||
|
for (i = 0; i < 128; i++) {
|
||||||
|
WWText_SetFont(ww_text, i, WWCharacter_Create(i, &(fonts[i * 16])));
|
||||||
|
}
|
||||||
|
|
||||||
|
return (ww_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
WWText WWText_Destroy(WWText ww_text)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (ww_text == NULL) Error("WWText_Destroy", "Object is not created.");
|
||||||
|
|
||||||
|
for (i = 0; i < 128; i++) {
|
||||||
|
if (WWText_GetFont(ww_text, i))
|
||||||
|
WWText_SetFont(ww_text, i,
|
||||||
|
WWCharacter_Destroy(WWText_GetFont(ww_text, i)));
|
||||||
|
}
|
||||||
|
|
||||||
|
free(ww_text);
|
||||||
|
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
79
WWText.h
Normal file
79
WWText.h
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#ifndef _WWText_h_INCLUDED_
|
||||||
|
#define _WWText_h_INCLUDED_
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "WWDisplay.h"
|
||||||
|
#include "WWScreen.h"
|
||||||
|
#include "WWPalette.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD>饹<EFBFBD><E9A5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _WWText * WWText;
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>Фμ<D0A4><CEBC><EFBFBD> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
WWScreen WWText_GetScreen(WWText t);
|
||||||
|
int WWText_GetX(WWText t);
|
||||||
|
int WWText_GetY(WWText t);
|
||||||
|
int WWText_GetWidth( WWText t);
|
||||||
|
int WWText_GetHeight(WWText t);
|
||||||
|
int WWText_GetBase(WWText t);
|
||||||
|
WWPalette WWText_GetPalette(WWText t);
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD><D0A4><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
WWScreen WWText_SetScreen(WWText t, WWScreen s);
|
||||||
|
int WWText_SetX(WWText t, int n);
|
||||||
|
int WWText_SetY(WWText t, int n);
|
||||||
|
int WWText_SetWidth( WWText t, int n);
|
||||||
|
int WWText_SetHeight(WWText t, int n);
|
||||||
|
int WWText_SetBase(WWText t, int n);
|
||||||
|
WWPalette WWText_SetPalette(WWText t, WWPalette p);
|
||||||
|
|
||||||
|
int WWText_SetTextWindow(WWText ww_text, int x, int y,
|
||||||
|
int width, int height, int base,
|
||||||
|
WWDisplay ww_display);
|
||||||
|
int WWText_PutCharacter(WWText ww_text, int x, int y, int character,
|
||||||
|
WWDisplay ww_display);
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* <20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦõ<C8BE> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
WWText WWText_Create(WWScreen screen, int x, int y, int width, int height,
|
||||||
|
WWPalette palette);
|
||||||
|
WWText WWText_Destroy(WWText text);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
130
WWTextFonts.c
Normal file
130
WWTextFonts.c
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
static unsigned char fonts[] = {
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0 <20><><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8> */
|
||||||
|
0x00,0x00,0x00,0x00,0xc0,0x0c,0x00,0x00,0x30,0x30,0xc0,0x0f,0x00,0x00,0x00,0x00, /* 1 <20>д<EFBFBD> */
|
||||||
|
0x00,0x00,0xf0,0x3f,0x3c,0xf3,0xfc,0xff,0xcc,0xcf,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 2 <20>д<EFBFBD> */
|
||||||
|
0x30,0x30,0xfc,0xfc,0xfc,0xff,0xfc,0xff,0xf0,0x3f,0xc0,0x0f,0x00,0x03,0x00,0x00, /* 3 <20>ϡ<EFBFBD><CFA1><EFBFBD> */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xf0,0x3f,0xfc,0xff,0xf0,0x3f,0xc0,0x0f,0x00,0x03,0x00,0x00, /* 4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xc0,0x0f,0xfc,0xfc,0xfc,0xfc,0x00,0x03,0xc0,0x0f,0x00,0x00, /* 5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD> */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xf0,0x3f,0xfc,0xff,0xf0,0x3f,0x00,0x03,0xc0,0x0f,0x00,0x00, /* 6 <20><><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x03,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0x00, /* 7 <20><> */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x0f,0x30,0x0c,0x30,0x0c,0xf0,0x0f,0x00,0x00,0x00,0x00, /* 8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x00,0xc0,0x03,0x30,0x0c,0x30,0x0c,0xc0,0x03,0x00,0x00,0x00,0x00, /* 9 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x00,0xfc,0x3f,0x0c,0x30,0xcc,0x33,0xcc,0x33,0x0c,0x30,0xfc,0x3f,0x00,0x00, /* 10 <20><><EFBFBD>Żͳ<C5BB> */
|
||||||
|
0x00,0xff,0x00,0xf0,0x00,0xcc,0xf0,0xc3,0x0c,0x03,0x0c,0x03,0xf0,0x00,0x00,0x00, /* 11 <20><> */
|
||||||
|
0xc0,0x0f,0x30,0x30,0x30,0x30,0xc0,0x0f,0x00,0x03,0xf0,0x3f,0x00,0x03,0x00,0x00, /* 12 <20><> */
|
||||||
|
0xc0,0x03,0xc0,0x0f,0xc0,0x3c,0xc0,0x30,0xc0,0x30,0xfc,0x00,0x3c,0x00,0x00,0x00, /* 13 <20><> */
|
||||||
|
0xc0,0x03,0xc0,0x3f,0xc0,0x3c,0xc0,0x30,0x3c,0x30,0x3c,0x3f,0x00,0x0f,0x00,0x00, /* 14 <20><><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x03,0x30,0x33,0xc0,0x0f,0xfc,0xfc,0xc0,0x0f,0x30,0x33,0x00,0x03,0x00,0x00, /* 15 <20><>ȯ<EFBFBD><C8AF> */
|
||||||
|
0xc0,0x00,0xc0,0x03,0xc0,0x0f,0xc0,0x3f,0xc0,0x0f,0xc0,0x03,0xc0,0x00,0x00,0x00, /* 16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x0c,0x00,0x0f,0xc0,0x0f,0xf0,0x0f,0xc0,0x0f,0x00,0x0f,0x00,0x0c,0x00,0x00, /* 17 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xf0,0x3f,0x00,0x03,0xf0,0x3f,0xc0,0x0f,0x00,0x03,0x00,0x00, /* 18 <20>岼<EFBFBD><E5B2BC><EFBFBD><EFBFBD> */
|
||||||
|
0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0x00,0x00,0xf0,0x3c,0x00,0x00, /* 19 !! */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x3c,0x30,0x0f,0xf0,0x03,0xc0,0x00,0x00,0x00, /* 20 <20><><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x00,0xc0,0x03,0xf0,0x0f,0xf0,0x0f,0xc0,0x03,0x00,0x00,0x00,0x00, /* 21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x00,0x00,0x00,0x00,0x00,0x00, /* 22 <20><><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xf0,0x3f,0x00,0x03,0xf0,0x3f,0xc0,0x0f,0xf0,0x3f,0x00,0x00, /* 23 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xf0,0x3f,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00, /* 24 <20><> */
|
||||||
|
0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0xf0,0x3f,0xc0,0x0f,0x00,0x03,0x00,0x00, /* 25 <20><> */
|
||||||
|
0x00,0x00,0x00,0x0c,0x00,0x3c,0xfc,0xff,0x00,0x3c,0x00,0x0c,0x00,0x00,0x00,0x00, /* 26 <20><> */
|
||||||
|
0x00,0x00,0xc0,0x00,0xf0,0x00,0xfc,0xff,0xf0,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, /* 27 <20><> */
|
||||||
|
0xf0,0x0f,0x0c,0x30,0xc3,0xcf,0x33,0xc0,0x33,0xc0,0xc3,0xcf,0x0c,0x30,0xf0,0x0f, /* 28 (C) */
|
||||||
|
0x00,0x00,0xc0,0x0c,0xf0,0x3c,0xfc,0xff,0xf0,0x3c,0xc0,0x0c,0x00,0x00,0x00,0x00, /* 29 <20><><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x03,0xc0,0x0f,0xf0,0x3f,0xfc,0xff,0x00,0x00,0x00,0x00,0x00,0x00, /* 30 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x00,0xfc,0xff,0xf0,0x3f,0xc0,0x0f,0x00,0x03,0x00,0x00,0x00,0x00, /* 31 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 32 <20><><EFBFBD><EFBFBD> */
|
||||||
|
0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00,0xc0,0x03,0x00,0x00, /* 33 ! */
|
||||||
|
0xf0,0x3c,0xf0,0x3c,0xc0,0x30,0x30,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 34 " */
|
||||||
|
0xc0,0x0c,0xc0,0x0c,0xfc,0xff,0xc0,0x0c,0xfc,0xff,0xc0,0x0c,0xc0,0x0c,0x00,0x00, /* 35 # */
|
||||||
|
0x00,0x03,0xf0,0x3f,0x3c,0x03,0xf0,0x3f,0x00,0xf3,0xf0,0x3f,0x00,0x03,0x00,0x00, /* 36 $ */
|
||||||
|
0x30,0xc0,0xcc,0x30,0x30,0x0c,0x00,0x03,0xc0,0x30,0x30,0xcc,0x0c,0x30,0x00,0x00, /* 37 % */
|
||||||
|
0xc0,0x03,0x30,0x0c,0x30,0x0c,0xf0,0xc3,0x0c,0x3f,0x0c,0x0c,0xf0,0xf3,0x00,0x00, /* 38 & */
|
||||||
|
0x00,0x0f,0x00,0x0f,0x00,0x0c,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 39 ' */
|
||||||
|
0x00,0x0c,0x00,0x03,0xc0,0x00,0xc0,0x00,0xc0,0x00,0x00,0x03,0x00,0x0c,0x00,0x00, /* 40 ( */
|
||||||
|
0xc0,0x00,0x00,0x03,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x03,0xc0,0x00,0x00,0x00, /* 41 ) */
|
||||||
|
0x00,0x00,0x00,0x03,0x30,0x33,0xc0,0x0f,0x30,0x33,0x00,0x03,0x00,0x00,0x00,0x00, /* 42 * */
|
||||||
|
0x00,0x03,0x00,0x03,0x00,0x03,0xfc,0xff,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00, /* 43 + */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x3c,0x00,0x30,0x00,0x0c,0x00, /* 44 , */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 45 - */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x3c,0x00,0x00,0x00, /* 46 . */
|
||||||
|
0x00,0xc0,0x00,0x30,0x00,0x0c,0x00,0x03,0xc0,0x00,0x30,0x00,0x0c,0x00,0x00,0x00, /* 47 / */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 48 0 */
|
||||||
|
0x00,0x0f,0xf0,0x0f,0x00,0x0f,0x00,0x0f,0x00,0x0f,0x00,0x0f,0x00,0x0f,0x00,0x00, /* 49 1 */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x00,0x3c,0x00,0x0f,0xc0,0x03,0xf0,0x00,0xfc,0x3f,0x00,0x00, /* 50 2 */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x00,0x3c,0xf0,0x0f,0x00,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 51 3 */
|
||||||
|
0x00,0x3f,0xc0,0x3f,0xf0,0x3c,0x3c,0x3c,0x3c,0x3c,0xfc,0xff,0x00,0x3c,0x00,0x00, /* 52 4 */
|
||||||
|
0xfc,0x3f,0x3c,0x00,0x3c,0x00,0xfc,0x0f,0x00,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 53 5 */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x3c,0x00,0xfc,0x0f,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 54 6 */
|
||||||
|
0xfc,0x3f,0x3c,0x3c,0x00,0x3c,0x00,0x0f,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00, /* 55 7 */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 56 8 */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x3c,0x3c,0xf0,0x3f,0x00,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 57 9 */
|
||||||
|
0x00,0x00,0xc0,0x03,0xc0,0x03,0x00,0x00,0xc0,0x03,0xc0,0x03,0x00,0x00,0x00,0x00, /* 58 : */
|
||||||
|
0x00,0x00,0xc0,0x03,0xc0,0x03,0x00,0x00,0xc0,0x03,0xc0,0x03,0x00,0x03,0xc0,0x00, /* 59 ; */
|
||||||
|
0x00,0x0c,0x00,0x03,0xc0,0x00,0x30,0x00,0xc0,0x00,0x00,0x03,0x00,0x0c,0x00,0x00, /* 60 < */
|
||||||
|
0x00,0x00,0x00,0x00,0xfc,0xff,0x00,0x00,0xfc,0xff,0x00,0x00,0x00,0x00,0x00,0x00, /* 61 = */
|
||||||
|
0xc0,0x00,0x00,0x03,0x00,0x0c,0x00,0x30,0x00,0x0c,0x00,0x03,0xc0,0x00,0x00,0x00, /* 62 > */
|
||||||
|
0xf0,0x0f,0x3c,0x3c,0x3c,0x3c,0x00,0x0f,0xc0,0x03,0x00,0x00,0xc0,0x03,0x00,0x00, /* 63 ? */
|
||||||
|
0xf0,0x3f,0x0c,0xcc,0xcc,0xcf,0xcc,0xcc,0xcc,0xff,0x0c,0x00,0xf0,0x3f,0x00,0x00, /* 64 @ */
|
||||||
|
0xc0,0x0f,0xf0,0x3c,0x3c,0xf0,0x3c,0xf0,0xfc,0xff,0x3c,0xf0,0x3c,0xf0,0x00,0x00, /* 65 A */
|
||||||
|
0xfc,0x3f,0x3c,0xf0,0x3c,0xf0,0xfc,0x3f,0x3c,0xf0,0x3c,0xf0,0xfc,0x3f,0x00,0x00, /* 66 B */
|
||||||
|
0xf0,0x3f,0x3c,0xf0,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 67 C */
|
||||||
|
0xfc,0x0f,0x3c,0x3c,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0x3c,0xfc,0x0f,0x00,0x00, /* 68 D */
|
||||||
|
0xfc,0x3f,0x3c,0x00,0x3c,0x00,0xfc,0x0f,0x3c,0x00,0x3c,0x00,0xfc,0x3f,0x00,0x00, /* 69 E */
|
||||||
|
0xfc,0x3f,0x3c,0x00,0x3c,0x00,0xfc,0x0f,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x00,0x00, /* 70 F */
|
||||||
|
0xf0,0x3f,0x3c,0xf0,0x3c,0x00,0x3c,0xfc,0x3c,0xf0,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 71 G */
|
||||||
|
0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0xfc,0xff,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x00,0x00, /* 72 H */
|
||||||
|
0xf0,0x0f,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xf0,0x0f,0x00,0x00, /* 73 I */
|
||||||
|
0x00,0xff,0x00,0xf0,0x00,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 74 J */
|
||||||
|
0x3c,0xf0,0x3c,0x3c,0x3c,0x0f,0xfc,0x03,0x3c,0x0f,0x3c,0x3c,0x3c,0xf0,0x00,0x00, /* 75 K */
|
||||||
|
0x3c,0x00,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x3c,0x00,0xfc,0xff,0x00,0x00, /* 76 L */
|
||||||
|
0x3c,0xf0,0xfc,0xfc,0xfc,0xff,0x3c,0xf3,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x00,0x00, /* 77 M */
|
||||||
|
0x3c,0xf0,0xfc,0xf0,0xfc,0xf3,0x3c,0xff,0x3c,0xfc,0x3c,0xf0,0x3c,0xf0,0x00,0x00, /* 78 N */
|
||||||
|
0xf0,0x3f,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 79 O */
|
||||||
|
0xfc,0x3f,0x3c,0xf0,0x3c,0xf0,0xfc,0x3f,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x00,0x00, /* 80 P */
|
||||||
|
0xf0,0x3f,0x3c,0xf0,0x3c,0xf0,0x3c,0xf3,0x3c,0xff,0x3c,0xfc,0xf0,0x3f,0x00,0x00, /* 81 Q */
|
||||||
|
0xfc,0x3f,0x3c,0xf0,0x3c,0xf0,0xfc,0x3f,0x3c,0x0f,0x3c,0x3c,0x3c,0xf0,0x00,0x00, /* 82 R */
|
||||||
|
0xf0,0x3f,0x3c,0xf0,0x3c,0x00,0xf0,0x3f,0x00,0xf0,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 83 S */
|
||||||
|
0xfc,0x3f,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00, /* 84 T */
|
||||||
|
0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0xf0,0x3f,0x00,0x00, /* 85 U */
|
||||||
|
0x3c,0xf0,0x3c,0xf0,0x3c,0xf0,0xf0,0x3c,0xf0,0x3c,0xc0,0x0f,0x00,0x03,0x00,0x00, /* 86 V */
|
||||||
|
0x3c,0xf0,0x3c,0xf3,0x3c,0xf3,0x3c,0xf3,0xfc,0xff,0xf0,0x3c,0x30,0x30,0x00,0x00, /* 87 W */
|
||||||
|
0x3c,0xf0,0x3c,0xf0,0xf0,0x3c,0xc0,0x0f,0xf0,0x3c,0x3c,0xf0,0x3c,0xf0,0x00,0x00, /* 88 X */
|
||||||
|
0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00, /* 89 Y */
|
||||||
|
0xfc,0xff,0x00,0xf0,0x00,0x3c,0x00,0x0f,0xc0,0x03,0xf0,0x00,0xfc,0xff,0x00,0x00, /* 90 Z */
|
||||||
|
0xc0,0x0f,0xc0,0x00,0xc0,0x00,0xc0,0x00,0xc0,0x00,0xc0,0x00,0xc0,0x0f,0x00,0x00, /* 91 [ */
|
||||||
|
0x0c,0x00,0x30,0x00,0xc0,0x00,0x00,0x03,0x00,0x0c,0x00,0x30,0x00,0xc0,0x00,0x00, /* 92 \ */
|
||||||
|
0xc0,0x0f,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x0c,0xc0,0x0f,0x00,0x00, /* 93 ] */
|
||||||
|
0x00,0x03,0xc0,0x0f,0xf0,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 94 ^ */
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0x00,0x00, /* 95 _ */
|
||||||
|
0xc0,0x03,0xc0,0x03,0x00,0x03,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 96 ` */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x3f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xf0,0xff,0x00,0x00, /* 97 a */
|
||||||
|
0x3c,0x00,0x3c,0x00,0xfc,0x0f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xfc,0x0f,0x00,0x00, /* 98 b */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x0f,0x3c,0x3c,0x3c,0x00,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 99 c */
|
||||||
|
0x00,0x3c,0x00,0x3c,0xf0,0x3f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xf0,0x3f,0x00,0x00, /* 100 d */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x0f,0x3c,0x3c,0xfc,0x3f,0x3c,0x00,0xf0,0x0f,0x00,0x00, /* 101 e */
|
||||||
|
0xc0,0x0f,0xf0,0x30,0xf0,0x00,0xfc,0x0f,0xf0,0x00,0xf0,0x00,0xf0,0x00,0x00,0x00, /* 102 f */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x3f,0x3c,0x3c,0x3c,0x3c,0xc0,0x3f,0x3c,0x3c,0xf0,0x0f, /* 103 g */
|
||||||
|
0x3c,0x00,0x3c,0x00,0xfc,0x0f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x00,0x00, /* 104 h */
|
||||||
|
0xc0,0x03,0x00,0x00,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00, /* 105 i */
|
||||||
|
0x00,0x3c,0x00,0x00,0x00,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x3c,0x3c,0x3c,0xf0,0x0f, /* 106 j */
|
||||||
|
0x3c,0x00,0x3c,0x00,0x3c,0x3c,0x3c,0x0f,0xfc,0x00,0x3c,0x0f,0x3c,0x3c,0x00,0x00, /* 107 k */
|
||||||
|
0xf0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xc0,0x03,0xf0,0x0f,0x00,0x00, /* 108 l */
|
||||||
|
0x00,0x00,0x00,0x00,0xfc,0x3c,0x3c,0xf3,0x3c,0xf3,0x3c,0xf3,0x3c,0xf3,0x00,0x00, /* 109 m */
|
||||||
|
0x00,0x00,0x00,0x00,0xfc,0x0f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x00,0x00, /* 110 n */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x0f,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0x00,0x00, /* 111 o */
|
||||||
|
0x00,0x00,0x00,0x00,0xfc,0x0f,0x3c,0x3c,0x3c,0x3c,0xfc,0x0f,0x3c,0x00,0x3c,0x00, /* 112 p */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x3f,0x3c,0x3c,0x3c,0x3c,0xc0,0x3f,0x00,0x3c,0x00,0x3c, /* 113 q */
|
||||||
|
0x00,0x00,0x00,0x00,0x3c,0x3f,0xfc,0x00,0x3c,0x00,0x3c,0x00,0x3c,0x00,0x00,0x00, /* 114 r */
|
||||||
|
0x00,0x00,0x00,0x00,0xf0,0x3f,0xfc,0x00,0xf0,0x0f,0x00,0x3f,0xfc,0x0f,0x00,0x00, /* 115 s */
|
||||||
|
0xc0,0x03,0xc0,0x03,0xf0,0x3f,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x3f,0x00,0x00, /* 116 t */
|
||||||
|
0x00,0x00,0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0xf0,0xff,0x00,0x00, /* 117 u */
|
||||||
|
0x00,0x00,0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x30,0x0c,0xf0,0x0f,0xc0,0x03,0x00,0x00, /* 118 v */
|
||||||
|
0x00,0x00,0x00,0x00,0x3c,0xf0,0x3c,0xf3,0x30,0x33,0xf0,0x3f,0xc0,0x0c,0x00,0x00, /* 119 w */
|
||||||
|
0x00,0x00,0x00,0x00,0x3c,0x3c,0xf0,0x0f,0xc0,0x03,0xf0,0x0f,0x3c,0x3c,0x00,0x00, /* 120 x */
|
||||||
|
0x00,0x00,0x00,0x00,0x3c,0x3c,0x3c,0x3c,0xf0,0x0f,0xc0,0x03,0xf0,0x00,0x3c,0x00, /* 121 y */
|
||||||
|
0x00,0x00,0x00,0x00,0xfc,0x3f,0x00,0x0f,0xc0,0x03,0xf0,0x00,0xfc,0x3f,0x00,0x00, /* 122 z */
|
||||||
|
0x00,0x0f,0xc0,0x03,0xc0,0x03,0xf0,0x00,0xc0,0x03,0xc0,0x03,0x00,0x0f,0x00,0x00, /* 123 { */
|
||||||
|
0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00,0xc0,0x03,0xc0,0x03,0xc0,0x03,0x00,0x00, /* 124 | */
|
||||||
|
0xc0,0x03,0x00,0x0f,0x00,0x0f,0x00,0x3c,0x00,0x0f,0x00,0x0f,0xc0,0x03,0x00,0x00, /* 125 } */
|
||||||
|
0xf0,0x30,0xf0,0x0f,0x0c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 126 ~ */
|
||||||
|
0x00,0x03,0x00,0x03,0xc0,0x0c,0xc0,0x0c,0x30,0x30,0x30,0x30,0xf0,0x3f,0x00,0x00 /* 127 <20><> */
|
||||||
|
};
|
||||||
36
WWTextP.h
Normal file
36
WWTextP.h
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#ifndef _WWTextP_h_INCLUDED_
|
||||||
|
#define _WWTextP_h_INCLUDED_
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "WWText.h"
|
||||||
|
#include "WWCharacter.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD>饹<EFBFBD><E9A5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _WWText {
|
||||||
|
|
||||||
|
/* <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
|
||||||
|
WWScreen screen; /* <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EAA1BC> */
|
||||||
|
int x, y, width, height; /* <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><C9A5><EFBFBD><EFBFBD>ΰ<EFBFBD> */
|
||||||
|
int base; /* <20><><EFBFBD>Ѥ<EFBFBD><D1A4>륭<EFBFBD><EBA5AD><EFBFBD>饯<EFBFBD><E9A5AF><EFBFBD>Υ١<CEA5><D9A1><EFBFBD> */
|
||||||
|
|
||||||
|
WWPalette palette;
|
||||||
|
WWCharacter font[128]; /* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
|
||||||
|
} _WWText;
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
52
Wonx.c
Normal file
52
Wonx.c
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#include "WonxP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
|
#include <sys/disp.h>
|
||||||
|
#include <sys/text.h>
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ץ쥤<D7A5>γ<EFBFBD><CEB3><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static Wonx wonx = NULL;
|
||||||
|
|
||||||
|
int Wonx_IsCreated(void)
|
||||||
|
{
|
||||||
|
return (wonx != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Wonx_Create(void)
|
||||||
|
{
|
||||||
|
WWScreen screen;
|
||||||
|
WWPalette palette;
|
||||||
|
|
||||||
|
wonx = (Wonx)malloc(sizeof(_Wonx));
|
||||||
|
if (wonx == NULL) Error("Wonx_Create", "Cannot allocate memory.");
|
||||||
|
|
||||||
|
wonx->wonx_display =
|
||||||
|
WonxDisplay_Create(LCD_PIXEL_WIDTH * 2, LCD_PIXEL_HEIGHT * 2,
|
||||||
|
LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT,
|
||||||
|
SCREEN_CHAR_WIDTH, SCREEN_CHAR_HEIGHT);
|
||||||
|
screen =
|
||||||
|
WWDisplay_GetScreen(WonxDisplay_GetWWDisplay(wonx->wonx_display), SCREEN2);
|
||||||
|
/* <20>ǥե<C7A5><D5A5><EFBFBD><EFBFBD>ȤΥƥ<CEA5><C6A5><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>ѥѥ<D1A5><D1A5>åȤ<C3A5>0 */
|
||||||
|
palette =
|
||||||
|
WWDisplay_GetPalette(WonxDisplay_GetWWDisplay(wonx->wonx_display), 0);
|
||||||
|
|
||||||
|
wonx->wonx_text =
|
||||||
|
WonxText_Create(screen, 0, 0, TEXT_SCREEN_WIDTH, TEXT_SCREEN_HEIGHT,
|
||||||
|
palette);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WonxDisplay Wonx_GetWonxDisplay(void)
|
||||||
|
{
|
||||||
|
return (wonx->wonx_display);
|
||||||
|
}
|
||||||
|
|
||||||
|
WonxText Wonx_GetWonxText(void)
|
||||||
|
{
|
||||||
|
return (wonx->wonx_text);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
#ifndef _wonx_h_INCLUDED_
|
#ifndef _wonx_h_INCLUDED_
|
||||||
#define _wonx_h_INCLUDED_
|
#define _wonx_h_INCLUDED_
|
||||||
|
|
||||||
#include <sys/disp.h>
|
|
||||||
|
|
||||||
#include "WonxDisplay.h"
|
#include "WonxDisplay.h"
|
||||||
|
#include "WonxText.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* ディスプレイの確保 */
|
/* ディスプレイの確保 */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
extern WonxDisplay wonx_display;
|
int Wonx_IsCreated(void);
|
||||||
|
|
||||||
void Wonx_Create(void);
|
void Wonx_Create(void);
|
||||||
|
WonxDisplay Wonx_GetWonxDisplay(void);
|
||||||
|
WonxText Wonx_GetWonxText(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "WonxDisplayP.h"
|
#include "WonxDisplayP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
@@ -44,6 +45,46 @@ WonxDisplay WonxDisplay_Create(int x_width, int x_height,
|
|||||||
return (wonx_display);
|
return (wonx_display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WonxDisplay_Sync(WonxDisplay wonx_display)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
XDisplay x_display;
|
||||||
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
x_display = WonxDisplay_GetXDisplay(wonx_display);
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(wonx_display);
|
||||||
|
|
||||||
|
if (XDisplay_GetColorMapPrint(x_display)) {
|
||||||
|
WWColorMap_PrintData(WWDisplay_GetColorMap(ww_display), stdout);
|
||||||
|
XDisplay_SetColorMapPrint(x_display, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (XDisplay_GetPalettePrint(x_display)) {
|
||||||
|
for (i = 0; i < 16; i++) {
|
||||||
|
WWPalette_PrintData(WWDisplay_GetPalette(ww_display, i), stdout);
|
||||||
|
}
|
||||||
|
XDisplay_SetPalettePrint(x_display, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (XDisplay_GetCharacterPrint(x_display)) {
|
||||||
|
for (i = 0; i < 512; i++) {
|
||||||
|
WWCharacter_PrintData(WWDisplay_GetCharacter(ww_display, i), stdout);
|
||||||
|
}
|
||||||
|
XDisplay_SetCharacterPrint(x_display, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (XDisplay_GetSpritePrint(x_display)) {
|
||||||
|
for (i = 0; i < 128; i++) {
|
||||||
|
WWSprite_PrintData(WWDisplay_GetSprite(ww_display, i), stdout);
|
||||||
|
}
|
||||||
|
XDisplay_SetSpritePrint(x_display, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
XDisplay_Sync(x_display);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
int WonxDisplay_Flush(WonxDisplay wonx_display)
|
int WonxDisplay_Flush(WonxDisplay wonx_display)
|
||||||
{
|
{
|
||||||
XDisplay x_display;
|
XDisplay x_display;
|
||||||
@@ -59,6 +100,8 @@ int WonxDisplay_Flush(WonxDisplay wonx_display)
|
|||||||
XDisplay_DrawLCDWindow(x_display, ww_lcd_panel);
|
XDisplay_DrawLCDWindow(x_display, ww_lcd_panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WonxDisplay_Sync(wonx_display);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ WWDisplay WonxDisplay_GetWWDisplay(WonxDisplay wonx_display);
|
|||||||
WonxDisplay WonxDisplay_Create(int x_width, int x_height,
|
WonxDisplay WonxDisplay_Create(int x_width, int x_height,
|
||||||
int ww_lcd_panel_width, int ww_lcd_panel_height,
|
int ww_lcd_panel_width, int ww_lcd_panel_height,
|
||||||
int ww_screen_width, int ww_screen_height);
|
int ww_screen_width, int ww_screen_height);
|
||||||
|
int WonxDisplay_Sync(WonxDisplay wonx_display);
|
||||||
int WonxDisplay_Flush(WonxDisplay wonx_display);
|
int WonxDisplay_Flush(WonxDisplay wonx_display);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
29
WonxP.h
Normal file
29
WonxP.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef _WonxP_h_INCLUDED_
|
||||||
|
#define _WonxP_h_INCLUDED_
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "Wonx.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD>饹<EFBFBD><E9A5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _Wonx {
|
||||||
|
WonxDisplay wonx_display;
|
||||||
|
WonxText wonx_text;
|
||||||
|
} _Wonx;
|
||||||
|
|
||||||
|
typedef struct _Wonx * Wonx;
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
55
WonxText.c
Normal file
55
WonxText.c
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "WonxTextP.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
WWText WonxText_GetWWText(WonxText wonx_text)
|
||||||
|
{ return (wonx_text->ww_text); }
|
||||||
|
WWText WonxText_SetWWText(WonxText wonx_text, WWText ww_text)
|
||||||
|
{ return (wonx_text->ww_text = ww_text); }
|
||||||
|
|
||||||
|
WonxText WonxText_Create(WWScreen screen, int x, int y, int width, int height,
|
||||||
|
WWPalette palette)
|
||||||
|
{
|
||||||
|
WonxText wonx_text;
|
||||||
|
WWText ww_text;
|
||||||
|
|
||||||
|
wonx_text = (WonxText)malloc(sizeof(_WonxText));
|
||||||
|
if (wonx_text == NULL)
|
||||||
|
Error("WonxText_Create", "Cannot allocate memory.");
|
||||||
|
|
||||||
|
ww_text = WWText_Create(screen, x, y, width, height, palette);
|
||||||
|
if (ww_text == NULL)
|
||||||
|
Error("WonxText_Create", "Cannot create WonderWitch text.");
|
||||||
|
WonxText_SetWWText(wonx_text, ww_text);
|
||||||
|
|
||||||
|
return (wonx_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
WonxText WonxText_Destroy(WonxText wonx_text)
|
||||||
|
{
|
||||||
|
if (wonx_text == NULL)
|
||||||
|
Error("WonxText_Destroy", "Object is not created.");
|
||||||
|
|
||||||
|
if (WonxText_GetWWText(wonx_text))
|
||||||
|
WonxText_SetWWText(wonx_text,
|
||||||
|
WWText_Destroy(WonxText_GetWWText(wonx_text)));
|
||||||
|
|
||||||
|
free(wonx_text);
|
||||||
|
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
32
WonxText.h
Normal file
32
WonxText.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef _WonxText_h_INCLUDED_
|
||||||
|
#define _WonxText_h_INCLUDED_
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "WWText.h"
|
||||||
|
#include "WWScreen.h"
|
||||||
|
#include "WWPalette.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD>饹<EFBFBD><E9A5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _WonxText * WonxText;
|
||||||
|
|
||||||
|
WWText WonxText_GetWWText(WonxText wonx_text);
|
||||||
|
WWText WonxText_SetWWText(WonxText wonx_text, WWText ww_text);
|
||||||
|
WonxText WonxText_Create(WWScreen screen, int x, int y, int width, int height,
|
||||||
|
WWPalette palette);
|
||||||
|
WonxText WonxText_Destroy(WonxText wonx_text);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
26
WonxTextP.h
Normal file
26
WonxTextP.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef _WonxTextP_h_INCLUDED_
|
||||||
|
#define _WonxTextP_h_INCLUDED_
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "WonxText.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD>饹<EFBFBD><E9A5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _WonxText {
|
||||||
|
WWText ww_text;
|
||||||
|
} _WonxText;
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD> */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* End of File. */
|
||||||
|
/*****************************************************************************/
|
||||||
134
XDisplay.c
134
XDisplay.c
@@ -1,25 +1,44 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "XDisplayP.h"
|
#include "XDisplayP.h"
|
||||||
|
#include "Wonx.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
unsigned int XDisplay_GetKeyPress(XDisplay x_display)
|
unsigned int XDisplay_GetKeyPress(XDisplay d) { return (d->key_press); }
|
||||||
{ return (x_display->key_press); }
|
int XDisplay_GetLCDDraw(XDisplay d) { return (d->lcd_draw); }
|
||||||
int XDisplay_GetLCDDraw(XDisplay x_display)
|
|
||||||
{ return (x_display->lcd_draw); }
|
int XDisplay_GetColorMapPrint(XDisplay d) {return (d->color_map_print); }
|
||||||
|
int XDisplay_GetPalettePrint(XDisplay d) {return (d->palette_print); }
|
||||||
|
int XDisplay_GetCharacterPrint(XDisplay d) {return (d->character_print); }
|
||||||
|
int XDisplay_GetSpritePrint(XDisplay d) {return (d->sprite_print); }
|
||||||
|
|
||||||
|
int XDisplay_SetColorMapPrint(XDisplay d, int f)
|
||||||
|
{ return (d->color_map_print = f); }
|
||||||
|
int XDisplay_SetPalettePrint(XDisplay d, int f)
|
||||||
|
{ return (d->palette_print = f); }
|
||||||
|
int XDisplay_SetCharacterPrint(XDisplay d, int f)
|
||||||
|
{ return(d->character_print = f); }
|
||||||
|
int XDisplay_SetSpritePrint(XDisplay d, int f)
|
||||||
|
{ return (d->sprite_print = f); }
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD><C7BB>Ѥ<EFBFBD><D1A4><EFBFBD><EFBFBD>ؿ<EFBFBD><D8BF>ʤɤ<CAA4><C9A4><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD><C7BB>Ѥ<EFBFBD><D1A4><EFBFBD><EFBFBD>ؿ<EFBFBD><D8BF>ʤɤ<CAA4><C9A4><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#if 0
|
||||||
static XrmOptionDescRec options[] = {};
|
static XrmOptionDescRec options[] = {};
|
||||||
|
#endif
|
||||||
|
|
||||||
static Atom wm_delete_window;
|
static Atom wm_delete_window;
|
||||||
|
|
||||||
static void die(Widget w)
|
static void die(Widget w)
|
||||||
@@ -48,7 +67,7 @@ static void iconify(Widget w, XEvent * event, String * params, Cardinal * num)
|
|||||||
XIconifyWindow(XtDisplay(w), XtWindow(w), DefaultScreen(XtDisplay(w)));
|
XIconifyWindow(XtDisplay(w), XtWindow(w), DefaultScreen(XtDisplay(w)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pause(Widget w, XEvent * event, String * params, Cardinal * num)
|
static void sleep_3(Widget w, XEvent * event, String * params, Cardinal * num)
|
||||||
{
|
{
|
||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
@@ -57,7 +76,7 @@ static XtActionsRec actions[] = {
|
|||||||
{"quit", quit},
|
{"quit", quit},
|
||||||
{"wm_protocols_proc", wm_protocols_proc},
|
{"wm_protocols_proc", wm_protocols_proc},
|
||||||
{"iconify", iconify},
|
{"iconify", iconify},
|
||||||
{"pause", pause}
|
{"pause", sleep_3}
|
||||||
};
|
};
|
||||||
|
|
||||||
static char * translations =
|
static char * translations =
|
||||||
@@ -113,17 +132,27 @@ static void KeyHandler(Widget w, XtPointer p, XEvent * event,
|
|||||||
case XK_s : press = KEY_START; break;
|
case XK_s : press = KEY_START; break;
|
||||||
case XK_space : press = KEY_A; break;
|
case XK_space : press = KEY_A; break;
|
||||||
case XK_Shift_L : press = KEY_B; break;
|
case XK_Shift_L : press = KEY_B; break;
|
||||||
|
default : press = 0; break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Wonx <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* Wonx <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
if (event->type == KeyPress) {
|
||||||
|
|
||||||
/* ɽ<><C9BD><EFBFBD>⡼<EFBFBD><E2A1BC><EFBFBD>ѹ<EFBFBD> */
|
switch (key_sym) {
|
||||||
case XK_p :
|
|
||||||
press = 0;
|
/* ɽ<><C9BD><EFBFBD>⡼<EFBFBD><E2A1BC><EFBFBD>ѹ<EFBFBD> */
|
||||||
if (event->type == KeyPress)
|
case XK_p :
|
||||||
x_display->lcd_draw = !(x_display->lcd_draw);
|
x_display->lcd_draw = !(x_display->lcd_draw);
|
||||||
break;
|
if (x_display->lcd_draw)
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
break;
|
||||||
|
|
||||||
default : press = 0; break;
|
/* <20>ǡ<EFBFBD><C7A1><EFBFBD><EFBFBD>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
case XK_F1 : x_display->color_map_print = 1; break;
|
||||||
|
case XK_F2 : x_display->palette_print = 1; break;
|
||||||
|
case XK_F3 : x_display->character_print = 1; break;
|
||||||
|
case XK_F4 : x_display->sprite_print = 1; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (press) {
|
if (press) {
|
||||||
@@ -340,16 +369,27 @@ int XDisplay_Sync(XDisplay x_display)
|
|||||||
|
|
||||||
int XDisplay_DrawLCDWindow(XDisplay x_display, WWLCDPanel ww_lcd_panel)
|
int XDisplay_DrawLCDWindow(XDisplay x_display, WWLCDPanel ww_lcd_panel)
|
||||||
{
|
{
|
||||||
int x, y, n;
|
int x, y;
|
||||||
int px, py;
|
int px, py, ph;
|
||||||
int num;
|
int num;
|
||||||
XRectangle * rectangles;
|
int n[16];
|
||||||
|
XRectangle * rectangles[16];
|
||||||
int pixel;
|
int pixel;
|
||||||
int ww_lcd_width, ww_lcd_height;
|
int ww_lcd_width, ww_lcd_height;
|
||||||
|
|
||||||
|
/* <20><><EFBFBD>ܤ<EFBFBD><DCA4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϤޤȤ<DEA4><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>褹<EFBFBD><E8A4B9><EFBFBD>Τǡ<CEA4><C7A1>ԥ<EFBFBD><D4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA><EFBFBD><EFBFBD>ͤ<EFBFBD> */
|
||||||
|
/* <20>ǰ<EFBFBD><C7B0>ξ<EFBFBD><CEBE><EFBFBD>(<28>ʡ<EFBFBD><CAA1><EFBFBD><EFBFBD>ͤΤȤ<CEA4>)<29>ǡ<EFBFBD>width * height / 2 <20>ˤʤ롥 */
|
||||||
num =
|
num =
|
||||||
WWLCDPanel_GetHeight(ww_lcd_panel) * WWLCDPanel_GetWidth(ww_lcd_panel);
|
WWLCDPanel_GetHeight(ww_lcd_panel) * WWLCDPanel_GetWidth(ww_lcd_panel) / 2;
|
||||||
rectangles = (XRectangle *)malloc(sizeof(XRectangle) * num);
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD> malloc() <20>ϡ<EFBFBD><CFA1>ºݤˤϥ<CBA4><CFA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϤۤȤ<DBA4><C8A4>ɻ<EFBFBD><C9BB>Ѥ<EFBFBD><D1A4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>ʤ<EFBFBD><CAA4>Τǡ<CEA4>
|
||||||
|
* <20><><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD>ɬ<EFBFBD>פ<EFBFBD><D7A4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
for (pixel = 0; pixel < 16; pixel++) {
|
||||||
|
n[pixel] = 0;
|
||||||
|
rectangles[pixel] = (XRectangle *)malloc(sizeof(XRectangle) * num);
|
||||||
|
}
|
||||||
if (rectangles == NULL)
|
if (rectangles == NULL)
|
||||||
Error("XDisplay_DrawLCDWindow", "Cannot allocate memory.");
|
Error("XDisplay_DrawLCDWindow", "Cannot allocate memory.");
|
||||||
|
|
||||||
@@ -358,27 +398,42 @@ int XDisplay_DrawLCDWindow(XDisplay x_display, WWLCDPanel ww_lcd_panel)
|
|||||||
|
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><CEBD><EFBFBD><EFBFBD>ϥۥåȥ<C3A5><C8A5>ݥåȤˤʤ<CBA4><CAA4>Τǡ<CEA4><C7A1>Τ<EFBFBD><CEA4>Τ<EFBFBD><CEA4>˥<EFBFBD><CBA5>塼<EFBFBD>˥<CBA5><F3A5B0A4>뤳<EFBFBD><EBA4B3> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><CEBD><EFBFBD><EFBFBD>ϥۥåȥ<C3A5><C8A5>ݥåȤˤʤ<CBA4><CAA4>Τǡ<CEA4><C7A1>Τ<EFBFBD><CEA4>Τ<EFBFBD><CEA4>˥<EFBFBD><CBA5>塼<EFBFBD>˥<CBA5><F3A5B0A4>뤳<EFBFBD><EBA4B3> */
|
||||||
|
|
||||||
for (pixel = 0; pixel < 16; pixel++) {
|
for (y = 0; y < ww_lcd_height; y++) {
|
||||||
n = 0;
|
py = (y * x_display->height) / ww_lcd_height;
|
||||||
for (y = 0; y < ww_lcd_height; y++) {
|
ph = (y+1) * x_display->height / ww_lcd_height- py;
|
||||||
for (x = 0; x < ww_lcd_width; x++) {
|
for (x = 0; x < ww_lcd_width; x++) {
|
||||||
if (pixel == WWLCDPanel_GetPixel(ww_lcd_panel, x, y)) {
|
if (!WWLCDPanel_IsPixelChanged(ww_lcd_panel, x, y)) {
|
||||||
px = (x * x_display->width ) / ww_lcd_width;
|
continue;
|
||||||
py = (y * x_display->height) / ww_lcd_height;
|
|
||||||
rectangles[n].x = px;
|
|
||||||
rectangles[n].y = py;
|
|
||||||
rectangles[n].width = (x+1) * x_display->width / ww_lcd_width - px;
|
|
||||||
rectangles[n].height = (y+1) * x_display->height / ww_lcd_height- py;
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
pixel = WWLCDPanel_GetPixel(ww_lcd_panel, x, y);
|
||||||
|
px = (x * x_display->width ) / ww_lcd_width;
|
||||||
|
rectangles[pixel][n[pixel]].x = px;
|
||||||
|
rectangles[pixel][n[pixel]].y = py;
|
||||||
|
rectangles[pixel][n[pixel]].width =
|
||||||
|
(x+1) * x_display->width / ww_lcd_width - px;
|
||||||
|
rectangles[pixel][n[pixel]].height = ph;
|
||||||
|
|
||||||
if (n > 0) {
|
/* <20><><EFBFBD>ܤ<EFBFBD><DCA4>Ƥ<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>Υԥ<CEA5><D4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD><CFA1><EFBFBD><EFBFBD>Ϥ<EFBFBD><CFA4>ä<EFBFBD><C3A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>褹<EFBFBD><E8A4B9> */
|
||||||
|
x++;
|
||||||
|
while ( (x < ww_lcd_width) &&
|
||||||
|
(pixel == WWLCDPanel_GetPixel(ww_lcd_panel, x, y)) &&
|
||||||
|
(WWLCDPanel_IsPixelChanged(ww_lcd_panel, x, y)) ) {
|
||||||
|
rectangles[pixel][n[pixel]].width =
|
||||||
|
(x+1) * x_display->width / ww_lcd_width - px;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
x--;
|
||||||
|
|
||||||
|
n[pixel]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (pixel = 0; pixel < 16; pixel++) {
|
||||||
|
if (n[pixel] > 0) {
|
||||||
XFillRectangles(x_display->display,
|
XFillRectangles(x_display->display,
|
||||||
x_display->lcd_pixmap,
|
x_display->lcd_pixmap,
|
||||||
x_display->color_gc[pixel],
|
x_display->color_gc[pixel],
|
||||||
rectangles, n);
|
rectangles[pixel], n[pixel]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,9 +441,14 @@ int XDisplay_DrawLCDWindow(XDisplay x_display, WWLCDPanel ww_lcd_panel)
|
|||||||
x_display->lcd_window, x_display->copy_gc,
|
x_display->lcd_window, x_display->copy_gc,
|
||||||
0, 0, x_display->width, x_display->height, 0, 0);
|
0, 0, x_display->width, x_display->height, 0, 0);
|
||||||
|
|
||||||
|
WWLCDPanel_ResetAllDraw(ww_lcd_panel);
|
||||||
|
WWLCDPanel_ReverseCurrent(ww_lcd_panel);
|
||||||
|
|
||||||
XDisplay_Sync(x_display);
|
XDisplay_Sync(x_display);
|
||||||
|
|
||||||
free(rectangles);
|
for (pixel = 0; pixel < 16; pixel++) {
|
||||||
|
free(rectangles[pixel]);
|
||||||
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
10
XDisplay.h
10
XDisplay.h
@@ -22,6 +22,16 @@ typedef struct _XDisplay * XDisplay;
|
|||||||
unsigned int XDisplay_GetKeyPress(XDisplay x_display);
|
unsigned int XDisplay_GetKeyPress(XDisplay x_display);
|
||||||
int XDisplay_GetLCDDraw(XDisplay x_display);
|
int XDisplay_GetLCDDraw(XDisplay x_display);
|
||||||
|
|
||||||
|
int XDisplay_GetColorMapPrint(XDisplay d);
|
||||||
|
int XDisplay_GetPalettePrint(XDisplay d);
|
||||||
|
int XDisplay_GetCharacterPrint(XDisplay d);
|
||||||
|
int XDisplay_GetSpritePrint(XDisplay d);
|
||||||
|
|
||||||
|
int XDisplay_SetColorMapPrint(XDisplay d, int f);
|
||||||
|
int XDisplay_SetPalettePrint(XDisplay d, int f);
|
||||||
|
int XDisplay_SetCharacterPrint(XDisplay d, int f);
|
||||||
|
int XDisplay_SetSpritePrint(XDisplay d, int f);
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* <20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦõ<C8BE> */
|
/* <20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦõ<C8BE> */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ typedef struct _XDisplay {
|
|||||||
/* LCD<43><44><EFBFBD><EFBFBD><EFBFBD>Υե饰 */
|
/* LCD<43><44><EFBFBD><EFBFBD><EFBFBD>Υե饰 */
|
||||||
int lcd_draw;
|
int lcd_draw;
|
||||||
|
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>ϤΥե饰 */
|
||||||
|
int color_map_print;
|
||||||
|
int palette_print;
|
||||||
|
int character_print;
|
||||||
|
int sprite_print;
|
||||||
|
|
||||||
} _XDisplay;
|
} _XDisplay;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
2
bank.c
2
bank.c
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <sys/bank.h>
|
#include <sys/bank.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
|||||||
2
comm.c
2
comm.c
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <sys/comm.h>
|
#include <sys/comm.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
|||||||
12
etc.c
12
etc.c
@@ -12,3 +12,15 @@ int Error(char * funcname, char * message)
|
|||||||
fprintf(stderr, "%s(): %s\n", funcname, message);
|
fprintf(stderr, "%s(): %s\n", funcname, message);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* "true", "false" <20><>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
char * true_false(int b)
|
||||||
|
{
|
||||||
|
char * s[] = {"false", "true"};
|
||||||
|
b = b ? 1 : 0;
|
||||||
|
return (s[b]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
6
etc.h
6
etc.h
@@ -7,5 +7,11 @@
|
|||||||
|
|
||||||
int Error(char * funcname, char * message);
|
int Error(char * funcname, char * message);
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* "true", "false" <20><>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD> */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
char * true_false(int b);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
60
key.c
60
key.c
@@ -3,25 +3,25 @@
|
|||||||
|
|
||||||
#include <sys/key.h>
|
#include <sys/key.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
|
||||||
#include "WonxDisplay.h"
|
|
||||||
|
|
||||||
int key_press_check(void)
|
int key_press_check(void)
|
||||||
{
|
{
|
||||||
XDisplay x_display;
|
XDisplay x_display;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("key_press_check(): "); fflush(stdout);
|
printf("call : key_press_check() : "); fflush(stdout);
|
||||||
|
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
x_display = WonxDisplay_GetXDisplay(wonx_display);
|
x_display = WonxDisplay_GetXDisplay(Wonx_GetWonxDisplay());
|
||||||
XDisplay_Sync(x_display);
|
XDisplay_Sync(x_display);
|
||||||
|
|
||||||
ret = XDisplay_GetKeyPress(x_display);
|
ret = XDisplay_GetKeyPress(x_display);
|
||||||
|
|
||||||
printf("return value = %d\n", ret); fflush(stdout);
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("return value = 0x%04x\n", (int)ret); fflush(stdout);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
@@ -31,16 +31,18 @@ int key_hit_check(void)
|
|||||||
XDisplay x_display;
|
XDisplay x_display;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("key_hit_check(): "); fflush(stdout);
|
printf("call : key_hit_check() : "); fflush(stdout);
|
||||||
|
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
x_display = WonxDisplay_GetXDisplay(wonx_display);
|
x_display = WonxDisplay_GetXDisplay(Wonx_GetWonxDisplay());
|
||||||
XDisplay_Sync(x_display);
|
XDisplay_Sync(x_display);
|
||||||
|
|
||||||
ret = XDisplay_GetKeyPress(x_display);
|
ret = XDisplay_GetKeyPress(x_display);
|
||||||
|
|
||||||
printf("return value = %d\n", ret); fflush(stdout);
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("return value = 0x%04x\n", (int)ret); fflush(stdout);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
@@ -50,11 +52,11 @@ int key_wait(void)
|
|||||||
XDisplay x_display;
|
XDisplay x_display;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("key_wait(): "); fflush(stdout);
|
printf("call : key_wait() : "); fflush(stdout);
|
||||||
|
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
x_display = WonxDisplay_GetXDisplay(wonx_display);
|
x_display = WonxDisplay_GetXDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
do {
|
do {
|
||||||
@@ -62,32 +64,40 @@ int key_wait(void)
|
|||||||
ret = XDisplay_GetKeyPress(x_display);
|
ret = XDisplay_GetKeyPress(x_display);
|
||||||
} while (ret == 0);
|
} while (ret == 0);
|
||||||
|
|
||||||
printf("return value = %d\n", ret); fflush(stdout);
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("return value = 0x%04x\n", (int)ret); fflush(stdout);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
void key_set_repeat(int rate, int delay)
|
void key_set_repeat(int rate, int delay)
|
||||||
{
|
{
|
||||||
printf("key_set_repeat(): rate = %d, delay = %d, ", rate, delay);
|
printf("call : key_set_repeat() : rate = %d, delay = %d, ", rate, delay);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
printf("return value = none\n"); fflush(stdout);
|
printf("return value = none\n"); fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int key_get_repeat(void)
|
int key_get_repeat(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("key_get_repeat(): "); fflush(stdout);
|
printf("call : key_get_repeat() : "); fflush(stdout);
|
||||||
|
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
printf("return value = %d\n", ret); fflush(stdout);
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("return value = 0x%04x\n", (int)ret); fflush(stdout);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
@@ -97,16 +107,18 @@ int key_hit_check_with_repeat(void)
|
|||||||
XDisplay x_display;
|
XDisplay x_display;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("key_hit_check_with_repeat(): "); fflush(stdout);
|
printf("call : key_hit_check_with_repeat() : "); fflush(stdout);
|
||||||
|
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
x_display = WonxDisplay_GetXDisplay(wonx_display);
|
x_display = WonxDisplay_GetXDisplay(Wonx_GetWonxDisplay());
|
||||||
XDisplay_Sync(x_display);
|
XDisplay_Sync(x_display);
|
||||||
|
|
||||||
ret = XDisplay_GetKeyPress(x_display);
|
ret = XDisplay_GetKeyPress(x_display);
|
||||||
|
|
||||||
printf("return value = %d\n", ret); fflush(stdout);
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("return value = 0x%04x\n", (int)ret); fflush(stdout);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|||||||
2
sound.c
2
sound.c
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <sys/sound.h>
|
#include <sys/sound.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>дؿ<D0B4><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
|||||||
9
system.c
9
system.c
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
#include <sys/system.h>
|
#include <sys/system.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
|
||||||
#include "WonxDisplay.h"
|
|
||||||
|
|
||||||
void sys_interrupt_set_hook(int type, intvector_t * intvector,
|
void sys_interrupt_set_hook(int type, intvector_t * intvector,
|
||||||
intvector_t * last_intvector)
|
intvector_t * last_intvector)
|
||||||
@@ -71,13 +69,16 @@ unsigned int sys_get_remote(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void * sys_alloc_iram(void *pointer, unsigned size)
|
void * sys_alloc_iram(void *pointer, unsigned size)
|
||||||
{}
|
{
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void sys_free_iram(void * p)
|
void sys_free_iram(void * p)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void * sys_get_my_iram(void)
|
void * sys_get_my_iram(void)
|
||||||
{
|
{
|
||||||
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int sys_get_version(void)
|
unsigned int sys_get_version(void)
|
||||||
|
|||||||
293
text.c
293
text.c
@@ -1,147 +1,360 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <sys/text.h>
|
#include <sys/text.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
#include "WWText.h"
|
||||||
|
|
||||||
#include "WonxDisplay.h"
|
static void _text_window_init(int x, int y, int w, int h, unsigned font_base)
|
||||||
|
{
|
||||||
|
WWText ww_text;
|
||||||
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
WWText_SetTextWindow(ww_text, x, y, w, h, font_base, ww_display);
|
||||||
|
|
||||||
|
WWScreen_SetRollX(WWText_GetScreen(ww_text), 0);
|
||||||
|
WWScreen_SetRollY(WWText_GetScreen(ww_text), 0);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void text_screen_init(void)
|
void text_screen_init(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWDisplay ww_display;
|
||||||
|
WWLCDPanel ww_lcd_panel;
|
||||||
|
|
||||||
|
printf("call : text_screen_init() : \n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
ww_lcd_panel = WWDisplay_GetLCDPanel(ww_display);
|
||||||
|
|
||||||
|
_text_window_init(0, 0, TEXT_SCREEN_WIDTH, TEXT_SCREEN_HEIGHT, 8);
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_screen_init() : return value = none\n"); fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_window_init(int x, int y, int w, int h, unsigned font_base)
|
void text_window_init(int x, int y, int w, int h, unsigned int font_base)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
printf("call : text_window_init() : x = %d, y = %d, width = %d, height = %d, base = %u\n", x, y, w, h, (int)font_base);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
_text_window_init(x, y, w, h, font_base);
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_screen_init() : return value = none\n"); fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_set_mode(int mode)
|
void text_set_mode(int mode)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int text_get_mode(void)
|
int text_get_mode(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _text_put_char(int x, int y, unsigned int c)
|
||||||
|
{
|
||||||
|
WWText ww_text;
|
||||||
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
WWText_PutCharacter(ww_text, x, y, c, ww_display);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void text_put_char(int x, int y, unsigned int c)
|
void text_put_char(int x, int y, unsigned int c)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
printf("call : text_put_char() : x = %d, y = %d, character = %u\n", x, y, (int)c);
|
||||||
printf("%c", (unsigned char)c);
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
_text_put_char(x, y, c);
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_put_char() : return value = none\n"); fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int _text_put_string(int x, int y, char * s)
|
||||||
|
{
|
||||||
|
int i, len, ret;
|
||||||
|
WWText ww_text;
|
||||||
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
len = strlen(s);
|
||||||
|
ret = 0;
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
if (WWText_PutCharacter(ww_text, x + i, y, s[i], ww_display) >= 0)
|
||||||
|
ret++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int text_put_string(int x, int y, char * s)
|
int text_put_string(int x, int y, char * s)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
int ret;
|
||||||
printf("%s\n", s);
|
|
||||||
return (0);
|
printf("call : text_put_string() : x = %d, y = %d, string = %s\n", x, y, s);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ret = _text_put_string(x, y, s);
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_put_string() : return value = %d\n", ret);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int text_put_substring(int x, int y, char * s, int len)
|
int text_put_substring(int x, int y, char * s, int len)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ret;
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWText ww_text;
|
||||||
for (i = 0; i < len; i++)
|
WWDisplay ww_display;
|
||||||
printf("%c", s[i]);
|
|
||||||
printf("\n");
|
printf("call : text_put_substring() : x = %d, y = %d, string = %s, length = %d\n", x, y, s, len);
|
||||||
return (0);
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
if (WWText_PutCharacter(ww_text, x + i, y, s[i], ww_display) >= 0)
|
||||||
|
ret++;
|
||||||
|
}
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_put_substring() : return value = %d\n", ret);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_put_numeric(int x, int y, int len, int format, int number)
|
void text_put_numeric(int x, int y, int len, int format, int number)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
char buf[20];
|
||||||
printf("%d\n", number);
|
char f[20];
|
||||||
|
|
||||||
|
printf("call : text_put_numeric() : x = %d, y = %d, len = %d, format = %04x, number = %d\n", x, y, len, format, number);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
strcpy(f, "%");
|
||||||
|
|
||||||
|
if (format & NUM_PADZERO) strcat(f, "0");
|
||||||
|
sprintf(f + strlen(f), "%d", len);
|
||||||
|
if (format & NUM_HEXA) strcat(f, "x");
|
||||||
|
else if (format & NUM_SIGNED) strcat(f, "d");
|
||||||
|
else strcat(f, "u");
|
||||||
|
if (format & NUM_ALIGN_LEFT) { /* ̤<><CCA4><EFBFBD><EFBFBD> */ }
|
||||||
|
|
||||||
|
sprintf(buf, f, number);
|
||||||
|
_text_put_string(x, y, buf);
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_put_numeric() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_store_numeric(char * buffer, int len, int format, int number)
|
void text_store_numeric(char * buffer, int len, int format, int number)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
sprintf(buffer, "%d", number);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_fill_char(int x, int y, int len, int code)
|
void text_fill_char(int x, int y, int len, int code)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
int i;
|
||||||
printf("%c\n", (unsigned char)code);
|
|
||||||
|
printf("call : text_fill_char() : x = %d, y = %d, length = %d, code = %d\n", x, y, len, code);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
_text_put_char(x + i, y, code);
|
||||||
|
}
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_fill_char() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_set_palette(int palette_num)
|
void text_set_palette(int palette_num)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWText ww_text;
|
||||||
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
printf("call : text_set_palette() : palette = %d\n", palette_num);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
WWText_SetPalette(ww_text, WWDisplay_GetPalette(ww_display, palette_num));
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_set_palette() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int text_get_palette(void)
|
int text_get_palette(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWText ww_text;
|
||||||
return (0);
|
int num;
|
||||||
|
|
||||||
|
printf("call : text_get_palette() : \n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
|
||||||
|
num = WWPalette_GetNumber(WWText_GetPalette(ww_text));
|
||||||
|
|
||||||
|
WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_get_palette() : return value = %d\n", num);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return (num);
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_set_ank_font(int font_base_num, int is_color, int font_count,
|
void text_set_ank_font(int font_base_num, int is_color, int font_count,
|
||||||
void * font)
|
void * font)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_set_sjis_font(void * font_address)
|
void text_set_sjis_font(void * font_address)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_get_fontdata(int char_code, void * fontdata_buffer)
|
void text_get_fontdata(int char_code, void * fontdata_buffer)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_set_screen(int screen)
|
void text_set_screen(int screen)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWText ww_text;
|
||||||
|
WWDisplay ww_display;
|
||||||
|
|
||||||
|
printf("call : text_set_screen() : screen = %d\n", screen);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
ww_display = WonxDisplay_GetWWDisplay(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
WWText_SetScreen(ww_text, WWDisplay_GetScreen(ww_display, screen));
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_set_screen() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int text_get_screen(void)
|
int text_get_screen(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
WWText ww_text;
|
||||||
return (0);
|
int n;
|
||||||
|
|
||||||
|
printf("call : text_get_screen() : \n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if (!Wonx_IsCreated()) Wonx_Create();
|
||||||
|
|
||||||
|
ww_text = WonxText_GetWWText(Wonx_GetWonxText());
|
||||||
|
|
||||||
|
n = WWScreen_GetNumber(WWText_GetScreen(ww_text));
|
||||||
|
|
||||||
|
WonxDisplay_Flush(Wonx_GetWonxDisplay());
|
||||||
|
|
||||||
|
printf("call : text_set_screen() : return value = %d\n", n);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return (n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cursor_display(int cursor_enable)
|
void cursor_display(int cursor_enable)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cursor_status(void)
|
int cursor_status(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cursor_set_location(int x, int y, int w, int h)
|
void cursor_set_location(int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long cursor_get_location(void)
|
unsigned long cursor_get_location(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cursor_set_type(int palette_num, int blink_interval)
|
void cursor_set_type(int palette_num, int blink_interval)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long cursor_get_type(void)
|
unsigned long cursor_get_type(void)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int text_printf(int x, int y, const char *format, ...)
|
int text_printf(int x, int y, const char *format, ...)
|
||||||
{
|
{
|
||||||
if (wonx_display == NULL) Wonx_Create();
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
188
timer.c
188
timer.c
@@ -1,33 +1,191 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include <sys/timer.h>
|
#include <sys/timer.h>
|
||||||
|
|
||||||
#include "wonx.h"
|
#include "Wonx.h"
|
||||||
|
#include "etc.h"
|
||||||
|
|
||||||
#include "WonxDisplay.h"
|
typedef struct {
|
||||||
|
unsigned char year;
|
||||||
|
unsigned char month;
|
||||||
|
unsigned char date;
|
||||||
|
unsigned char day_of_week;
|
||||||
|
unsigned char hour;
|
||||||
|
unsigned char minute;
|
||||||
|
unsigned char second;
|
||||||
|
} datetime_t;
|
||||||
|
|
||||||
|
/* int tm_year; year - 1900 */
|
||||||
|
static int get_year(struct tm * tblock) { return (tblock->tm_year - 100); }
|
||||||
|
/* int tm_mon; month of year (0-11) */
|
||||||
|
static int get_month(struct tm * tblock) { return (tblock->tm_mon + 1); }
|
||||||
|
/* int tm_mday; day of month (1-31) */
|
||||||
|
static int get_day(struct tm * tblock) { return (tblock->tm_mday); }
|
||||||
|
/* int tm_wday; day of week (Sunday = 0) */
|
||||||
|
static int get_week(struct tm * tblock) { return (tblock->tm_wday); }
|
||||||
|
/* int tm_hour; hours (0 - 23) */
|
||||||
|
static int get_hour(struct tm * tblock) { return (tblock->tm_hour); }
|
||||||
|
/* int tm_min; minutes (0 - 59) */
|
||||||
|
static int get_minute(struct tm * tblock) { return (tblock->tm_min); }
|
||||||
|
/* int tm_sec; seconds (0 - 60) */
|
||||||
|
static int get_second(struct tm * tblock) { return (tblock->tm_sec); }
|
||||||
|
|
||||||
void rtc_set_datetime(int field, unsigned int value)
|
void rtc_set_datetime(int field, unsigned int value)
|
||||||
{
|
{
|
||||||
|
printf("call : rtc_set_datetime() : field = %d, value = %d\n",
|
||||||
|
field, (int)value);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : rtc_set_datetime() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : rtc_set_datetime() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int rtc_get_datetime(int field)
|
unsigned int rtc_get_datetime(int field)
|
||||||
{
|
{
|
||||||
unsigned int t;
|
unsigned int ret = 0;
|
||||||
t = (unsigned int)time(NULL); /* <20><><EFBFBD><EFBFBD><EFBFBD>ϤƤ<CFA4><C6A4>Ȥ<EFBFBD><C8A4>ʤΤǡ<CEA4><C7A1><EFBFBD><EFBFBD>Ȥǽ<C8A4><C7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뤳<EFBFBD><EBA4B3> */
|
time_t timer;
|
||||||
return (t);
|
struct tm * tblock;
|
||||||
|
|
||||||
|
printf("call : rtc_get_datetime() : field = %d\n", field);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
time(&timer);
|
||||||
|
tblock = localtime(&timer);
|
||||||
|
|
||||||
|
switch (field) {
|
||||||
|
case RTC_YEAR : ret = get_year( tblock); break;
|
||||||
|
case RTC_MONTH : ret = get_month( tblock); break;
|
||||||
|
case RTC_DATE : ret = get_day( tblock); break;
|
||||||
|
case RTC_DAY_OF_WEEK : ret = get_week( tblock); break;
|
||||||
|
case RTC_HOUR : ret = get_hour( tblock); break;
|
||||||
|
case RTC_MIN : ret = get_minute(tblock); break;
|
||||||
|
case RTC_SEC : ret = get_second(tblock); break;
|
||||||
|
default : Error("rtc_get_datetime", "Unknown parameter.");
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("call : rtc_get_datetime() : return value = %d\n", (int)ret);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtc_set_datetime_struct(void * buffer)
|
||||||
|
{
|
||||||
|
printf("call : rtc_set_datetime_struct() : buffer = %p\n", buffer);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : rtc_set_datetime_struct() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : rtc_set_datetime_struct() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtc_get_datetime_struct(void * buffer)
|
||||||
|
{
|
||||||
|
time_t timer;
|
||||||
|
struct tm * tblock;
|
||||||
|
datetime_t * p;
|
||||||
|
|
||||||
|
printf("call : rtc_get_datetime_struct() : buffer = %p\n", buffer);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
time(&timer);
|
||||||
|
tblock = localtime(&timer);
|
||||||
|
|
||||||
|
p = (datetime_t *)buffer;
|
||||||
|
|
||||||
|
p->year = get_year(tblock);
|
||||||
|
p->month = get_month(tblock);
|
||||||
|
p->date = get_day(tblock);
|
||||||
|
p->day_of_week = get_week(tblock);
|
||||||
|
p->hour = get_hour(tblock);
|
||||||
|
p->minute = get_minute(tblock);
|
||||||
|
p->second = get_second(tblock);
|
||||||
|
|
||||||
|
printf("call : rtc_get_datetime_struct() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtc_enable_alarm(int hour, int minute)
|
||||||
|
{
|
||||||
|
printf("call : rtc_enable_alarm() : hour = %d, minute = %d\n", hour, minute);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : rtc_enable_alarm() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : rtc_enable_alarm() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtc_set_datetime_struct(void * buf)
|
|
||||||
{}
|
|
||||||
void rtc_get_datetime_struct(void * buf)
|
|
||||||
{}
|
|
||||||
void rtc_enable_alarm(int hour, int min)
|
|
||||||
{}
|
|
||||||
void rtc_disable_alarm(void)
|
void rtc_disable_alarm(void)
|
||||||
{}
|
{
|
||||||
|
printf("call : rtc_disable_alarm() : \n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : rtc_disable_alarm() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : rtc_disable_alarm() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void timer_enable(int type, unsigned int auto_preset, unsigned int preset)
|
void timer_enable(int type, unsigned int auto_preset, unsigned int preset)
|
||||||
{}
|
{
|
||||||
|
printf("call : timer_enable() : type = %d, auto_preset = %u, preset = %u\n",
|
||||||
|
type, (int)auto_preset, (int)preset);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : timer_enable() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : timer_enable() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void timer_disable(int type)
|
void timer_disable(int type)
|
||||||
{}
|
{
|
||||||
|
printf("call : timer_disable() : type = %d\n", type);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : timer_disable() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : timer_disable() : return value = none\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int timer_get_count(int type)
|
unsigned int timer_get_count(int type)
|
||||||
{}
|
{
|
||||||
|
unsigned int ret = 0;
|
||||||
|
|
||||||
|
printf("call : timer_get_count() : type = %d\n", type);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
/* ̤<><CCA4><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD> */
|
||||||
|
printf("call : timer_get_count() : not supported\n");
|
||||||
|
|
||||||
|
printf("call : timer_get_count() : return value = %u\n", ret);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|||||||
16
wonx.c
16
wonx.c
@@ -1,16 +0,0 @@
|
|||||||
#include "wonx.h"
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* <20>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ץ쥤<D7A5>γ<EFBFBD><CEB3><EFBFBD> */
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
WonxDisplay wonx_display = NULL;
|
|
||||||
|
|
||||||
void Wonx_Create(void)
|
|
||||||
{
|
|
||||||
wonx_display =
|
|
||||||
WonxDisplay_Create(LCD_PIXEL_WIDTH * 2, LCD_PIXEL_HEIGHT * 2,
|
|
||||||
LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT,
|
|
||||||
SCREEN_CHAR_WIDTH, SCREEN_CHAR_HEIGHT);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user