Lom_599ȫ״룺
M2Server:Ҫ޸ΪAnsiStringĵط
unit IdSrvClient.pas:
	procedure SendSocket(sSendMsg:AnsiString);
unit RunSock.pas:
	function GetCertification(...
  		var
    		sData:AnsiString;
	procedure TRunSocket.DoClientCertification(
	var
  		nCheckCode:Integer;
  		sData:AnsiString;
unit UsrEngn.pas;
	procedure TUserEngine.ProcessUserMessage(PlayObject:TPlayObject;DefMsg:pTDefaultMessage;Buff:PAnsiChar); //004B232C
	var
	  sMsg:AnsiString;
unit EDcode.pas:
   function DecodeString (str: AnsiString): string;
	var
	  EncBuf:array[0..BUFFERSIZE - 1] of AnsiChar;
   function EncodeString (str: AnsiString): string;
	var
	  EncBuf:array[0..BUFFERSIZE - 1] of AnsiChar;

unit grobal2.pas;
  pTProcessMessage=^TProcessMessage;
  TProcessMessage=record
     wIdent:word;
     wParam:word;
     nParam1:integer;
     nParam2:integer;
     nParam3:integer;
     dwDeliveryTime:dword;
     BaseObject:TObject;
     boLateDelivery:Boolean;
     sMsg:AnsiString;
  end;
unit M2Share.pas:
	procedure SendGameCenterMsg(wIdent:Word;sSendMsg:AnsiString);//رձ
unit ObjBase.pas:
    procedure SendMsg(BaseObject:TBaseObject;wIdent,wParam:Word;nParam1,nParam2,nParam3:Integer;sMsg:AnsiString);
    procedure SendFirstMsg(BaseObject:TBaseObject;wIdent,wParam:Word;lParam1,lParam2,lParam3:Integer;sMsg:AnsiString);
    procedure SendDelayMsg(BaseObject:TBaseObject;wIdent,wParam:Word;lParam1,lParam2,lParam3:Integer;sMsg:AnsiString;dwDelay:LongWord);
    procedure ProcessSayMsg(sMsg:AnsiString); virtual;//FFFA
    procedure SendSocket(DefMsg: pTDefaultMessage; sMsg: AnsiString);virtual;//ͼ⡣ͻ޴ǰ¡
    procedure ProcessUserLineMsg(sData:AnsiString);
    procedure ProcessSayMsg(sData:AnsiString);override;
    procedure CmdGameGold(Cmd:pTGameCmd;sHumanName:String;sCtr:AnsiString;nGold:Integer);
    procedure CmdGamePoint(Cmd:pTGameCmd;sHumanName:String;sCtr:AnsiString;nPoint:Integer);
    procedure CmdCreditPoint(Cmd:pTGameCmd;sHumanName:String;sCtr:AnsiString;nPoint:Integer);
    procedure CmdShowSbkGold(Cmd:pTGameCmd;sCastleName,sCtr,sGold:AnsiString);
    
DBServerLoginGateرպ󱨴ԭ
procedure SendGameCenterMsg(wIdent:Word;sSendMsg:String);//sSendMsg:趨ΪAnsiString

9:35 2016/3/11
ͻͨţ
	function ReceiveText: AnsiString;
	function SendText(const S: AnsiString): Integer;
	SendSocket(sendstr: AnsiString);

9:44 2015/12/17
	ͻ˴ڻɫЧʾԭ
ǰ᣺CliUtil.pasԪDrawEffectд£
procedure DrawEffect (X, Y: Integer; ssuf, dsuf: TDirectDrawSurface; eff: TColorEffect);
var
  I, j, n, scount, srclen: Integer;
  sddsd: TDDSurfaceDesc;
  sptr, peff: PByte;
   //source: array[0..810] of byte;
  source: array[0..SCREENWIDTH + 10] of Byte;
begin
  if (ssuf = nil) or (ssuf.Canvas = nil) then Exit;
  case eff of
    ceBright:
      begin
        BrightEffect(ssuf, dsuf.Width, dsuf.Height);
        Exit;
      end;
    ceGrayScale:
      begin
        GrayEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceRed:
      begin
        RedEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceBlack:
      begin
        BlackEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceWhite:
      begin
        WhiteEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceGreen:
      begin
        GreenEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceBlue:
      begin
        BlueEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceYellow:
      begin
        YellowEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
    ceFuchsia:
      begin
        FuchsiaEffect(X, Y, dsuf.Width, dsuf.Height, ssuf);
        Exit;
      end;
  end;
end;

unit Actor.pas
  if source.Height > 350 then begin
//	    drawex(dsurface, ddx, ddy, source, 0, 0, source.Width, source.Height, 0);
	    DrawEffect(0, 0, g_ImgMixSurface, source, ceff);
//            DrawEffect (0, 0, source.Width, source.Height, g_ImgMixSurface, ceff);
            DrawEffect(0, 0, g_ImgMixSurface, source, ceff);
//            DrawEffect (0, 0, source.Width, source.Height, g_ImgMixSurface, ceff);
            DrawEffect(0, 0, g_ImgMixSurface, source, ceff);
	    DrawBlend (dsurface, ddx, ddy, g_ImgMixSurface, 0);
unit PlayScn.pas:
//                      DrawEffect (0, 0, d.Width, d.Height, g_ImgMixSurface, ceBright);
                        DrawEffect(0, 0, g_ImgMixSurface, d, ceBright);

      if g_MySelf.m_boDeath then //ʾڰ׻
//       DrawEffect (0, 0, m_ObjSurface.Width, m_ObjSurface.Height, m_ObjSurface, g_DeathColorEffect{ceGrayScale});
         DrawEffect(0, 0, m_ObjSurface, m_ObjSurface, g_DeathColorEffect{ceGrayScale});

unit ClMain.pas:
      //256 Blend utility
//      if not LoadNearestIndex (NEARESTPALETTEINDEXFILE) then
//      begin
//         BuildNearestIndex (DxDraw.ColorTable);
//         SaveNearestIndex (NEARESTPALETTEINDEXFILE);
//      end;
//      BuildColorLevels (DxDraw.ColorTable);
//      buildrealrgb(DxDraw.ColorTable);//thedeath

ͻ˻ͼֻʾϽ00λã϶Ӱ취
unit ClMain.pas:
frmMain.AppOnIdle:
...
  FClientRect:=FrmMain.ClientRect;
  windows.ClientToScreen(FrmMain.Handle, FClientRect.TopLeft);

    if g_boFullScreen then
      DxDraw.Flip
    else
    DxDraw.Primary.Draw (FClientRect.Left, FClientRect.Top, DxDraw.Surface.ClientRect, DxDraw.Surface, FALSE);
//ں󡣡

2015/12/18
	ƮƮͻѪλã
	DrawScrn.pas:
	infoMsg := IntToStr(Actor.m_Abil.HP) + '/' + IntToStr(Actor.m_Abil.MaxHP);
	BoldTextOut(MSurface, Actor.m_nSayX - (Length(infoMsg) * 3), Actor.m_nSayY - 25, clWhite, clBlack, infoMsg);//˴λꡣ
21:57 2015/12/21
	M2Server->ClMainϵRunTimeؼIntervalԣ1Ϊ100ԼCPUڴĸɡ

16:31 2015/12/22
	M2Server->CLMain:
          try
            if GetTickCount > LongWord(g_DenySayMsgList.Objects[I]) then
            begin
            for I:=g_DenySayMsgList.Count - 1 downto 0 do
              begin
                  g_DenySayMsgList.Delete(I);
              end;
            end;
          finally.....

23:01 2015/12/25
M2Server󲿷ݡ

22:35 2015/12/26
DBServer:
	FIDHum.pas:
	DelphiXE7ʼȥDBE棬ûDBTables.pas,ΪADODBQuery1: TQuery;ΪQuery1: TADOQuery;ȥʵеDataBaseNameԡ

9:26 2016/1/11
ͻʱʾڵĽ
mir2.dprԪ
begin
  Application.Initialize;
  Application.Title := 'legend of mir2';
  Application.MainFormOnTaskbar := True;//һʾڡDelphi7²Ҫ
  Application.CreateForm(TfrmMain, frmMain);
  Application.CreateForm(TFrmDlg, FrmDlg);
  InitObj();

  g_nThisCRC := CalcFileCRC(Application.ExeName);
  Application.Run;
end.

15:44 2016/1/12
DelphiXʱӦע⣺
DXDraws.pas Ԫ
´ע͵:
{WM_ENTERSIZEMOVE: //by blue 080830
      begin
        if not (csLoading in ComponentState) then
          Finalize;
      end;
    WM_EXITSIZEMOVE:
      begin
        if not (csLoading in ComponentState) then
          Initialize;
      end;} 
      
      Ȼƶڻ


22:12 2016/4/27

RunGateϷҪ⣺
Main.pas:
procedure TFrmMain.ProcessUserPacket(UserData:pTSendUserData);
//00455E80
var
  sMsg,sData:String;sDefMsg,sDataMsg,sDataText,sHumName:String;
...
begin
  try
    n14 := 0;
   ...
                if SessionArray[UserData.nSocketIdx].boStartLogon then begin
                  //һ¼ݰ
                  Inc(nHumLogonMsgSize, Length(sData));
                  SessionArray[UserData.nSocketIdx].boStartLogon := False;
                  sData := '#' + IntToStr(nPacketIdx) + sData + '!';
                  GetMem(Buffer, Length(sData) + 1);
                  Move(Ansitring(Sdata)[1], Buffer^, Length(AnsiString(SData))* SizeOf(Char));
                  SendServerMsg(GM_DATA,UserData.nSocketIdx,
                    SessionArray[UserData.nSocketIdx].Socket.SocketHandle,
                    SessionArray[UserData.nSocketIdx].nUserListIndex,Length(sData) + 1,Buffer);
                  FreeMem(Buffer);
                ...
end;
22:25 2016/4/27
ͻȡȫûб߿ĻϽǣ>FrmMain.BorderStyle:=bsSingle;
	ͻ˴ڻˣϷ򱻴סˣ>if doFullScreen in DxDraw.Options then begin
		         //
		      end else begin
		         frmMain.ClientWidth:=SCREENWIDTH;
		         frmMain.ClientHeight:=SCREENHEIGHT;
		      end;

23:38 2016/4/28
ͻ°UnDelphiXʱʾ
[dcc32 Error] WIL.pas(430): E2250 There is no overloaded version of 'Lock' that can be called with these arguments
DxDraws.paslockˡ
1ڱĵԪuses֣DirectX滻DirectDraw(ҲֻDelphi2009Ժİ汾)
2ddsd: TDDSurfaceDesc2;ȫΪddsd: TDDSurfaceDesc;
ӦÿԽ⡣
ʾûжD3DPAL_READONLYģD3DPAL_READONLY滻$40;

