Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

qtʵÏÖµÄÒ»¸ö¶íÂÞ˹·½¿éµÄ³ÌÐò ·½¿éÇøcÎļþ

//-----------------------------------------------------------------------------------------------------
//BY:yuyongbao
//QQ:673360056
//-----------------------------------------------------------------------------------------------------
#include "tetrixboard.h"
/*  ZShape ,          //·½¿é»ù±¾ÐÎ×´0-6
    SShape,
    LineShape,
    TShape,
    SquareShape,
    LShape,
    MirroredLShape,
    ZRot1Shape,       //ÒÔÏÂÊÇ·½¿é·­×ªºóµÄÐÎ×´7-19
    SRot1Shape,
    LineRot1Shape,
    TRot1Shape,
    TRot2Shape,
    TRot3Shape,
    SquareRot1Shape,
    LRot1Shape,
    LRot2Shape,
    LRot3Shape,
    MirroredLRot1Shape,
    MirroredLRot2Shape,
    MirroredLRot3Shape
*/
int TetrixCoordsTable[19][16] = {
  // 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6   1-16´Ó×óµ½ÓÒ£¬´ÓÉϵ½ÏÂ
    {1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0}, //ZShape
    {0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0}, //SShape
    {1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0}, //LineShape
    {0,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0}, //TShape
    {0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0}, //SquareShape
    {0,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0}, //LShape
    {0,1,0,0,0,1,0,0,0,1,1,0,0,0,0,0}, //MirroredLShape
    {0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0}, //ZRot1Shape
    {0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0}, //SRot1Shape
    {0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0}, //LineRot1Shape
    {0,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0}, //TRot1Shape
    {1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0}, //TRot2Shape
    {0


Ïà¹ØÎĵµ£º

ÈçºÎÀí½âcºÍc++µÄ¸´ÔÓÀàÐÍÉùÃ÷

 Ôø¾­Åöµ½¹ýÈÃÄãÃԻ󲻽⡢ÀàËÆÓÚint * (* (*fp1) (int) ) [10];ÕâÑùµÄ±äÁ¿ÉùÃ÷Âð£¿
±¾ÎĽ«ÓÉÒ×µ½ÄÑ£¬Ò»²½Ò»²½½Ì»áÄãÈçºÎÀí½âÕâÖÖ¸´ÔÓµÄC/C++ÉùÃ÷¡£
ÎÒÃǽ«´ÓÿÌ춼ÄÜÅöµ½µÄ½Ï¼òµ¥µÄÉùÃ÷ÈëÊÖ£¬È»ºóÖð²½¼ÓÈëconstÐÞÊηûºÍtypedef£¬»¹Óк¯ÊýÖ¸Õ룬×îºó½éÉÜÒ»¸öÄܹ»ÈÃÄã׼ȷµØÀí½âÈκÎC/C++ÉùÃ÷µÄ“ÓÒ×ó·¨Ôò&rdquo ......

¼ûÖ¤C²ËÄñµÄ·ÉÏè

  ÏÖÔÚѧ±à³ÌÁË£¬×îÏÈѧµÄÊÇCÓïÑÔ£¬£¬Ï£Íû¾­¹ýŬÁ¦£¬×Ô¼ºÒ²ÄÜÏñÆäËûµÄÈËÒ»Ñù£¬³ÉΪһ¸öÓÅÐãµÄC³ÌÐòÔ±£¬£¬¾ÍÔÚCSDN£¬¼Ç¼ÏÂÎÒµÄC³ÌÐòÔ±³É³¤¹ý³Ì¡£
  Ìý±ðÈË˵£¬Ñ§ÓïÑÔ×îºÃµÄ;¾¶¾ÍÊǶàд´úÂ룬ϣÍûÎÒÔÚÕâÒ»·½ÃæÄÜ×öµÄ±È½ÏºÃ£¬»¹ÓоÍÊÇÅàÑøÁ¼ºÃµÄ±à³Ì·ç¸ñºÍÍŶӾ«Éñ¡£ÔÚCSDN£¬ÓкܶàµÄÁ¼Ê¦ÒæÓÑ£¬ÓÐËûÃÇ£¬ÏàÐÅÎÒÒ»¶ ......

C¿âº¯ÊýÖÐ×Ö·û´®´¦Àíº¯Êý¼¯ºÏ

bcmp
Ô­ÐÍ£ºextern int bcmp(const void *s1, const void *s2, int n);
Ó÷¨£º#include <string.h>
¹¦ÄÜ£º±È½Ï×Ö·û´®s1ºÍs2µÄÇ°n¸ö×Ö½ÚÊÇ·ñÏàµÈ
˵Ã÷£ºÈç¹ûs1=s2»òn=0Ôò·µ»ØÁ㣬·ñÔò·µ»Ø·ÇÁãÖµ¡£bcmp²»¼ì²éNULL¡£
bcopy   
Ô­ÐÍ£ºextern void bcopy(const void *src, void *dest, int n);
Ó÷ ......

C/C++³ÌÐòÖнṹÌå×Ö½ÚÁ÷µÄÍøÂç´«Êä

 ¾­³£ÐèÒªÔÚ³ÌÐòÖн«Ô¶³Ì´«À´µÄ×Ö½ÚÁ÷½øÐнṹ»¯£¬»òÕß½«½á¹¹»¯µÄÊý¾Ý±ä³É×Ö½ÚÁ÷´«¸øÔ¶³ÌÖ÷»ú¡£ÔÚC/C++³ÌÐòÖУ¬½á¹¹»¯Êý¾Ýͨ³£ÓýṹÌåÀ´×éÖ¯£¬½á¹¹ÌåÒ²Äܹ»·½±ãµÄת»»Îª×Ö½ÚÁ÷£¬Òò´Ë½á¹¹»¯µÄÊý¾Ý´«Êä±¾²»¸Ã³ÉΪÎÊÌ⣬µ«ÔÚVC»òGCCµÄĬÈÏÉèÖÃϱàÒë³öµÄ³ÌÐò£¬È´ÓÐÒ»¸öÖµµÃ×¢ÒâµÄÎÊÌâ——½á¹¹ÌåµÄ¶ÔÆë¡£  ......

ARMµÄ N¡¢Z¡¢C¡¢V ±ê־λµÄ½âÊÍ

N  µ±ÓÃÁ½¸ö²¹Âë±íʾµÄ´ø·ûºÅÊý½øÐÐÔËËãʱ£¬N=1±íʾÔËËãµÄ½á¹ûΪ¸ºÊý£»N=0±íʾÔËËãµÄ½á¹ûΪÕýÊý»òÁã.
Z  Z=1±íʾÔËËãµÄ½á¹ûΪÁ㣬Z=0±íʾÔËËãµÄ½á¹û·ÇÁã¡£
C  ¿ÉÒÔÓÐ4ÖÖ·½·¨ÉèÖÃCµÄÖµ£º
   ¼Ó·¨ÔËË㣨°üÀ¨CMN£©£ºµ±ÔËËã½á¹û²úÉúÁ˽øλʱ£¨ÎÞ·ûºÅÊýÒç³ö£©£¬C=1£¬·ñÔòC=0¡£
   ¼õ·¨ÔË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ