[Tux4kids-commits] r602 - in tuxtype/trunk: . data data/images/hands src
sreyas-guest at alioth.debian.org
sreyas-guest at alioth.debian.org
Sun Aug 10 14:02:07 UTC 2008
Author: sreyas-guest
Date: 2008-08-10 14:02:06 +0000 (Sun, 10 Aug 2008)
New Revision: 602
Added:
tuxtype/trunk/data/images/hands/0.png
tuxtype/trunk/data/images/hands/1.png
tuxtype/trunk/data/images/hands/2.png
tuxtype/trunk/data/images/hands/3.png
tuxtype/trunk/data/images/hands/4.png
tuxtype/trunk/data/images/hands/5.png
tuxtype/trunk/data/images/hands/6.png
tuxtype/trunk/data/images/hands/7.png
tuxtype/trunk/data/images/hands/8.png
tuxtype/trunk/data/images/hands/9.png
tuxtype/trunk/data/images/hands/Makefile.am
tuxtype/trunk/data/images/hands/hands.png
tuxtype/trunk/data/images/hands/lshift.png
tuxtype/trunk/data/images/hands/none.png
tuxtype/trunk/data/images/hands/rshift.png
Removed:
tuxtype/trunk/data/images/hands/0.png
tuxtype/trunk/data/images/hands/1.png
tuxtype/trunk/data/images/hands/2.png
tuxtype/trunk/data/images/hands/3.png
tuxtype/trunk/data/images/hands/4.png
tuxtype/trunk/data/images/hands/5.png
tuxtype/trunk/data/images/hands/6.png
tuxtype/trunk/data/images/hands/7.png
tuxtype/trunk/data/images/hands/8.png
tuxtype/trunk/data/images/hands/9.png
tuxtype/trunk/data/images/hands/Makefile.am
tuxtype/trunk/data/images/hands/Makefile.in
tuxtype/trunk/data/images/hands/hands.png
Modified:
tuxtype/trunk/ChangeLog
tuxtype/trunk/data/Makefile.am
tuxtype/trunk/src/alphabet.c
tuxtype/trunk/src/funcs.h
tuxtype/trunk/src/practice.c
tuxtype/trunk/src/titlescreen.c
Log:
merged soc3 to trunk
Modified: tuxtype/trunk/ChangeLog
===================================================================
--- tuxtype/trunk/ChangeLog 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/ChangeLog 2008-08-10 14:02:06 UTC (rev 602)
@@ -1,4 +1,16 @@
+3 Aug 2008 - svn revision 599
+[ Sreyas Kurumanghat <k.sreyas at gmail.com ]
+ - Added keypress details for wrong key pressed in practice.
+3 Aug 2008 - svn revision 580
+[ Sreyas Kurumanghat <k.sreyas at gmail.com ]
+ - Added automatic keyboard layout generation in practice.c.
+ - Modified the keyboard.lst file format. The current format can be any of the three below:
+ - char
+ - finger|char
+ - finger|char|latin character
+ - Features added so that the information about the keyboard gets updated each time the game is run.
+
13 Apr 2008 - svn revision 460
[ David Bruce <dbruce at tampabay.rr.com> ]
- fixed small typo bug in alphabet.c (thanks Patrick Winnertz)
Modified: tuxtype/trunk/data/Makefile.am
===================================================================
--- tuxtype/trunk/data/Makefile.am 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/data/Makefile.am 2008-08-10 14:02:06 UTC (rev 602)
@@ -5,4 +5,5 @@
tuxtypedatadir = $(pkgdatadir)/data
-dist_tuxtypedata_DATA = keyboard.lst
+dist_tuxtypedata_DATA = keyboard.lst \
+ phrases.txt
Deleted: tuxtype/trunk/data/images/hands/0.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/0.png (from rev 600, tuxtype/branches/soc3/data/images/hands/0.png)
===================================================================
--- tuxtype/trunk/data/images/hands/0.png (rev 0)
+++ tuxtype/trunk/data/images/hands/0.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,8 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+ÃPÈ tEXtComment Created with The GIMPïd%n IDATxÚíÛ;hAÇñï&ZúñQh!6b%h!ÑÎ(UÔÆÂJÄ
E¤°±
¥
"ÄG4
ÑÄÁMQ/w{c±ÿ#Í&ÈeïýûÀr{{ÇçnÿÌÌÎÎHMpÀA`°øLª Û[ÀS{Ý¡kªsÀ äQàb5ôµÐÙëpX×/5g- ÷J1~S5B`û°)ÍàÂ`yìØêã/K+Pð~®ßFÀðȧö¾ÿø¬·÷y«
~[¢4Y`
+X[ª÷{ÕôÙ>vrçm!°ox7û¾]ÀùJ«ÀGKíYäû+Nk&±~X.Ö4¥*ø!ïD~;õÌ>ïò!î «÷3/l Dxûýyàýâ%]Ø;Qa;Vd¼0!ÖÃJlB"d+ÿÝðÿÞ¶ØKçê:,9(u"¼c'²ûÙbLzq
+Û«ºp?b¿ß?Vnëx:{í.eá7À}
+XSd¬£À5Yà1°¥¡Ãë'åm¿CT]ÀVà ´íNhdRªÇuÒÕa#Ð?Îûî.|q³CÚRBæfñÍ °Í{×õwÕ¯ø(¤³s!®7ºÅ:K¨Ok´·®]!aDw¦ý!®3z¼-ä8ܲ$w &Hk'"Ú6ô2>e9´ =ÌÔefnIô1xt8]²ìeî¥ÎD®¤[¶¹«ª¢Ô(ËN;¿¿Ô¯YPS Í@VeÙXpÃ.z¡iÈÏã[+ÑzDÿ@&BPkn!ZS¹hÑç ÑÊë¢õåä{V¦À[àufEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD¤þÚY;^+ó IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/1.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/1.png (from rev 600, tuxtype/branches/soc3/data/images/hands/1.png)
===================================================================
--- tuxtype/trunk/data/images/hands/1.png (rev 0)
+++ tuxtype/trunk/data/images/hands/1.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,13 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+9V½ tEXtComment Created with The GIMPïd%n
+IDATxÚíÛ;hAÇñï&QM/ÐB°Vbá£2`µ±°4>Ha#V"HlIaaa¡¾¢h
+>5A jLbðïnÇbÿG6KËÞ]îö÷e÷eî;ÿÛÝÙ ªà]ÀJ`-0×ç[ ëËÀ=[oPÝ%ê8p B`85}n:[ {T9fIàbçøCå×%yEl; Ö$Y¸ðXàíkN°ü¤
+
+
+|^®úÑ pøü²À! }ãß_ö9´«pÞ/Kz ËJxãxsàràzá³ÈÄ.[È;f)ï"Ðg'áÐ HQ"Þ[dmûè,Ç79zý°¬×4çJønØOü»oW¨ÎX2ä+ÀYÊûÜYûw0EðÚûý!ðvå
Þ1,Uà;a³óÁÛ_dýå¼Àp3E)
+&Â÷çFá©+poÛÅö)WÖbuæ:^ ýÞ½îg_øX¬üò,E÷Íûýñ}Å貧³uW)_
+÷\¸-ÀÒ"ËÚ|µ&"ÜÖ¥(:bý¤Ð¶;tay&ØXGíÐ\Òy©iãÀ"&öí¶c¸êÝßKíÉ1ýa½{ù¿À-«æ?
t@Ý*ï `¡ÎU*!Ïu
ê\Õ´³x¢;äí î9 at 4fàùF/HÕk·ÛÝ-ÃÀ]*3>Òt3ù*yèQG/ÓL#eSpæú&r%Uݬ´6¦Îª
+&V´V öýñ©~õJò/ÐL ñÔ%«ô|ÓMÇ/·V¢ùñWüûª4j¸
hNåV¢IýD3¯»&®YLMÀKà¼ufEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD¤þ(ëþd5g¢¯ IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/2.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/2.png (from rev 600, tuxtype/branches/soc3/data/images/hands/2.png)
===================================================================
--- tuxtype/trunk/data/images/hands/2.png (rev 0)
+++ tuxtype/trunk/data/images/hands/2.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,8 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+qR± tEXtComment Created with The GIMPïd%n IDATxÚíÛ=hÔ`Çño®ÕA¨ZkU°àXÄAÐIVª.¢â âÐÅ:¸bEÁª\ZAQ[¢Ö¶_®wÇ!ÿ³i¹æÞå÷p¹\xòÜóüÉóxHMpÀ>`=° &;K-£[^p}àzÁmSÝ%ê4ð È>0[}Îçìs
+`³ª0§,m>ð!ÁôsIÞ<Û÷6hÌÁUa2~Ë"ÇV'~cR y1ß[a«ª0Þpþ EàÐ9Çùï/À:ûîwá~Y 4 `X[?³8 ôÛ>ÁÅm%p°g®ô®VnàLáðÞ hû'ç9¿ 8nÍÁ8ð÷áºñ~ªbèBávêýÞ
+®
+àVÍÞ÷HzyàháuäÿûÀÛ¤W7U±7r¡òv¸ÂôJ1iÝÍP b¡b üwgq<ÔǶvX¼HzX©®ÃjÂK`0r±76ÄD(òö<C÷-òÿÃÇ*ÑcOg=ÕÌüFñàSà6°XSaZ¯ÖDûdkÒ¡+ÔOòm¿K76Yb¼ÀuÔ~ íÀ5K]V0½,0pøhÃ1àfÌ|Ô³'³øËO÷TVu-:éÜÈIÀrU&¡Ì¹¸åã*«ºvÝÈÁ<Ár§dÌ5G0å{hU±Hmë´ánɶQà!é¬4×~¼@ðä,~f/'RÈËnf.à,ôIä4åj-ÃíÌ|«Ê#xº%
¼l·ë_õkP ,Éf ÖG2W¬ÒËMCxô¥÷ÃøÔh xµáf ØEðÒç Ðf¶¡EÎnYWÀeëÌHþZÇýbL¢ IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/3.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/3.png (from rev 600, tuxtype/branches/soc3/data/images/hands/3.png)
===================================================================
--- tuxtype/trunk/data/images/hands/3.png (rev 0)
+++ tuxtype/trunk/data/images/hands/3.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,11 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+*)Å tEXtComment Created with The GIMPïd%n üIDATxÚíÛ;hAÇñï&ÑBã´R+A+µ3`壱4>Ha#V"Ø(bai¡¾¢Ø$ *¢&(ÁÔ\îöÆbþG6K»½»ÜíïÃîí-³ÃÌÝÙ ©Øl ¶ ÃÀ$pw©t+pxlÛmj»D bA_[mj¿Ä± p:þ`þMIÞÛÍIf.üÅN0ÿ¤2
+ü^§ö[Ðp¦pèZàüÀw`½ýÎÛ]¸àJ3¦µ*øËÈí?úm»¸¤Ø³H~×áè ä¦Á}×
+Ãç|?(® , r¶zó[ö8 Åúa¹Ø£9¬TÁ÷G.}N=±ÿ»#Á7Uä7#ypÎRÜqø@x«Ï<ð¡üµMEì]¨_ Bº7{ixÙ"a üwnùäÊè°±ü°R]²JÂ`0v±÷ö>[I+k4_¥¨á~DêÑÅ¢Ç:ζ=,ü&àð¸ìÖ×ax1
+.÷ \Gáï'·4nÇDDDD`ðè ~@¯ê¥¡M+8ÿç, n¢¯:)2ÿcßbïò3À}ÕUC
t@ÓÆØI-ÀrÕU*¡ÀMÅ«®Úe|ÑÌà;%eáÇ0
+\DJDDDDDD¤îuÙënhixDmÆGÚ>f§gñ3·¤
+ú?`2ªAYv3w §ÜȵTw«Ò:»ª*ÀϤn¯AY¶Ûõ£KýÕ1Uä1Aã#©kÖè
GCx__míøõÑ)þuA½¸
+¿¦r~Ñç ~åu~}f59ඩx\µÎ¬ÔÐ?í' E˹?4 IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/4.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/4.png (from rev 600, tuxtype/branches/soc3/data/images/hands/4.png)
===================================================================
--- tuxtype/trunk/data/images/hands/4.png (rev 0)
+++ tuxtype/trunk/data/images/hands/4.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,10 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+:4rÄ tEXtComment Created with The GIMPïd%n IDATxÚíÛ?UðÏ^.B41þÁBµQ;#¬¢6¢b!¢Æ?¤°+$"(bai¡ÆÁ&A´0"ê%h4èmövÇbßÉdsÈÞîÞý~`ØÙÙá7oßû1ófÞØ*ìÅu¸ 'pﯷÞ7q¨|Þ¶©gð1Úèá$^Xýº°*sx0í72O$¨juüÓãÏòÐ*ë-ìeðð¶6¶maüÙQj
+ø~MÚïæð<ÎaKx{.±ÿø
+×ï½r^öwI-è`W«à_ÔNÿ])ëÊÁ«ÚÒÅ}+Ä{GK%üýxváüX`©¬?µÂþÛðD¹Ìã³F?l©qiî«àÔT¿N}Z~ß_K.ÞÆ+Äû³¯Ç¦(¾küÿ¾_E¼Am3÷7´¼<2d¼îXLQ"t$Bg
+á÷çækú½í°V#^
+ÒuXu"w"|c/÷³Ã8S³¼|5E
+wªñÿëÛq t<«òy`
¿/ás¼»qÕ±ÆïåÑÁG¸ya_Ô+ëûrbu¦u'NÚ_Ø7R/Ú.w~Xà<ËmÇi¼3àyAl.]?Ìòkã^þ>L]mjͧf®oì4ËRWSË*Ì>>ºÚÔ^6àîÉÆƶþpgLGõÇ*ýG¾/ÊØðöp×qæ»ôºT°ø oUìtYvà óSÉ;ú3·bPõ¨ª²ôúÉÐyÃ.˽.ÀYíLäµ´áÞJÛí·ªZØÎìNntYî(ǯ¿ê·%0.&oãlþgLK"¼ÖoôÿÆFpÅCÜ8é²ìÔ±>ÅÿèMÙVà´æøònÝc´w±÷Ôå9¼[:Ûð-^ÍÉ%""""""""""""""""""""""""""""""""""""""""bíýâÉù1
+- IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/5.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/5.png (from rev 600, tuxtype/branches/soc3/data/images/hands/5.png)
===================================================================
--- tuxtype/trunk/data/images/hands/5.png (rev 0)
+++ tuxtype/trunk/data/images/hands/5.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,8 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+¸Ü tEXtComment Created with The GIMPïd%n IDATxÚíÛ;¨UðßÞDÁg|e°´R»D¬¢6¢b!">Hac)hcV"Q|E± ¨¨\bn^_÷îc,ö,L6ÙìÞ½{÷ÿafçßóÝsÎÌÙiPá~Ü[qgðÖF+èíxõ©»±zïc=,âùXÐÃ¥UYÅ©¿±yº$AU»Æ?1þÂ8[VÙnáqÿàƾ«Ç븵|¾>õwAGñVñ/:x;/pü8Êç^i
þ.²m,ãºIüZóßÅÁ²¼ª-]ìX#Þ«8T.¯ØÝs/ãÇ ²ýÔÇ_'Jwp6ÆaF×ÜTÁ¨¨ÞO}\þ¾§]¼«Öw²oÍQ"|Ûøþ=|ñÕÍDÜ×8Ñ`ydÄxÝ!±Þ£DhIöáçN׺ú½í¨V#^
+3t¸èD0éD8/'û®ÜÏâL-Î`ùj*îDãû×÷boxVe½w
¿/â3ìÇݸvÄXã÷ÒE´ñn£DØU'õÊö®4l±Á´î©2PûÛñZ®Ë¦¶Ë8áçrÛq
+û</Í¥ëüY~kÜ˯â@®Õ¦Ö|
+Yaá¦ÆA[qi®Õ\$Â@
aÓÇåZmj/òDw±±sEº3æÌ£úsþ#ßä%1óvÛÝnYð¡éÌ\×9Ù¡×£jÓÛÏ»©¥upÐù&Kxr
+e¹ËºT=ªª¬Û3:g7so¥mwî[U-ý_RoBYîäD˹¯úmÑ°Kå!ÝÀÌÌ]"¼R*}Ð5tðþëøëmÏïwòÑD¹ì|?/r¸?Xó'>wö]õòGÞfõîYdá vÓZJ1]ÿæàýt ÒÊ IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/6.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/6.png (from rev 600, tuxtype/branches/soc3/data/images/hands/6.png)
===================================================================
--- tuxtype/trunk/data/images/hands/6.png (rev 0)
+++ tuxtype/trunk/data/images/hands/6.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,9 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+,Ù½Ô tEXtComment Created with The GIMPïd%n ÷IDATxÚíÛ;hAÀñÿŨÄW-K±´R;D-Zh¡ XXX©XØE-,%ø ß`£ -T$>PÄGâËÝXìÙ¬äîËý0ÜÝfý²ó±3»³C
+! ë¹ÀBà
+ð¸4Ö]nÆÏ¥¶]Uí®y ¼Å@»b!~¾6Û~U³/&AHãU¬¿¥W\üT³rñÙ6s,&B®Âï9¶ß^ðotmaý56Ôþ/+BWêï?BÜ>Õ0pî§.ÿEànüN"¤JXýúNßÀ[à p á8ìÐK7½pk¨ý[ݱ;øÜÉÃú3]s±VoH(åȦ¡fü£¾L}y`W%ÂS%!çI{K¥¶©µËöaÖW¬P×å&JB
D(\`ëÿ=FøÂßQXrú0Ý¡#Mj=÷³Ãñ5UO¹<j¢ûùÿá ï(Ðëê¿kf>p¸\V ³Y×Vàcì"
+ÀU`Q%B;töÄ.¡¡B;tzm$IcIn9ÐjßÅÀiÏ˸öÊÀ´À-À«xÛÑcO5Ô~ Ux¹ï®x®ÆµìSÈ ´ÌËì4ì¹jD(@K¥éã«qíè¾ÏlÌLwªÉì 3$|ã%$I¤·&ÞîcùÜ`tæGf¼J^ ysKup¿'L>{F!UÀ)'C#j¸Ui¼ª*Gò&uÛ(IJ,?½ÔoPß+tyiºD8½Ü5ô·Iã×[ë4rð,5+IV?$YyÝA²>³p>ÆÔ
+<NÄÁ¬$I$I$I$I$I$I$I$I$I$I¤Qô´ÞÜ IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/7.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/7.png (from rev 600, tuxtype/branches/soc3/data/images/hands/7.png)
===================================================================
--- tuxtype/trunk/data/images/hands/7.png (rev 0)
+++ tuxtype/trunk/data/images/hands/7.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,12 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+òo[ tEXtComment Created with The GIMPïd%n ÿIDATxÚíÜ;hAñïâ£P|Ä
+*AÔNQ_
Ú Q±°+D±°´ð¾Á&´ðE| !êår·;G63Hî.Ë}?Xr·»ÌÎÍüÝIÕ
6À¢yp~1t¾8r
+Þ«.. wÃßåÖ]Eå·áu¢D]
gã.£@!\
+ÄaºÍú«p1Q¶Doã⮦J¶ð9,¬dââ7,Ú7»éW¬®2%¾Ïµþþé=°Ø l6ÃÆ[0ý_翶ϡÅ-¶ºã¿\ؾV3ãÍxÈ`ÛKd²x|íéÚ?ÀGà0p¨áÐ Ø?Âù3¶p;èèDÉ~Ø@êÖ¯VÆ7%.Ê{áøáD0äKÀ¬ÒûJ/ìm @xúýàU骪XºPqÛ5Êôò%ÒºÞ@+¹Â÷ºÞEÊè°dRéEÀL»eÕgÀÔÅ^]£ÌxO"âö´*îkê÷SfïÐÒêß«fpx\VsFÖàK¸EäÀ
+~R!|ÞjÃ&IÆÌJàGè¨ýZsËÖLcpXàÀvà]xìø\¦CZòŧԳ|?pòÐÒo!# i~ê¤ÉÀT˪!¡(J
+÷YVÚIJ¼ÑíJíÌmUãÙM<f¿ò=J$I$Iuo]xÜÍípÚ4çJ#¹¥1ðá&ß}5ÈËà;¹ênUZ+CWUegR·Ô /+ÂõKý&c£·Äm ã#
+gB¥o
+À}âåøcøÌÐ)þíuzËp3ñÊÕÀâµC§m¬ÿcD\ y<Nά$I$I$I$I$I$I$I$I$I$I¤úñáÿ|püN IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/8.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/8.png (from rev 600, tuxtype/branches/soc3/data/images/hands/8.png)
===================================================================
--- tuxtype/trunk/data/images/hands/8.png (rev 0)
+++ tuxtype/trunk/data/images/hands/8.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,12 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+æ3 tEXtComment Created with The GIMPïd%n õIDATxÚíÛ;hAÀñÿÅG!ÄW-Ë`%h¥v*ZµÐB;A±±H¥b¡
X ±QÄÂÒÂø`A-T$jPÏhðq¹Ü®ÅÎéº9\îrw¹ÿÝÛ[¾ùØÝÙÉ¡¦
ÀR` ø\n´.ηÂz
mWU@Aàp#ôQ(`Ö¯¶_ÕI§êøeã·UóÛ9`I5À̾¹¹2Ø~ÿôØ
+ì ¶ ëãÿx9#<J}ÿ`4(Ñ8Q³ßOþ@oØ(¤
+Yú~Ý8ñÎ }ÀOà
+Ð
+j¡D8 ô£aéös|;°7\»~Ø(DÄ1ÄÄŤ©ªoS* ÒYy;|ßJ"p3N¼Oxy`O%ÂÓÌÿçWJ85)øLÆ+u¥
¡P&
+uLÿî#16r<K./fÛuH"ü®ÏRbÕ$2?ö,ÜÏVâK*NiyØB
+÷!óÿÓû*q ±FÂçYîÕÀü
+cmÞKD¸,k¡DèJõ¢°ÝåM$5Ü*àsè¨}:³ÖË6ÌâÏ°À À6àU¸íø\ V¤Ô(}ÅÛ̽üpÕºÒ²C1ж(sÐt`¦uÕPmå¿YWSÚqÊ<ÑÌìÌwªÅì"3IùÁJ$I$IMo}¸Ý-å#púÌzH^G/½|zÉ&½0ùì«CYÖò÷ ÎDßD®§¦ÖÉß³ªr$oRwÔ¡,+Ã裏úM3&ÇpË@ÇGZ.NF/]F;$Óñ'[æ#Ö}M¹f+ð<9kHf? yÝC2?s2ÅÀÅP¦và p*tf%I$I$I$I$I$I$I$I$I$I$ÕÑ/swÿ-Õ. IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/9.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/9.png (from rev 600, tuxtype/branches/soc3/data/images/hands/9.png)
===================================================================
--- tuxtype/trunk/data/images/hands/9.png (rev 0)
+++ tuxtype/trunk/data/images/hands/9.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,12 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+).Ob tEXtComment Created with The GIMPïd%n íIDATxÚíÛ9QÀñÖÕn½/ÐBlÄJÐBÔÎU+ÆÂJDÅBÄb,+±YE,,-Ál\AñBYïÅ#&±ÇÙEb²Ù$ÿ<2ß¼¼ù÷æxÔb`=0X ¼¾ Æ[E §kás©Ç®®öW"ÀÁñXÑû¡qø| lòøÕÍÞqª×1~W=Ï
°\ æ×3¸øL̬ZÇøÝõ
+TÈù>Ëã7¢Àà'ð(;Þ¶
+¼fïQ8W}2(ÃÀÌFUüNêô_n
eÂÎãT© kFw
+¸á5Ðìï D8< PË{Fپغ!àffVÎtÍFU|CjGé~êzø½/à0ex2ñÀJGÿOþ#^Þ±iµUËÖãUrb]ì D(å$B©ðÏ㹡T7¾¶uÀRÈÄÉþ;ht"< 2;{®gkñ%§ZîuÐûùÿéuµ8qø<ÒÈÊÏ·óÀJ`z±¶ ïCQ.;(6¦ÆIQXÞèM$7ËEÀ:`°Ý&i{Ãp¬qÊxËfàE¸ìø͹_ öR(8%7kùÀ%Ûª¥ Zºæf6ê&ÙVíÝÕíÊ{|üÕ¶jkGɹ£;YY$yÜ©³äALrË÷¾P"I$Ijy½ár·ÊGà*Íy>2
+èç÷«ä%7·4nñ÷Û¿ÝM¨Ëêéù¥m׶?gUHޤѺ,ûOOõ`"án ÏG:.N^íÊÀ
+éøcmÉ|Äô+þw[4
+Vái$s*WLú yÝO2?s,ÅÀ¹P§à!p"f%I$I$I$I$I$I$I$I$I$I$5Ñ/оùöC
+@Õ IEND®B`
\ No newline at end of file
Deleted: tuxtype/trunk/data/images/hands/Makefile.am
===================================================================
--- tuxtype/trunk/data/images/hands/Makefile.am 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/data/images/hands/Makefile.am 2008-08-10 14:02:06 UTC (rev 602)
@@ -1,42 +0,0 @@
-EXTRA_DIST = hands.png\
-0.png\
-1.png\
-2.png\
-3.png\
-4.png\
-5.png\
-6.png\
-7.png\
-8.png\
-9.png
-
-
-
-install-data-local:
- $(MKDIR_P) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands
- $(INSTALL_DATA) $(srcdir)/0.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/0.png
- $(INSTALL_DATA) $(srcdir)/1.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/1.png
- $(INSTALL_DATA) $(srcdir)/hands.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/hands.png
- $(INSTALL_DATA) $(srcdir)/2.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/2.png
- $(INSTALL_DATA) $(srcdir)/3.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/3.png
- $(INSTALL_DATA) $(srcdir)/4.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/4.png
- $(INSTALL_DATA) $(srcdir)/5.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/5.png
- $(INSTALL_DATA) $(srcdir)/6.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/6.png
- $(INSTALL_DATA) $(srcdir)/7.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/7.png
- $(INSTALL_DATA) $(srcdir)/8.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/8.png
- $(INSTALL_DATA) $(srcdir)/9.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/9.png
-
-
-
-uninstall-local:
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/0.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/1.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/hands.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/2.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/3.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/4.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/5.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/6.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/7.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/8.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/9.png
Copied: tuxtype/trunk/data/images/hands/Makefile.am (from rev 600, tuxtype/branches/soc3/data/images/hands/Makefile.am)
===================================================================
--- tuxtype/trunk/data/images/hands/Makefile.am (rev 0)
+++ tuxtype/trunk/data/images/hands/Makefile.am 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,51 @@
+EXTRA_DIST = hands.png\
+0.png\
+1.png\
+2.png\
+3.png\
+4.png\
+5.png\
+6.png\
+7.png\
+8.png\
+9.png\
+none.png\
+lshift.png\
+rshift.png\
+fishy1.png
+
+
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands
+ $(INSTALL_DATA) $(srcdir)/0.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/0.png
+ $(INSTALL_DATA) $(srcdir)/1.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/1.png
+ $(INSTALL_DATA) $(srcdir)/hands.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/hands.png
+ $(INSTALL_DATA) $(srcdir)/2.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/2.png
+ $(INSTALL_DATA) $(srcdir)/3.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/3.png
+ $(INSTALL_DATA) $(srcdir)/4.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/4.png
+ $(INSTALL_DATA) $(srcdir)/5.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/5.png
+ $(INSTALL_DATA) $(srcdir)/6.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/6.png
+ $(INSTALL_DATA) $(srcdir)/7.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/7.png
+ $(INSTALL_DATA) $(srcdir)/8.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/8.png
+ $(INSTALL_DATA) $(srcdir)/9.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/9.png
+ $(INSTALL_DATA) $(srcdir)/lshift.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/lshift.png
+ $(INSTALL_DATA) $(srcdir)/rshift.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/rshift.png
+ $(INSTALL_DATA) $(srcdir)/none.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/none.png
+
+
+uninstall-local:
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/0.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/1.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/hands.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/2.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/3.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/4.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/5.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/6.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/7.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/8.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/9.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/lshift.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/rshift.png
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/none.png
Deleted: tuxtype/trunk/data/images/hands/Makefile.in
===================================================================
--- tuxtype/trunk/data/images/hands/Makefile.in 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/data/images/hands/Makefile.in 2008-08-10 14:02:06 UTC (rev 602)
@@ -1,353 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = data/images/hands
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NSIS = @NSIS@
-NSI_DLL_DIR = @NSI_DLL_DIR@
-NSI_INSTALL_DIR = @NSI_INSTALL_DIR@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
-SDL_LIBS = @SDL_LIBS@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-WINDRES = @WINDRES@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = hands.png\
-0.png\
-1.png\
-2.png\
-3.png\
-4.png\
-5.png\
-6.png\
-7.png\
-8.png\
-9.png
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/images/hands/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign data/images/hands/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-data-local
-
-install-dvi: install-dvi-am
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-info: install-info-am
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-ps: install-ps-am
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-local
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am \
- install-data-local install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-local
-
-
-install-data-local:
- $(MKDIR_P) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands
- $(INSTALL_DATA) $(srcdir)/0.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/0.png
- $(INSTALL_DATA) $(srcdir)/1.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/1.png
- $(INSTALL_DATA) $(srcdir)/hands.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/hands.png
- $(INSTALL_DATA) $(srcdir)/2.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/2.png
- $(INSTALL_DATA) $(srcdir)/3.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/3.png
- $(INSTALL_DATA) $(srcdir)/4.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/4.png
- $(INSTALL_DATA) $(srcdir)/5.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/5.png
- $(INSTALL_DATA) $(srcdir)/6.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/6.png
- $(INSTALL_DATA) $(srcdir)/7.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/7.png
- $(INSTALL_DATA) $(srcdir)/8.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/8.png
- $(INSTALL_DATA) $(srcdir)/9.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/9.png
-
-uninstall-local:
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/0.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/1.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/hands.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/2.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/3.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/4.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/5.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/6.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/7.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/8.png
- rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/images/hands/9.png
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
Deleted: tuxtype/trunk/data/images/hands/hands.png
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/hands.png (from rev 600, tuxtype/branches/soc3/data/images/hands/hands.png)
===================================================================
--- tuxtype/trunk/data/images/hands/hands.png (rev 0)
+++ tuxtype/trunk/data/images/hands/hands.png 2008-08-10 14:02:06 UTC (rev 602)
@@ -0,0 +1,20 @@
+PNG
+
+
+IHDR K ¼ä_ bKGD ÿ ÿ ÿ ½§ pHYs tIMEØ
+ Å+ä tEXtComment Created with The GIMPïd%n ¯IDATxÚíylEÇ?ýµPr¨k"Q< *ÞxÄ#1#FTL45Á#©ñ61M¼9A%ð /)1jDäRREP*xT ´þ1óÃeÝýýf_w¿É$íÌììû½yûæ½7ov˱0ØTÉòlâlàA 8hþJ}µ@£ÌÏæÍ*úS\<%È!.Û#²ù³q
+·IÞ[Qç
èèø¿Bѧx)?OT¸x©ÃYæ´"lA(®^~õC5ýË=îQ Ü<ôJ WKÍÀÉ/F<Æ«îfËa~K-]-ÛîШ6à4ÍxµÀ6G¿PO Ü àÕd0fào~iXæªèñ7+X)ÕСã5ã©ñ5Ð5pW¿9´¬Û[0 B
wÛa4ªo5íó4ãÖô?(ð¬ab¯Vôç!ÏÚû
i,Z1P2ÝÀàô¸¼7~³yÊåT/ðÔ³!¸æDààlCÇ·@KT0¦keÑfwiÈÿXg "¼© ÌA)'-Ó(í³¢ç,/}|ô]¢©¯ :YúaSÂNmáºnîIìØ zØþ@ÈñÀ
~TKJ&¯X£h»x3ÀXC£Þ¿+ð°Jþÿ ÄBÍÅ5 ÅeÀ\ü¦iúV§èI~AÃo4*^Õw®l_ªi¯ÑÜ{¡«ßRpFÀ'|"Îí §(êÿÁ´àM}_à|ãoGTKÂI®ºTШpÃÀ9Á~p1ê´é@sAª¶0~=bØ»ÝöÉk¨
+pÃÃ{åÅî¾2#ïOàM[G Kã ôvÕ] Ü«óæhê»û¼aODtñ'ýiê§Lv ÒûTè!x?8A>nlvºê¢NV(º#übO-Ò89óøöBÇã[|1H£¿Wx:½`°ÆâlV¬-:¯¡I®y^^Ã>Øí xú°4ê®aÿÄà|Yü¬i
+tpݯYÓwp}X7÷°Æð¶apåq¥¦¾ {a×öÑR3¿¬Óô1E{ºUF¢Äª|g)+]Öý2;§0¸DÓÖÒÉÞfÛìÄûÌB½¡m½t!aJE¿Y at kΡTîøûgàmÃ<®®
+/¦Tv OÜȱ§ñp¦þa){Ý]Ý@ÇES5ý¶I+UÕ¶ ü®i_Rû þ;¡
+øÔÀ[Sê¸ÇH)tª~ûx)Õª;¤ÿYÅþ²6ÊäÈCBBËÒûè
ø©úlÎù]«É©cvBĬÒË'÷+ê'ðÜ=JLNuÒåz<Ü©r
+hZñ<Ë´ýØD>!xû}0Ø ]¤+ä¾÷IjÄá
+Ý+×bÍ¿k¶øxarH¼A'еRÓÙcÐ5!;ßÃà|çcÍ |Ù%5Yð±tËuíJ¾W_D©¼cÐ}F»,M¨ äí¬>1©|©q'÷Ûb(º¸ú3>¯ßH°d[8±yäÆÑ1*wcà¹ñDYgCÈ2jAè+"^׶ Gâ&ahñAç
+Ô¦ýcà÷L\g,s Ç qËÆø/ì!Ø
+1ѹ@ÒàTs<
¥þÅ>è¥6 ½ÏEÃÒñºîùÅêA&zÿ¿Í¡óºÇ+¤ê¸.òqÍ+1.:Ü+4ÝÎÌâÞ1,ž³ºHã+JâæG9´Á.þ(y¬öáNÞ)û>ñ4ÐÃòP\ØZ5õkL°ä¿FÂ04>Êì_ ÎVú´&\ÂÐêñ[>*p3©Ø2*éP-dLL({´AèWBÐý[f'¥rºIÚKH6¢OW/$M#<Z¢|,.eÉj`FÂÖÛRD~s§dq þwÖÂ.ì]jZarBxùzê4ÂvCOêQdÑVhH-[t{:AØCzSÌÃÀ¦¤t¯a"ÉÚX*KØΡx2òå3àºv¤ªÑªèÎ6·#·âï[¨Cdþ¼ÞáWi+ÃýÇc>¶hÄ1Hí4ô¯«/uäûkcàkQç/nØé¤ã¬GD,ã(ò]ÙåD»U:"EÄã0VÞrÛ
+ø*bS[Ì6µB`l\xOBÏB.']¨@ã²MðÂI«>2åÁ¦
+DÂð:J`ë¾TݶL»8Ññb3üáWËú,VZ¶æë9{ë³ùß'nsv^¶G(/1µmóÙg¼ó-ñzR GøÝîl¾µØx
+Á{I%°Xð~¦ ¡
+x¤HÿÏ{D©vf þ øÍζÅÑ£7p{T7ó+Ý0laf!NP'Jª/ÊV&Í`ìíè]QJx;ÀA¨¿÷´<g ¾|ÚuXú4]JP÷Éj?ås||x=Jcqñe<"¶ w
+\dCê²9ÝílBlN2ÈnyÖÂZ5'ce`.çËçF}»LZ±Èòb@È>áS(ßÇäõ*Ç<õÀ>DeÛøðTN^!8Eìó,òïääâÚ,× 7f
+ïw<` ¾Ã³Áëÿ JM©Â@¤" IEND®B`
\ No newline at end of file
Copied: tuxtype/trunk/data/images/hands/lshift.png (from rev 600, tuxtype/branches/soc3/data/images/hands/lshift.png)
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/none.png (from rev 600, tuxtype/branches/soc3/data/images/hands/none.png)
===================================================================
(Binary files differ)
Copied: tuxtype/trunk/data/images/hands/rshift.png (from rev 600, tuxtype/branches/soc3/data/images/hands/rshift.png)
===================================================================
(Binary files differ)
Modified: tuxtype/trunk/src/alphabet.c
===================================================================
--- tuxtype/trunk/src/alphabet.c 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/src/alphabet.c 2008-08-10 14:02:06 UTC (rev 602)
@@ -5,6 +5,8 @@
begin : Jan 6 2003
copyright : (C) 2003 by Jesse Andrews
email : jdandr2 at tux4kids.net
+Revised extensively: 2008
+Sreyas Kurumanghat <k.sreyas at gmail.com>
***************************************************************************/
/***************************************************************************
@@ -55,14 +57,22 @@
/* An individual item in the list of unicode characters in the keyboard setup. */
/* Basically, just the Unicode value for the key and the finger used to type it. */
+/*typedef struct keymap {
+ char keyname[5];
+ int shift;
+} keymap;*/
typedef struct kbd_char {
wchar_t unicode_value;
char finger;
+ //keymap key;
+ char keyname[5];
+ int shift;
+ char latin_char;
} kbd_char;
/* List with one entry for each typable character in keyboard setup - has the */
/* Unicode value of the key and the associated fingering. */
-static kbd_char keyboard_list[MAX_UNICODES] = {0, -1};
+static kbd_char keyboard_list[MAX_UNICODES] = {0, -1,0,0,-1};
@@ -84,6 +94,7 @@
static void clear_keyboard(void);
static int unicode_in_key_list(wchar_t uni_char);
int check_needed_unicodes_str(const wchar_t* s);
+int map_keys(wchar_t wide_char,kbd_char* keyboard_entry);
#ifndef WIN32
#ifndef MACOSX
@@ -182,18 +193,57 @@
{
fprintf(stderr, "Adding key: Unicode char = '%C'\tUnicode value = %d\tfinger = %d\n",
wide_str[2], wide_str[2], wcstol(&wide_str[0], NULL, 0));
- }
+ }
/* Just plug values into array: */
keyboard_list[k].unicode_value = wide_str[2];
keyboard_list[k].finger = wcstol(&wide_str[0], NULL, 0);
+ if (wcslen(wide_str) <5)
+ {
+ if(!settings.use_english)
+ {
+ map_keys(-1,&keyboard_list[k]);
+ keyboard_list[k].latin_char=-1;
+ keyboard_list[k].finger = wcstol(&wide_str[0], NULL, 0);
+ }
+ else
+ {
+ map_keys(wide_str[2],&keyboard_list[k]);
+ keyboard_list[k].latin_char=wide_str[2];
+ }
+ }
+ else
+ {
+ map_keys(wide_str[4],&keyboard_list[k]);
+ keyboard_list[k].latin_char=wide_str[4];
+ }
k++;
}
+ else
+ {
+ if(wcslen(wide_str)==1)
+ {
+ if(!settings.use_english)
+ {
+ keyboard_list[k].unicode_value = wide_str[0];
+ map_keys(-1,&keyboard_list[k]);
+ keyboard_list[k].latin_char=-1;
+ }
+ else
+ {
+ keyboard_list[k].unicode_value = wide_str[0];
+ map_keys(-1,&keyboard_list[k]);
+ keyboard_list[k].latin_char=wide_str[0];
+ }
+ k++;
+ }
+
+ }
+
} while (!feof(f));
fclose(f);
-
LOG("Leaving LoadKeyboard()\n");
return 1;
}
@@ -204,8 +254,31 @@
/* Returns -1 if somehow no finger associated with a Unicode value */
/* in the list (shouldn't happen). */
/* Returns -2 if Unicode value not in list. */
-int GetFinger(wchar_t uni_char)
+int GetFinger(int i)
{
+ if (i == -1)
+ {
+ fprintf(stderr, "GetFinger() - Unicode char '%C' not found in list.\n");
+ return -2;
+ }
+
+ if ((keyboard_list[i].finger < 0)
+ || (keyboard_list[i].finger > 9))
+ {
+ fprintf(stderr, "GetFinger() - Unicode char '%C' has no valid finger.\n");
+ return -1;
+ }
+
+ return (int)keyboard_list[i].finger; /* Keep compiler from complaining */
+}
+
+int GetShift(int i)
+{
+ return keyboard_list[i].shift;
+}
+
+int GetIndex(wchar_t uni_char)
+{
int i = 0;
while ((i < MAX_UNICODES)
@@ -216,22 +289,40 @@
if (i == MAX_UNICODES)
{
- fprintf(stderr, "GetFinger() - Unicode char '%C' not found in list.\n", uni_char);
- return -2;
+ fprintf(stderr, "GeteKeypress() - Unicode char '%C' not found in list.\n", uni_char);
+ return -1;
}
- if ((keyboard_list[i].finger < 0)
- || (keyboard_list[i].finger > 9))
- {
- fprintf(stderr, "GetFinger() - Unicode char '%C' has no valid finger.\n",uni_char);
- return -1;
- }
+ return i;
+}
- return (int)keyboard_list[i].finger; /* Keep compiler from complaining */
+void GetKeyPos(int index, char *buf)
+{
+ sprintf(buf,"keyboard/keyboard_%s.png", keyboard_list[index].keyname);
}
+void GetWrongKeyPos(int index, char *buf)
+{
+ sprintf(buf,"keyboard/keyboardN_%s.png", keyboard_list[index].keyname);
+}
-
+void GetKeyShift(int index, char *buf)
+{
+ if(keyboard_list[index].shift==0)
+ sprintf(buf,"keyboard/keyboard_None.png");
+ else
+ if(keyboard_list[index].shift==1)
+ sprintf(buf,"keyboard/keyboard_D00.png");
+ else
+ sprintf(buf,"keyboard/keyboard_D12.png", settings.default_data_path);
+}
+wchar_t GetLastKey()
+{
+ if(!num_chars_used)
+ return -1;
+ else
+ return keyboard_list[num_chars_used-1].unicode_value;
+}
int unicode_in_key_list(wchar_t uni_char)
{
int i = 0;
@@ -976,6 +1067,587 @@
return 1;
}
+/* This function just tidies up all the ptr args needed for */
+/* ConvertUTF8toUTF32() from Unicode, Inc. into a neat wrapper. */
+/* It returns -1 on error, otherwise returns the length of the */
+/* converted, null-terminated wchar_t* string now stored in the */
+/* location of the 'wide_word' pointer. */
+int ConvertFromUTF8(wchar_t* wide_word, const unsigned char* UTF8_word)
+{
+ int i = 0;
+ ConversionResult result;
+ UTF8 temp_UTF8[FNLEN];
+ UTF32 temp_UTF32[FNLEN];
+
+ const UTF8* UTF8_Start = temp_UTF8;
+ const UTF8* UTF8_End = &temp_UTF8[FNLEN-1];
+ UTF32* UTF32_Start = temp_UTF32;
+ UTF32* UTF32_End = &temp_UTF32[FNLEN-1];
+
+ strncpy(temp_UTF8, UTF8_word, FNLEN);
+
+ ConvertUTF8toUTF32(&UTF8_Start, UTF8_End,
+ &UTF32_Start, UTF32_End, 0);
+
+ wide_word[0] = '\0';
+
+ while ((i < FNLEN) && (temp_UTF32[i] != '\0'))
+ {
+ wide_word[i] = temp_UTF32[i];
+ i++;
+ }
+
+ if (i >= FNLEN)
+ {
+ fprintf(stderr, "convert_from_UTF8(): buffer overflow\n");
+ return -1;
+ }
+ else //need terminating null:
+ {
+ wide_word[i] = '\0';
+ }
+
+ DEBUGCODE {fprintf(stderr, "wide_word = %ls\n", wide_word);}
+
+ return wcslen(wide_word);
+}
+
+/******************To be used for savekeyboard*************/
+/***Converts wchar_t string to char string*****************/
+int ConvertToUTF8(wchar_t* UTF32_word, char* word)
+{
+ int i = 0;
+ ConversionResult result;
+ UTF8 temp_UTF8[FNLEN];
+ UTF32 temp_UTF32[FNLEN];
+
+ const UTF8* UTF8_Start = temp_UTF8;
+ const UTF8* UTF8_End = &temp_UTF8[FNLEN-1];
+ UTF32* UTF32_Start = temp_UTF32;
+ UTF32* UTF32_End = &temp_UTF32[FNLEN-1];
+
+ strncpy(temp_UTF32, UTF32_word, FNLEN);
+
+ ConvertUTF32toUTF8(&UTF32_Start, UTF32_End,
+ &UTF8_Start, UTF8_End, 0);
+
+ word[0] = '\0';
+
+ while ((i < FNLEN) && (temp_UTF8[i] != '\0'))
+ {
+ word[i] = temp_UTF8[i];
+ i++;
+ }
+
+ if (i >= FNLEN)
+ {
+ fprintf(stderr, "convert_from_UTF8(): buffer overflow\n");
+ return -1;
+ }
+ else //need terminating null:
+ {
+ word[i] = '\0';
+ }
+
+ DEBUGCODE {fprintf(stderr, "word = %s\n", word);}
+
+ return strlen(word);
+}
+
+/******************************************************************/
+int map_keys(wchar_t wide_char,kbd_char* keyboard_entry)
+{
+ switch(wide_char)
+ {
+ case '`':strcpy(keyboard_entry->keyname,"A00");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=0;
+ break;
+ case '~':strcpy(keyboard_entry->keyname,"A00");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=0;
+ break;
+ case '1':strcpy(keyboard_entry->keyname,"A01");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=0;
+ break;
+ case '!':strcpy(keyboard_entry->keyname,"A01");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=0;
+ break;
+ case '2':strcpy(keyboard_entry->keyname,"A02");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=1;
+ break;
+ case '@':strcpy(keyboard_entry->keyname,"A02");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=1;
+ break;
+ case '3':strcpy(keyboard_entry->keyname,"A03");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=2;
+ break;
+ case '#':strcpy(keyboard_entry->keyname,"A03");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=2;
+ break;
+ case '4':strcpy(keyboard_entry->keyname,"A04");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=3;
+ break;
+ case '$':strcpy(keyboard_entry->keyname,"A04");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=3;
+ break;
+ case '5':strcpy(keyboard_entry->keyname,"A05");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=4;
+ break;
+ case '%':strcpy(keyboard_entry->keyname,"A05");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=4;
+ break;
+ case '6':strcpy(keyboard_entry->keyname,"A06");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=5;
+ break;
+ case '^':strcpy(keyboard_entry->keyname,"A06");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=5;
+ break;
+ case '7':strcpy(keyboard_entry->keyname,"A07");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=7;
+ break;
+ case '&':strcpy(keyboard_entry->keyname,"A07");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=6;
+ break;
+ case '8':strcpy(keyboard_entry->keyname,"A08");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=7;
+ break;
+ case '*':strcpy(keyboard_entry->keyname,"A08");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=7;
+ break;
+ case '9':strcpy(keyboard_entry->keyname,"A09");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=8;
+ break;
+ case '(':strcpy(keyboard_entry->keyname,"A09");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=8;
+ break;
+ case '0':strcpy(keyboard_entry->keyname,"A10");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case ')':strcpy(keyboard_entry->keyname,"A10");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case '-':strcpy(keyboard_entry->keyname,"A11");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '_':strcpy(keyboard_entry->keyname,"A11");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case '=':strcpy(keyboard_entry->keyname,"A12");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '+':strcpy(keyboard_entry->keyname,"A12");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case '\\':strcpy(keyboard_entry->keyname,"A13");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '|':strcpy(keyboard_entry->keyname,"A13");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case 'q':strcpy(keyboard_entry->keyname,"B01");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=0;
+ break;
+ case 'Q':strcpy(keyboard_entry->keyname,"B01");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=0;
+ break;
+ case 'w':strcpy(keyboard_entry->keyname,"B02");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=1;
+ break;
+ case 'W':strcpy(keyboard_entry->keyname,"B02");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=1;
+ break;
+ case 'e':strcpy(keyboard_entry->keyname,"B03");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=2;
+ break;
+ case 'E':strcpy(keyboard_entry->keyname,"B03");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=3;
+ break;
+ case 'r':strcpy(keyboard_entry->keyname,"B04");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=3;
+ break;
+ case 'R':strcpy(keyboard_entry->keyname,"B04");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=3;
+ break;
+ case 't':strcpy(keyboard_entry->keyname,"B05");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=4;
+ break;
+ case 'T':strcpy(keyboard_entry->keyname,"B05");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=4;
+ break;
+ case 'y':strcpy(keyboard_entry->keyname,"B06");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=5;
+ break;
+ case 'Y':strcpy(keyboard_entry->keyname,"B06");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=5;
+ break;
+ case 'u':strcpy(keyboard_entry->keyname,"B07");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=6;
+ break;
+ case 'U':strcpy(keyboard_entry->keyname,"B07");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=6;
+ break;
+ case 'i':strcpy(keyboard_entry->keyname,"B08");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=7;
+ break;
+ case 'I':strcpy(keyboard_entry->keyname,"B08");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=7;
+ break;
+ case 'o':strcpy(keyboard_entry->keyname,"B09");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=8;
+ break;
+ case 'O':strcpy(keyboard_entry->keyname,"B09");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=8;
+ break;
+ case 'p':strcpy(keyboard_entry->keyname,"B10");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case 'P':strcpy(keyboard_entry->keyname,"B10");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case '[':strcpy(keyboard_entry->keyname,"B11");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '{':strcpy(keyboard_entry->keyname,"B11");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case ']':strcpy(keyboard_entry->keyname,"B12");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '}':strcpy(keyboard_entry->keyname,"B12");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case 'a':strcpy(keyboard_entry->keyname,"C01");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=0;
+ break;
+ case 'A':strcpy(keyboard_entry->keyname,"C01");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=0;
+ break;
+ case 's':strcpy(keyboard_entry->keyname,"C02");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=1;
+ break;
+ case 'S':strcpy(keyboard_entry->keyname,"C02");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=1;
+ break;
+ case 'd':strcpy(keyboard_entry->keyname,"C03");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=2;
+ break;
+ case 'D':strcpy(keyboard_entry->keyname,"C03");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=2;
+ break;
+ case 'f':strcpy(keyboard_entry->keyname,"C04");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=3;
+ break;
+ case 'F':strcpy(keyboard_entry->keyname,"C04");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=3;
+ break;
+ case 'g':strcpy(keyboard_entry->keyname,"C05");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=4;
+ break;
+ case 'G':strcpy(keyboard_entry->keyname,"C05");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=4;
+ break;
+ case 'h':strcpy(keyboard_entry->keyname,"C06");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=5;
+ break;
+ case 'H':strcpy(keyboard_entry->keyname,"C06");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=5;
+ break;
+ case 'j':strcpy(keyboard_entry->keyname,"C07");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=6;
+ break;
+ case 'J':strcpy(keyboard_entry->keyname,"C07");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=6;
+ break;
+ case 'k':strcpy(keyboard_entry->keyname,"C08");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=7;
+ break;
+ case 'K':strcpy(keyboard_entry->keyname,"C08");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=7;
+ break;
+ case 'l':strcpy(keyboard_entry->keyname,"C09");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=8;
+ break;
+ case 'L':strcpy(keyboard_entry->keyname,"C09");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=8;
+ break;
+ case ';':strcpy(keyboard_entry->keyname,"C10");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case ':':strcpy(keyboard_entry->keyname,"C10");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case '\'':strcpy(keyboard_entry->keyname,"C11");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '"':strcpy(keyboard_entry->keyname,"C11");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case 'z':strcpy(keyboard_entry->keyname,"D01");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=0;
+ break;
+ case 'Z':strcpy(keyboard_entry->keyname,"D01");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=0;
+ break;
+ case 'x':strcpy(keyboard_entry->keyname,"D02");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=1;
+ break;
+ case 'X':strcpy(keyboard_entry->keyname,"D02");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=1;
+ break;
+ case 'c':strcpy(keyboard_entry->keyname,"D03");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=2;
+ break;
+ case 'C':strcpy(keyboard_entry->keyname,"D03");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=2;
+ break;
+ case 'v':strcpy(keyboard_entry->keyname,"D04");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=3;
+ break;
+ case 'V':strcpy(keyboard_entry->keyname,"D04");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=3;
+ break;
+ case 'b':strcpy(keyboard_entry->keyname,"D05");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=4;
+ break;
+ case 'B':strcpy(keyboard_entry->keyname,"D05");
+ keyboard_entry->shift=2;
+ keyboard_entry->finger=4;
+ break;
+ case 'n':strcpy(keyboard_entry->keyname,"D06");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=5;
+ break;
+ case 'N':strcpy(keyboard_entry->keyname,"D06");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=5;
+ break;
+ case 'm':strcpy(keyboard_entry->keyname,"D07");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=6;
+ break;
+ case 'M':strcpy(keyboard_entry->keyname,"D07");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=6;
+ break;
+ case ',':strcpy(keyboard_entry->keyname,"D08");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=7;
+ break;
+ case '<':strcpy(keyboard_entry->keyname,"D08");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=7;
+ break;
+ case '.':strcpy(keyboard_entry->keyname,"D09");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=8;
+ break;
+ case '>':strcpy(keyboard_entry->keyname,"D09");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=8;
+ break;
+ case '/':strcpy(keyboard_entry->keyname,"D10");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=9;
+ break;
+ case '?':strcpy(keyboard_entry->keyname,"D10");
+ keyboard_entry->shift=1;
+ keyboard_entry->finger=9;
+ break;
+ case ' ':strcpy(keyboard_entry->keyname,"E03");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=5;
+ break;
+ default:strcpy(keyboard_entry->keyname,"None");
+ keyboard_entry->shift=0;
+ keyboard_entry->finger=-1;
+ break;
+ }
+}
+
+void GenerateKeyboard(SDL_Surface* keyboard)
+{
+ SDL_Surface* tmp = NULL;
+ SDL_Rect new;
+ int i;
+ int col;
+ char row;
+ int render=1;
+ Uint16 t[2];
+ TTF_Font* smallfont = NULL;
+ DEBUGCODE { printf("Entering GenerateKeyboard\n"); }
+ t[1] = '\0';
+ smallfont = LoadFont(settings.theme_font_name, 15);
+ if(!smallfont)
+ {
+ DEBUGCODE { printf("Error loading font\n"); }
+ return;
+ }
+ for(i=0;i < num_chars_used;i++)
+ {
+ render=1;
+ new.x=0;
+ new.y=0;
+ new.w=5;
+ new.h=5;
+ t[0]=keyboard_list[i].unicode_value;
+ sscanf(keyboard_list[i].keyname,"%c%d",&row,&col);
+ switch(row)
+ {
+ case 'A':new.y+=6;new.x+=13;break;
+ case 'B':new.y+=36;new.x+=23;break;
+ case 'C':new.y+=66;new.x+=33;break;
+ case 'D':new.y+=96;new.x+=23;break;
+ case 'E':new.y+126;break;
+ default: render=0;break;
+ }
+ if(!render)
+ continue;
+ new.x+=30*col;
+ if(keyboard_list[i].shift>0)
+ {
+ new.x-=9;
+ if(new.y<9)
+ new.y-=5;
+ else
+ new.y-=9;
+ }
+ DEBUGCODE { printf("Making %d : %C\n",i,keyboard_list[i].unicode_value); }
+ //tmp=BlackOutline_Unicode(t, smallfont, &black);
+ tmp=TTF_RenderUNICODE_Blended((TTF_Font*)smallfont, t, black);
+ if(tmp==NULL)
+ {
+ DEBUGCODE { printf("Error Making %d : %C\n",i,keyboard_list[i].unicode_value); }
+ }
+ SDL_BlitSurface(tmp, NULL, keyboard, &new);
+ }
+ TTF_CloseFont(smallfont);
+ DEBUGCODE { printf("Leaving GenerateKeyboard\n"); }
+}
+void updatekeylist(int key,char ch)
+{
+ wchar_t;
+ keyboard_list[key].latin_char=ch;
+ wchar_t wtmp=ch;
+ map_keys(wtmp,&keyboard_list[key]);
+}
+void savekeyboard(void)
+{
+ unsigned char fn[FNLEN];
+ if(!settings.use_english)
+ sprintf(fn , "%s/keyboard.lst", settings.theme_data_path);
+ else
+ sprintf(fn , "%s/keyboard.lst", settings.default_data_path);
+ FILE *fp;
+ int i;
+ wchar_t tmp[2];
+ char buf[10];
+ tmp[1]='\0';
+ fp=fopen(fn,"w");
+ for(i=0;i<num_chars_used;i++)
+ {
+ tmp[0]=keyboard_list[i].unicode_value;
+ /**********fprintf(fp,"%d|%C\n",keyboard_list[i].finger,keyboard_list[i].unicode_value); doesnt work, so the unicode value is converted into a char string*/
+ ConvertToUTF8(tmp, buf);
+ if(keyboard_list[i].finger==-1)
+ {
+ fprintf(fp,"%s\n",buf);
+ }
+ else
+ if(keyboard_list[i].latin_char==-1)
+ {
+ fprintf(fp,"%d|%s\n",keyboard_list[i].finger,buf);
+ }
+ else
+ {
+ fprintf(fp,"%d|%s|%c\n",keyboard_list[i].finger,buf,keyboard_list[i].latin_char);
+ }
+ }
+ fclose(fp);
+}
+/****************************************************************/
+
/****************************************************/
/* */
/* Local ("private") functions: */
@@ -1119,48 +1791,4 @@
}
-/* This function just tidies up all the ptr args needed for */
-/* ConvertUTF8toUTF32() from Unicode, Inc. into a neat wrapper. */
-/* It returns -1 on error, otherwise returns the length of the */
-/* converted, null-terminated wchar_t* string now stored in the */
-/* location of the 'wide_word' pointer. */
-int ConvertFromUTF8(wchar_t* wide_word, const unsigned char* UTF8_word)
-{
- int i = 0;
- ConversionResult result;
- UTF8 temp_UTF8[FNLEN];
- UTF32 temp_UTF32[FNLEN];
- const UTF8* UTF8_Start = temp_UTF8;
- const UTF8* UTF8_End = &temp_UTF8[FNLEN-1];
- UTF32* UTF32_Start = temp_UTF32;
- UTF32* UTF32_End = &temp_UTF32[FNLEN-1];
-
- strncpy(temp_UTF8, UTF8_word, FNLEN);
-
- ConvertUTF8toUTF32(&UTF8_Start, UTF8_End,
- &UTF32_Start, UTF32_End, 0);
-
- wide_word[0] = '\0';
-
- while ((i < FNLEN) && (temp_UTF32[i] != '\0'))
- {
- wide_word[i] = temp_UTF32[i];
- i++;
- }
-
- if (i >= FNLEN)
- {
- fprintf(stderr, "convert_from_UTF8(): buffer overflow\n");
- return -1;
- }
- else //need terminating null:
- {
- wide_word[i] = '\0';
- }
-
- DEBUGCODE {fprintf(stderr, "wide_word = %ls\n", wide_word);}
-
- return wcslen(wide_word);
-}
-
Modified: tuxtype/trunk/src/funcs.h
===================================================================
--- tuxtype/trunk/src/funcs.h 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/src/funcs.h 2008-08-10 14:02:06 UTC (rev 602)
@@ -46,8 +46,17 @@
SDL_Surface* GetWhiteGlyph(wchar_t t);
SDL_Surface* GetRedGlyph(wchar_t t);
int LoadKeyboard(void);
-int GetFinger(wchar_t uni_char);
+int GetFinger(int i);
int RenderLetters(const TTF_Font* letter_font);
+int GetIndex(wchar_t uni_char);
+void GetKeyShift(int index, char *buf);
+void GetKeyPos(int index, char *buf);
+void GetWrongKeyPos(int index, char *buf);
+//int map_keys(wchar_t *wide_str,keymap key);
+void GenerateKeyboard(SDL_Surface* keyboard);
+void updatekeylist(int key,char ch);
+void savekeyboard(void);
+wchar_t GetLastKey(void);
//void UseAlphabet(void);
Modified: tuxtype/trunk/src/practice.c
===================================================================
--- tuxtype/trunk/src/practice.c 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/src/practice.c 2008-08-10 14:02:06 UTC (rev 602)
@@ -8,6 +8,8 @@
Revised extensively: 2007
David Bruce <dbruce at tampabay.rr.com>
+Revised extensively: 2008
+Sreyas Kurumanghat <k.sreyas at gmail.com>
***************************************************************************/
/***************************************************************************
@@ -23,9 +25,13 @@
#include "funcs.h"
static SDL_Surface* bg = NULL;
-static SDL_Surface* hands = NULL;
+static SDL_Surface* hands = NULL;
+static SDL_Surface* hand_shift[3] = {NULL};
+static SDL_Surface* keyboard = NULL;
+static SDL_Surface* keypress1 = NULL;
+static SDL_Surface* keypress2 = NULL;
static SDL_Surface* hand[11] = {NULL};
-static SDL_Rect hand_loc, letter_loc;
+static SDL_Rect hand_loc, letter_loc,keyboard_loc;
static TTF_Font* font = NULL;
static wchar_t phrase[255][FNLEN];
@@ -37,6 +43,9 @@
static void practice_unload_media(void);
static void print_at(const wchar_t* pphrase, int wrap, int x, int y);
static void show(unsigned char t);
+SDL_Surface* GetKeypress1(int index);
+SDL_Surface* GetKeypress2(int index);
+SDL_Surface* GetWrongKeypress(int index);
/************************************************************************/
@@ -70,9 +79,8 @@
char keytime[20],
totaltime[20];
SDL_Surface* srfc = NULL;
-
-
+
if (!practice_load_media())
{
fprintf(stderr, "Phrases() - practice_load_media() failed, returning.\n");
@@ -81,6 +89,7 @@
SDL_BlitSurface(bg, NULL, screen, NULL);
SDL_BlitSurface(hands, NULL, screen, &hand_loc);
+ SDL_BlitSurface(keyboard, NULL, screen, &keyboard_loc);
SDL_Flip(screen);
wp = get_phrase(pphrase);
@@ -88,11 +97,11 @@
if (!wcsncmp(phrase[0], (wchar_t*)"", 1))
wcsncpy(pphrase, phrase[0], 80);
- srfc = GetWhiteGlyph(65);
+ srfc = GetWhiteGlyph(GetLastKey());
if (!srfc)
{
- fprintf(stderr, "Phrases() - GetWhiteGlyph(65) not defined - bailing out.\n");
+ fprintf(stderr, "Phrases() - GetWhiteGlyph(GetLastKey()) not defined - bailing out.\n");
return 0;
}
@@ -132,6 +141,7 @@
case 0:
start = SDL_GetTicks();
SDL_BlitSurface(hands, NULL, screen, &hand_loc);
+ SDL_BlitSurface(keyboard, NULL, screen, &keyboard_loc);
state = 1;
break;
@@ -141,9 +151,29 @@
/* Show finger hint, if available. Note that GetFinger() */
/* returns negative values on error and never returns a */
/* value greater than 9. */
- int fing = GetFinger(pphrase[c]);
+ int key = GetIndex(pphrase[c]);
+ int fing = GetFinger(key);
+ int shift = GetShift(key);
+ keypress1= GetKeypress1(key);
+ keypress2= GetKeypress2(key);
+ if (!keypress1)
+ {
+ fprintf(stderr, "Phrases() - GetKeypress1 failed, returning.\n");
+ return 0;
+ }
+ if(!keypress2)
+ {
+ fprintf(stderr, "Phrases() - GetKeypress2 failed, returning.\n");
+ return 0;
+ }
+ SDL_BlitSurface(hands, NULL, screen, &hand_loc);
if (fing >= 0)
SDL_BlitSurface(hand[fing], NULL, screen, &hand_loc);
+ SDL_BlitSurface(hand_shift[shift], NULL, screen, &hand_loc);
+ SDL_BlitSurface(keypress1, NULL, screen, &keyboard_loc);
+ SDL_BlitSurface(keypress2, NULL, screen, &keyboard_loc);
+ SDL_FreeSurface(keypress1);
+ SDL_FreeSurface(keypress2);
state = 2;
}
break;
@@ -157,14 +187,35 @@
case 3:
SDL_BlitSurface(hands, NULL, screen, &hand_loc);
+ SDL_BlitSurface(keyboard, NULL, screen, &keyboard_loc);
state = 12;
break;
case 4:
{
- int fing = GetFinger(pphrase[c]);
+ int key = GetIndex(pphrase[c]);
+ int fing = GetFinger(key);
+ int shift = GetShift(key);
+ keypress1= GetKeypress1(key);
+ keypress2= GetKeypress2(key);
+ if (!keypress1)
+ {
+ fprintf(stderr, "Phrases() - GetKeypress1 failed, returning.\n");
+ return 0;
+ }
+ if(!keypress2)
+ {
+ fprintf(stderr, "Phrases() - GetKeypress2 failed, returning.\n");
+ return 0;
+ }
+ SDL_BlitSurface(hands, NULL, screen, &hand_loc);
if (fing >= 0)
SDL_BlitSurface(hand[fing], NULL, screen, &hand_loc);
+ SDL_BlitSurface(hand_shift[shift], NULL, screen, &hand_loc);
+ SDL_BlitSurface(keypress1, NULL, screen, &keyboard_loc);
+ SDL_BlitSurface(keypress2, NULL, screen, &keyboard_loc);
+ SDL_FreeSurface(keypress1);
+ SDL_FreeSurface(keypress2);
state = 11;
break;
}
@@ -195,6 +246,194 @@
}
else
{
+/**************************************************/
+ int key=GetIndex((wchar_t)event.key.keysym.unicode);
+ char tmp=-1;
+ switch(event.key.keysym.sym)
+ {
+ case SDLK_BACKQUOTE:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='~';
+ else
+ tmp='`';
+ break;
+ case SDLK_COMMA:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='<';
+ else
+ tmp=',';
+ break;
+ case SDLK_MINUS:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='_';
+ else
+ tmp='-';
+ break;
+ case SDLK_PERIOD:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='>';
+ else
+ tmp='.';
+ break;
+ case SDLK_SLASH:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='?';
+ else
+ tmp='/';
+ break;
+ case SDLK_0:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp=')';
+ else
+ tmp='0';
+ break;
+ case SDLK_1:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='!';
+ else
+ tmp='1';
+ break;
+ case SDLK_2:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='@';
+ else
+ tmp='2';
+ break;
+ case SDLK_3:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='#';
+ else
+ tmp='3';
+ break;
+ case SDLK_4:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='$';
+ else
+ tmp='4';
+ break;
+ case SDLK_5:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='%';
+ else
+ tmp='5';
+ break;
+ case SDLK_6:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='^';
+ else
+ tmp='6';
+ break;
+ case SDLK_7:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='&';
+ else
+ tmp='7';
+ break;
+ case SDLK_8:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='*';
+ else
+ tmp='8';
+ break;
+ case SDLK_9:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='(';
+ else
+ tmp='9';
+ break;
+ case SDLK_SEMICOLON:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp=':';
+ else
+ tmp=';';
+ break;
+ case SDLK_EQUALS:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='+';
+ else
+ tmp='=';
+ break;
+ case SDLK_LEFTBRACKET:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='{';
+ else
+ tmp='[';
+ break;
+ case SDLK_BACKSLASH:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='|';
+ else
+ tmp='\\';
+ break;
+ case SDLK_RIGHTBRACKET:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='}';
+ else
+ tmp=']';
+ break;
+ case SDLK_QUOTE:
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp='"';
+ else
+ tmp='\'';
+ break;
+ case SDLK_a:tmp='a';
+ break;
+ case SDLK_b:tmp='b';
+ break;
+ case SDLK_c:tmp='c';
+ break;
+ case SDLK_d:tmp='d';
+ break;
+ case SDLK_e:tmp='e';
+ break;
+ case SDLK_f:tmp='f';
+ break;
+ case SDLK_g:tmp='g';
+ break;
+ case SDLK_h:tmp='h';
+ break;
+ case SDLK_i:tmp='i';
+ break;
+ case SDLK_j:tmp='j';
+ break;
+ case SDLK_k:tmp='k';
+ break;
+ case SDLK_l:tmp='l';
+ break;
+ case SDLK_m:tmp='m';
+ break;
+ case SDLK_n:tmp='n';
+ break;
+ case SDLK_o:tmp='o';
+ break;
+ case SDLK_p:tmp='p';
+ break;
+ case SDLK_q:tmp='q';
+ break;
+ case SDLK_r:tmp='r';
+ break;
+ case SDLK_s:tmp='s';
+ break;
+ case SDLK_t:tmp='t';
+ break;
+ case SDLK_u:tmp='u';
+ break;
+ case SDLK_v:tmp='v';
+ break;
+ case SDLK_w:tmp='w';
+ break;
+ case SDLK_x:tmp='x';
+ break;
+ case SDLK_y:tmp='y';
+ break;
+ case SDLK_z:tmp='z';
+ break;
+ }
+ if(event.key.keysym.mod&KMOD_SHIFT)
+ tmp=toupper(tmp);
+ updatekeylist(key,tmp);
+/****************************************************/
if (pphrase[c]==event.key.keysym.unicode)
{
state = 0;
@@ -254,6 +493,12 @@
}
else
{
+ int key = GetIndex((wchar_t)event.key.keysym.unicode);
+ keypress1= GetWrongKeypress(key);
+ SDL_BlitSurface(keypress1, NULL, screen, &keyboard_loc);
+ SDL_FreeSurface(keypress1);
+ state=0;
+
if (event.key.keysym.sym != SDLK_RSHIFT
&& event.key.keysym.sym != SDLK_LSHIFT)
PlaySound(wrong);
@@ -266,6 +511,8 @@
}while (!quit);
+ savekeyboard();
+
practice_unload_media();
return 1;
@@ -286,12 +533,16 @@
unsigned char fn[FNLEN];
unsigned char let[5];
int load_failed = 0;
-
+ DEBUGCODE { printf("Entering practice_load_media\n"); }
LOG("Loading practice media\n");
hands = LoadImage("hands/hands.png", IMG_ALPHA);
- bg = LoadImage("main_bkg.png", IMG_ALPHA);
+ hand_shift[0] = LoadImage("hands/none.png", IMG_ALPHA);
+ hand_shift[1] = LoadImage("hands/lshift.png", IMG_ALPHA);
+ hand_shift[2] = LoadImage("hands/rshift.png", IMG_ALPHA);
+ keyboard = LoadImage("keyboard/keyboard.png", IMG_ALPHA);
+ bg = LoadImage("main_bkg.png", IMG_ALPHA);
wrong = LoadSound("tock.wav");
font = LoadFont(settings.theme_font_name, 30);
@@ -308,7 +559,11 @@
||!hands
||!bg
||!wrong
- ||!font)
+ ||!font
+ ||!keyboard
+ ||!hand_shift[0]
+ ||!hand_shift[1]
+ ||!hand_shift[2])
{
fprintf(stderr, "practice_load_media() - failed to load needed media \n");
practice_unload_media;
@@ -321,12 +576,20 @@
hand_loc.w = (hand[0]->w);
hand_loc.h = (hand[0]->h);
+ /********Position of keyboard image*/
+ keyboard_loc.x = screen->w/2 -keyboard->w/2;
+ keyboard_loc.y = screen->h/2;
+ keyboard_loc.w = screen->w/8;
+ keyboard_loc.h = screen->h/8;
+
/* Now render letters for glyphs in alphabet: */
RenderLetters(font);
TTF_CloseFont(font); /* Don't need it after rendering done */
font = NULL;
+ GenerateKeyboard(keyboard);
LOG("DONE - Loading practice media\n");
+ DEBUGCODE { printf("Leaving practice_load_media\n"); }
return 1;
}
@@ -339,6 +602,13 @@
bg = NULL;
SDL_FreeSurface(hands);
hands = NULL;
+ for(i=0;i<3;i++)
+ {
+ SDL_FreeSurface(hand_shift[i]);
+ hand_shift[i] = NULL;
+ }
+ SDL_FreeSurface(keyboard);
+ keyboard = NULL;
//TTF_CloseFont(font);
for (i=0; i<10; i++)
@@ -346,6 +616,7 @@
SDL_FreeSurface(hand[i]);
hand[i] = NULL;
}
+
Mix_FreeChunk(wrong);
wrong = NULL;
@@ -510,16 +781,14 @@
return(wp);
}
-
-
static void print_at(const wchar_t *pphrase, int wrap, int x, int y)
{
int z = 0;
SDL_Surface* surf = NULL;
letter_loc.x = x;
letter_loc.y = y;
- letter_loc.w = GetWhiteGlyph(65)->w;
- letter_loc.h = GetWhiteGlyph(65)->h;
+ letter_loc.w = GetWhiteGlyph(GetLastKey())->w;
+ letter_loc.h = GetWhiteGlyph(GetLastKey())->h;
LOG("Entering print_at()\n");
@@ -589,5 +858,26 @@
i=ConvertFromUTF8(buf, _("Next letter "));
buf[i]=t[c];
buf[i+1]=0;
- print_at(buf,wcslen(buf),230 ,400);
+ print_at(buf,wcslen(buf),215 ,420);
}
+
+SDL_Surface* GetKeypress1(int index)
+{
+ char buf[50];
+ GetKeyPos(index,buf);
+ return (LoadImage(buf, IMG_ALPHA));
+}
+
+SDL_Surface* GetWrongKeypress(int index)
+{
+ char buf[50];
+ GetWrongKeyPos(index,buf);
+ return (LoadImage(buf, IMG_ALPHA));
+}
+
+SDL_Surface* GetKeypress2(int index)
+{
+ char buf[50];
+ GetKeyShift(index,buf);
+ return (LoadImage(buf, IMG_ALPHA));
+}
Modified: tuxtype/trunk/src/titlescreen.c
===================================================================
--- tuxtype/trunk/src/titlescreen.c 2008-08-10 14:00:39 UTC (rev 601)
+++ tuxtype/trunk/src/titlescreen.c 2008-08-10 14:02:06 UTC (rev 602)
@@ -100,6 +100,10 @@
int key_menu = 1;
int old_key_menu = 5;
wchar_t phrase[128];
+ FILE *fp;
+ unsigned char fn[FNLEN];
+ int found = 0;
+ unsigned char str[1000];
if (settings.sys_sound)
@@ -108,10 +112,10 @@
settings.menu_music = 1;
}
-
+
/* FIXME phrase(s) should come from file */
- ConvertFromUTF8(phrase, "Now is the time for all good men to come to the aid of their country.");
+// ConvertFromUTF8(phrase, "Now is the time for all good men to come to the aid of their country.");
// ConvertFromUTF8(phrase, "To all that believe in his name he gave power to become children of God");
// wcscpy(phrase, "Now is the time for all good men to come to the aid of their country.");
@@ -644,10 +648,69 @@
if (menu_opt == FREETYPE)
{
unload_media();
- Phrases( phrase );
+ found=0;
+ if (!settings.use_english)
+ {
+ sprintf(fn , "%s/phrases.txt", settings.theme_data_path);
+ if (CheckFile(fn))
+ {
+ found = 1;
+ }
+ /* Now look in default path if desired or needed: */
+ if (!found)
+ {
+ sprintf(fn , "%s/words/words3.txt", settings.theme_data_path);
+ if (CheckFile(fn))
+ {
+ found = 1;
+ }
+ }
+ if (!found)
+ {
+ sprintf(fn , "%s/words/words2.txt", settings.theme_data_path);
+ if (CheckFile(fn))
+ {
+ found = 1;
+ }
+ }
+ if (!found)
+ {
+ sprintf(fn , "%s/words/words1.txt", settings.theme_data_path);
+ if (CheckFile(fn))
+ {
+ found = 1;
+ }
+ }
+ }
+ if (!found)
+ {
+ sprintf(fn , "%s/phrases.txt", settings.default_data_path);
+ if (CheckFile(fn))
+ {
+ found = 1;
+ }
+ }
+ if (!found)
+ {
+ fprintf(stderr, "LoadKeyboard(): Error finding file for keyboard setup!\n");
+ return 0;
+ }
+
+ fp=fopen(fn,"r");
+ do
+ {
+ fscanf( fp, "%[^\n]\n", str);
+ ConvertFromUTF8(phrase, str);
+ Phrases( phrase );
+ //Practice();
+ load_media();
+ redraw = 1;
+ } while (0);
+ fclose(fp);
+ //Phrases( phrase );
//Practice();
- load_media();
- redraw = 1;
+ //load_media();
+ //redraw = 1;
}
/* ------ End menu_opt processing ----------- */
More information about the Tux4kids-commits
mailing list