奇迹中添加小地图的源码!

以下是源码:
int IsMiniMap;
int LastMapInUse=-1;

class MiniMap
{
public:
    static void Init()
    {
        // Create easy control :D
       _asm
        {
            Mov Eax,0049CC90H
            Mov Byte Ptr Ds:[Eax],0xFF
            Mov Byte Ptr Ds:[Eax+1],0x25
            Mov Byte Ptr Ds:[Eax+2],0x9D
            Mov Byte Ptr Ds:[Eax+3],0x4F
            Mov Byte Ptr Ds:[Eax+4],0x75
            Mov Byte Ptr Ds:[Eax+5],0x00
        }
    }
    static int LoadMap()
    {
        int map = functions::manual_functions::GetMap();
        char FullMapName[200];
        sprintf(FullMapName,"World%d\\map1.jpg",map+1);
        LoadImageJgpForMap(FullMapName,0x780);
        functions::local_functions::StdOut("lodeded %s map with id %d \n",functions::local_functions::GetMapName(map),map);
        return map;
    }
    static void LoadImageJgpForMap(char* ImagePatch,DWORD PrintCode)
            {
                _asm
                {
                    Mov Edi,Main_LoadImageOzt
                    Push 0x1
                    Push 0x00
                    Push 0x2900
                    Push 0x2601
                    Push PrintCode
                    Push ImagePatch
                    Call Edi
                    Add Esp, 0x18
                }
      }
    static int MapCheckerCore(int map)
    {
       switch(map)
       {
        case 0:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 0)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
        case 1:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 1)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
        case 2:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 2)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
        case 3:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 3)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 4:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 4)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 6:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 6)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
   }
            break;
            case 7:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 7)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
   }
            break;
            case 8:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 8)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
   }
            break;
            case 10:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 10)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 24:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 24)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 30:// VallryOfLoren
            LastMapInUse = 30;
            return 1;
            case 31:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 31)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 33:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 33)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 34:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 34)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 37:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 37)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            case 38:
            if(IsMiniMap == 1)
            {
                if(LastMapInUse != 38)
                {
                    LastMapInUse = LoadMap();
                }
                return 1;
            }
            break;
            }
        return 0;
    }
};
本文出自 7j45 > 奇迹一条龙