Autor Beitrag
reepo2k
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 138

WIN XP
Borland Delphi 7 Enterprise, Microsoft Visual C++ 6.0 Enterprise, Macromedia Dreamweaver 8
BeitragVerfasst: Di 15.02.05 19:52 
Hallo, wie mache ich das, dass eine Grafik in der Mitte eines Games angezeigt wird? (z.B. bei Battlefield oder Unreal Tournament)

Weil wenn man das Game öfnen, wird die Grafik ja nicht mehr angezeigt.


Geht das irgendwie?


Danke!


MfG: reepo2k
PattyPur
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 80

Win98, WinXP
Delphi 7
BeitragVerfasst: Di 15.02.05 19:57 
Was will uns der Künstler damit sagen ?

willst du dir ein fadenkreuz in die mitte malen oder wie ?
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 15.02.05 20:02 
scheint so.

Guckst du mal in diesen Thread
www.delphi-forum.de/...mp;highlight=textout
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Di 15.02.05 20:41 
jo mir wurd hier auch geholfen ^^
hab auch ein kleines tool geschrieben...hier mal schnell der komplette source...
also brauchste delphix für, also für den timer hab ich es benutzt.

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DXClass, StdCtrls;

type
  TForm1 = class(TForm)
    DXTimer1: TDXTimer;
    procedure DXTimer1Timer(Sender: TObject; LagCount: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.DXTimer1Timer(Sender: TObject; LagCount: Integer);
var
 cnv : TCanvas;
 cross: TBitmap;
begin
begin
cross := TBitmap.Create;
cnv := TCanvas.Create;
cross.LoadFromFile('cross.bmp');
cross.TransparentColor := clWhite;
cross.Transparent := True;
 with cnv do
  begin
   try
    Handle := GetDC(0);
    cnv.Draw((Screen.Width DIV 2)-(cross.Width DIV 2),(Screen.Height DIV 2)-(cross.Height DIV 2),cross);
    cross.Free;
   finally
    free;
  end;
end;
end;
end;
end.


sry wenns sche**** formatiert is ^^
aber habs da noch nich so raus.

also das prog lädt jetzt einfach die datei cross.bmp und klatscht dieses bild genau in die mitte des bildschirms.
weiss wird natürlich weggelassen.

so kann man das crosshair nach belieben verändern.
hab zwar noch kleine andere features bei mir eingebaut aber ich denke dass das grad unwichtig ist

mfg

en!gma
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 15.02.05 21:46 
Mal ne kurze Frage zu delphiX: Ich habe keine DX, ist der dxtimer wirklich soviel besser als der TTimer? Oder gibts da überhaupt einen Unterschied?
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Di 15.02.05 21:49 
Ich glaub der ist viel genauer.
Hab da mal was gehört :wink:

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Di 15.02.05 22:19 
hab auch irgendwie mal gehört, dass der normale timer ca 100x pro sec läuft und der dx timer irgendwie 2000x oda so
bitte nich schlagen wenns falsch is ^^
OneOfTen
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 15.02.05 22:31 
reepo2k hat folgendes geschrieben:
Hallo, wie mache ich das, dass eine Grafik in der Mitte eines Games angezeigt wird? (z.B. bei Battlefield oder Unreal Tournament)

Weil wenn man das Game öfnen, wird die Grafik ja nicht mehr angezeigt.


Hört sich irgendwie nach Splashscreen an, könnte natürlich auch komplett daneben liegen.. :gruebel:
reepo2k Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 138

WIN XP
Borland Delphi 7 Enterprise, Microsoft Visual C++ 6.0 Enterprise, Macromedia Dreamweaver 8
BeitragVerfasst: Mi 16.02.05 16:56 
Danke, en!gma hat es auf den Punkt getroffen.


MfG: reepo2k

Edit:
Auf was muss denn der TimerInterwall?
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Mi 16.02.05 20:05 
mach am besten so klein wie es geht...also 0
aber wahrscheinlich wird es ein wenig flackern bei games...
dann muss man noch doubleBuffered:=true setzen oda sowas ^^
dann flackerts ein bischen weniger
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 16.02.05 20:08 
quark :)

Doublebuffered nützt nur was wenn du das dem Parent aufgibst.