Du bist nicht angemeldet.

  • Anmelden
  • Registrieren

X-Terminator

Fortgeschrittener

Beiträge: 361

1

17.06.2004, 16:46

Compiling Probleme

void sys_glBegin (GLenum mode)

{
{
if(mala && (mode == GL_TRIANGLE_STRIP || mode == GL_TRIANGLE_FAN))
{
glDisable(GL_DEPTH_TEST);
}
}

}
{
if (mode == GL_QUADS)
{
if(oke)
{
GLfloat smokecol[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR, smokecol);
if((smokecol[0]==smokecol[1]) && (smokecol[0]==smokecol[2]) && (smokecol[0]!=0.0) && (smokecol[0]!=1.0))
oke=true;
else
oke=false;
}
if(ash)
{
GLfloat flashcol[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR, flashcol);
if(flashcol[0]==1.0 && flashcol[1]==1.0 && flashcol[2]==1.0)
ash=true;
else
ash=false;
}
}
(*orig_glBegin) (mode);
}

----------------------------------------------------------------------
--------------------Configuration: opengl32 - Win32 Release--------------------
Compiling...
opengl32.cpp
C:\Dokumente und Einstellungen\Thomas1\Desktop\opengl32.cpp(48) : error C2447: missing function header (old-style formal list?)
C:\Dokumente und Einstellungen\Thomas1\Desktop\opengl32.cpp(283) : warning C4127: conditional expression is constant
C:\Dokumente und Einstellungen\Thomas1\Desktop\opengl32.cpp(290) : warning C4127: conditional expression is constant
Error executing cl.exe.

opengl32.dll - 1 error(s), 2 warning(s)


hi@all
ich weiss das da nur noch irgendwas kleines fehlt aber ich WEIß nicht wo?

subay

Meister

Beiträge: 1 843

2

17.06.2004, 17:01

aber sicher nicht in den cheats tutorials....

moved!

gruß subay

ValloV

unregistriert

3

17.06.2004, 18:38

Zitat von »X-Terminator«

void sys_glBegin (GLenum mode)

{
{
if(mala && (mode == GL_TRIANGLE_STRIP || mode == GL_TRIANGLE_FAN))
{
glDisable(GL_DEPTH_TEST);
}
}

}
{
if (mode == GL_QUADS)
{
if(oke)
{
GLfloat smokecol[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR, smokecol);
if((smokecol[0]==smokecol[1]) && (smokecol[0]==smokecol[2]) && (smokecol[0]!=0.0) && (smokecol[0]!=1.0))
oke=true;
else
oke=false;
}
if(ash)
{
GLfloat flashcol[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR, flashcol);
if(flashcol[0]==1.0 && flashcol[1]==1.0 && flashcol[2]==1.0)
ash=true;
else
ash=false;
}
}
(*orig_glBegin) (mode);
}



hast im oberen teil bissi viel klammern oder? ^^
muesste ungefaehr so aussehen:

Quellcode

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
void sys_glBegin (GLenum mode)
{
if(mala && (mode == GL_TRIANGLE_STRIP || mode == GL_TRIANGLE_FAN)) 
{
(*orig_glDisable)(GL_DEPTH_TEST);
}
else
{
(*orig_glEnable)(GL_DEPTH_TEST); //damit machst du schonmal keine leitern ect sichtbar
}

if(oke && mode == GL_QUADS)
{
GLfloat smokecol[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR, smokecol);
if((smokecol[0]==smokecol[1]) && (smokecol[0]==smokecol[2]) && (smokecol[0]!=0.0) && (smokecol[0]!=1.0))
{
okez = true; //du kannst nicht die selbe variable fuern smokeremove und die keyactivation usen, sprich musst im oberen teil deiner opengl32.cpp oder einem speziellen headerfile noch ein extra bool anlegen
}
else 
{
okez = false;
}
}

if(ash)
{
GLfloat flashcol[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR, flashcol);
if(flashcol[0]==1.0 && flashcol[1]==1.0 && flashcol[2]==1.0)
{
ashz = true; //siehe smoke
}
else
{
ashz = false;
}
}
(*orig_glBegin)(mode);
}


ich wuerde dir emphelen strukturen zu verwenden mit draw und cvar z.b.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
typedef struct{
bool mala;
bool oke;
bool ash;
}cvar_s;

typedef struct{
bool oke;
bool ash;
}draw_s;

cvar_s cvar;
draw_s draw;


das setzt du auch wieder an anfang deines files, dann setzte du anstatt mala,oke und ash einfach cvar.mala, cvar.oke und var.ash ein und anstatt okez und ashz in meinem code draw.oke und draw.ash und das selbe halt noch ueberall anders z.b. im flash/smoke remove code. kann auch sein das da kleinere fehler mit drin sind, wurd wenig unuebersichtlich(auf deine compile errors bin ich noch nicht eingegangen, die paar fehler eben sind mir nur eben aufgefallen).

X-Terminator

Fortgeschrittener

Beiträge: 361

4

17.06.2004, 19:35

danke sehr hab 0 warnungen 0 fehler hab jetzt

wh lambert white walls fullbright flash und smoke remove thx for help

Timberland

unregistriert

5

17.06.2004, 20:07

Vallov das hat er von mir, in meinem Code hatte ich am Anfang immer mehr Klammern, damit ich die If-Schleifen schneller finde. Ich mein and und für sich ist es ja egal wieviele Klammer ich nutzte.

ValloV

unregistriert

6

17.06.2004, 23:52

des check ich jetzt nicht ^^, d.h. entweder hast du ihm jetzt geholfen oder meinst du das mit den vielen klammern hat er von dir ? aber gut das ich helfen konnte =)

deinen xqz kannst du noch verbessern indem du ein bool in glshademodel(if(mode == GL_SMOOTH)) //model wird gezichnet auf true setzt und in glpopmatrix auf false und beim false setzen noch glenable(gl_depth_test) einfuegst und in glbegin nach dem bool fragst und dann gldisable(gl_depth_test) nutzt. das sollte dann ungefaehr so aussehen:

Quellcode

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
typedef struct{
bool xqz;
}cvar_s

typedef struct{
bool xqz;
}draw_s;

cvar_s cvar;
draw_s draw;

void sys_glBegin(GLenum mode)
{
if((cvar.xqz && draw.xqz) && (mode == GL_TRIANGLE_STRIP || mode == GL_TRIANGLE_FAN))
{
(*orig_glDisable)(GL_DEPTH_TEST);
}
(*orig_glBegin)(mode);
}

void sys_glShadeModel(GLenum mode)
{
if(cvar.xqz)
{
draw.xqz = true;
}
(*orig_glShadeModel)(mode);
}

void sys_glPopMatrix(void)
{
if(cvar.xqz && draw.xqz)
{
draw.xqz = false;
(*orig_glEnable)(GL_DEPTH_TEST);
}
(*orig_glPopMatrix)();
}


dann kannst du noch transwalls oder wireframe adden

Quellcode

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
typedef struct{
bool asus;
bool wire;
}cvar_s;

cvar_s cvar;

void sys_glBegin(GLenum mode)
{
if(cvar.asus)
{
if(mode == GL_POLYGON)
{
float curcolor[4];
(*orig_glGetFloatv)(GL_CURRENT_COLOR,curcolor);
(*orig_glDisable)(GL_DEPTH_TEST);
(*orig_glEnable)(GL_BLEND);
(*orig_glBlendFunc)(GL_SRC_ALPHA,GL_ZERO);
(*orig_glColor4f)(curcolor[0],curcolor[1],curcolor[2],0.5f);
}
else if((mode == GL_TRIANGLE_STRIP) || (mode == GL_TRIANGLE_FAN))
{
(*orig_glEnable)(GL_DEPTH_TEST);
(*orig_glDisable)(GL_BLEND);
}
}
if(cvar.wire)
{
if(mode == GL_POLYGON)
{
(*orig_glPolygonMode)(GL_FRONT_AND_BACK,GL_LINE);
(*orig_glLineWidth)(1.0f); // dicke der lines
(*orig_glColor3f)(1.0f,0.0f,0.0f); // roter wireframe mode
}
else if(mode == GL_TRIANGLE_STRIP || mode == GL_TRIANGLE_FAN);
{
(*orig_glPolygonMode)(GL_FRONT_AND_BACK,GL_FILL);
}
}
(*orig_glBegin)(mode);
}


in der cheat tuts sektion duerftest du ein tut fuern asuswh und nun auch wireframe mode finden.

Timberland

unregistriert

7

18.06.2004, 13:01

Was passiert wenn ich die Sachen adde (also für den XQZ), wird dann der XQZ so, dass die Models auch vor Kisten zu sehen sind?

Ich fand es mal mit sovielen Klammern übersichtlicher, zzt aber nicht :)l

Thema bewerten