Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread Tony "omega" Sergi
Oh, i misread the subject.

Then my answer is a firm 'i dunno' cause i haven't been interested in making
anything for goldsrc in 8 years. ;)
-Tony

On Fri, Mar 19, 2010 at 4:08 AM, kevin bowen wrote:

> Thank you but I'm working with HL1.
>
> On Thu, Mar 18, 2010 at 1:43 PM, Tony "omega" Sergi  >wrote:
>
> > You actually shouldn't need to even use avikit.. since the engine has
> > loading of avi's AND bink videos.
> > preferably you would want to use bink anyway as you wouldn't need to
> worry
> > about codecs.
> >
> > loading a bink video actually returns a material anyway, and there is an
> > actual 'bik' shader for drawing on objects.
> > i've never used the shader myself though, i just know it exists.
> > -Tony
> >
> >
> > On Fri, Mar 19, 2010 at 3:19 AM, Jonas 'Sortie' Termansen <
> > hlcod...@maxsi.dk
> > > wrote:
> >
> > > I have success implementing the free software ffmpeg library in Source.
> > > There is nothing like watching a 720p HD xvid on an ingame surface. :D
> > > It's not very well implemented though and I don't have any sound
> > > support. I'd gladly share the source code with you. ffmpeg is very fast
> > > and it provides all the codecs itself and supports most formats VLC do
> > > (because it is used by VLC).
> > >
> > > Rodrigo 'r2d2rigo' Diaz skrev:
> > > > AVIkit was used in a demo MOD from the creator of the library, but
> > AFAIK
> > > he
> > > > didn't release the source code. I tried to add it some time ago, but
> > > finally
> > > > dropped the idea.
> > > >
> > > > 2010/3/18 kevin bowen 
> > > >
> > > >
> > > >> Just wondering if anyone has implemented AVIkit and is willing to
> part
> > > with
> > > >> the code :) or if AVIkit has been used in any open source mods
> > (rebirth
> > > and
> > > >> arrangemod have the lib's included but don't actually call the
> > > functions).
> > > >> I'd do it myself but it would literally take years (I'm a moron),
> it'd
> > > be
> > > >> easier just to ask for it here just incase any devs have a dead hl1
> > mod
> > > >> with
> > > >> the code already laid out :)
> > > >>
> > > >> I've scoured the internet and all I could find was this on a russian
> > HL
> > > >> coding site which seems to use the code but I'm not sure if it's an
> > > entire
> > > >> replacement for avikit.cpp or if it fits in there somehow (again I'm
> a
> > > >> moron
> > > >> when it comes to this)
> > > >>
> > > >>
> > > >>
> > > >>  ///
> > > >> // Only setup the avi if it's actually a video screen
> > > >>
> > > >> if (isVideoScreen && replacement[0] != '\0') {
> > > >>char *error_msg = NULL;
> > > >>long xres = 0;
> > > >>long yres = 0;
> > > >>float duration = 0.0f;
> > > >>
> > > >>movie = new AVIKit( absolute_replacement, false );
> > > >>if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
> > > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening
> > %s:
> > > >> %s\n", absolute_replacement, error_msg );
> > > >>delete movie;
> > > >>break;
> > > >>}
> > > >>movie->getVideoInfo( &xres, &yres, &duration );
> > > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x
> %ld
> > > (%f
> > > >> secs)\n", replacement, xres, yres, duration );
> > > >>gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents
> > (%d
> > > %d
> > > >> %d)\n",
> > > >>(int)origin[0], (int)origin[1], (int)origin[2],
> > > >>(int)extents[0], (int)extents[1], (int)extents[2] );
> > > >>
> > > >>// Create the OpenGL texture
> > > >>GLuint texnum;
> > > >>glGenTextures( 1, &texnum );
> > > >>
> > > >>if (!AddComplexAvi( movie, texnum, origin, angles, extents,
> > > &error_msg
> > > >> )) {
> > > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding
> > > movie:
> > > >> %s\n", error_msg );
> > > >>delete movie;
> > > >>}
> > > >>} else if (isVideoScreen) {
> > > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen
> > > didn't
> > > >> have a movie specified!\n" );
> > > >>}
> > > >>
> > > >>//Setting up the texture:
> > > >>
> > > >>movie->getVideoInfo( &data->width, &data->height,
> > &data->total_length
> > > );
> > > >>glEnable( GL_TEXTURE_2D );
> > > >>glBindTexture( GL_TEXTURE_2D, data->texture_index );
> > > >>glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> > > >>glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0,
> > > GL_RGB,
> > > >> GL_UNSIGNED_BYTE, tmpbuffer );
> > > >>
> > > >>//Updating the texture each frame:
> > > >>
> > > >>// Calculate the frame needed
> > > >>int frame = i->movie->getVideoFrameNumber( i->current_time );
> > > >>
> > > >>// If the frame has changed, re-upload it
> > > >>if (frame != i->current_frame) {
> > > >>i->current_frame = frame;
> > > >>i->movie->getVideoFrame( (char*)i->buffer, frame );
> > > >>
> > > >>// If the video i

Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread Christopher Harris
We have it working in our mod for replace a model's texture with a video. It
is a bit tricky in this respect because you have to pre-design your uv to
work with it, but it would be easy to translate it to just draw a quad in
the world with that as the texture; Referring to IBIK. It isn't that hard.
Here are the important steps:

First in the OnDataChanged I do this to create my BIK material and get it
ready to be used.

if(updateType == DATA_UPDATE_CREATED)
{
m_hBikMaterial =
bik->CreateMaterial(m_strVideoMaterial,m_strVideoMaterial,"GAME");

if ( m_hBikMaterial != BIKMATERIAL_INVALID )
{
m_pMaterial = bik->GetMaterial(m_hBikMaterial);
SetNextClientThink(CLIENT_THINK_ALWAYS);
}

if(m_pMaterial)
m_pMaterial->AddRef();
}

Next in the ClientThink of the entity that you are using to allow the mapper
to input the video file you do.

if(m_hBikMaterial != BIKMATERIAL_INVALID)
{
if(!bik->Update(m_hBikMaterial))
{
bik->SetFrame(m_hBikMaterial,0.0f);
}
}

This basically attempts to update to a new frame if it is the end I think it
will fail and so it just sets the frame back to the start so it always
loops. You'll have to be sure to clean up your references and stuff when the
entity dies as well, but that is simple stuff. And using it on the model is
as simple as in DrawModel:

modelrender->ForceMaterialOverride(m_pMaterial);
int val = BaseClass::DrawModel(flags);
modelrender->ForceMaterialOverride(0);
return val;

I only wish they would expose someway to manipulate the sound stream so you
can have it appear to come from the world itself and not play everywhere no
matter what. I also first had tried to use IAvi to use AVI files instead,
but that interface refused to work.

Chris

-Original Message-
From: hlcoders-boun...@list.valvesoftware.com
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Jonas 'Sortie'
Termansen
Sent: Thursday, March 18, 2010 3:28 PM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] [GoldSrc] AviKit in any mods?

I attempted to work with BINK and Source's implementation of it. Sadly 
there is not enough functions exposed and not enough documentation to 
really use it. Unless you have engine access, there is no real reliable 
way of getting it working in my experience. I recommend using ffmpeg if 
you can get it working; I have a very simple half-done implementation of 
it - but it's not as good as it could be.

Tony "omega" Sergi skrev:
> You actually shouldn't need to even use avikit.. since the engine has
> loading of avi's AND bink videos.
> preferably you would want to use bink anyway as you wouldn't need to worry
> about codecs.
>
> loading a bink video actually returns a material anyway, and there is an
> actual 'bik' shader for drawing on objects.
> i've never used the shader myself though, i just know it exists.
> -Tony
>
>
> On Fri, Mar 19, 2010 at 3:19 AM, Jonas 'Sortie' Termansen
   
>> wrote:
>> 
>
>   
>> I have success implementing the free software ffmpeg library in Source.
>> There is nothing like watching a 720p HD xvid on an ingame surface. :D
>> It's not very well implemented though and I don't have any sound
>> support. I'd gladly share the source code with you. ffmpeg is very fast
>> and it provides all the codecs itself and supports most formats VLC do
>> (because it is used by VLC).
>>
>> Rodrigo 'r2d2rigo' Diaz skrev:
>> 
>>> AVIkit was used in a demo MOD from the creator of the library, but AFAIK
>>>   
>> he
>> 
>>> didn't release the source code. I tried to add it some time ago, but
>>>   
>> finally
>> 
>>> dropped the idea.
>>>
>>> 2010/3/18 kevin bowen 
>>>
>>>
>>>   
 Just wondering if anyone has implemented AVIkit and is willing to part
 
>> with
>> 
 the code :) or if AVIkit has been used in any open source mods (rebirth
 
>> and
>> 
 arrangemod have the lib's included but don't actually call the
 
>> functions).
>> 
 I'd do it myself but it would literally take years (I'm a moron), it'd
 
>> be
>> 
 easier just to ask for it here just incase any devs have a dead hl1 mod
 with
 the code already laid out :)

 I've scoured the internet and all I could find was this on a russian HL
 coding site which seems to use the code but I'm not sure if it's an
 
>> entire
>> 
 replacement for avikit.cpp or if it fits in there somehow (again I'm a
 moron
 when it comes to this)



  ///
 // Only setup the avi if it's actually a video screen

 if (isVideoScreen && replacement[0] != '\0') {
char *error_msg = NULL;
long xres = 0;
long yres = 0;
float duration = 0.0f;

movie = new AVIKit( absolute_replacement, false );
if (movi

Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Bob Somers
Protip: Write the app first.

When it works and you actually have users, then you can spend all day
circle-jerking over licenses.

--Bob






On Thu, Mar 18, 2010 at 3:35 PM, Jeffrey "botman" Broome
 wrote:
> On 3/18/2010 5:12 PM, Garry Newman wrote:
>> "Hey guys I have an idea for a new style of pants!"
>> "Awesome - but I don't think you should get the promotional posters
>> printed on a traditional printing press - you should..."
>>
>> garry
>>
>
> Your message got cut off.  How are we supposed to print our promotional
> posters?  :)
>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Jeffrey "botman" Broome
On 3/18/2010 5:12 PM, Garry Newman wrote:
> "Hey guys I have an idea for a new style of pants!"
> "Awesome - but I don't think you should get the promotional posters
> printed on a traditional printing press - you should..."
>
> garry
>

Your message got cut off.  How are we supposed to print our promotional 
posters?  :)


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Garry Newman
Totally agree. These projects always seem to have a 2 week argument
about licenses - which ultimately achieves nothing. You're not gonna
take someone to court because they downloaded your map compiling tool
and have hex edited your name in the About dialogue to theirs. Who
cares??

"Hey guys I have an idea for a new style of pants!"
"Awesome - but I don't think you should get the promotional posters
printed on a traditional printing press - you should..."

garry

On Thu, Mar 18, 2010 at 9:21 PM, Tobias Kammersgaard
 wrote:
> All this license bullshit. What's the point.
>
> - ScarT
>
>
> On 18 March 2010 22:12, Alexander Hirsch <1ze...@googlemail.com> wrote:
>
>> Really just depends on your ethics.
>> If you don't care what others do with it, choose the WTFPL or something.
>> If you want to give big freedom, but still credits a BSD-style licence is
>> good.
>> If you want to force others to pass on the freedom, a GPL-style licence is
>> good.
>>
>> On Thu, Mar 18, 2010 at 9:47 PM, David Kraeutmann 
>> wrote:
>> > LGPL is useless for standalone apps. BSD-style licenses are good tho'.
>> >
>> > On Thu, Mar 18, 2010 at 9:50 AM, Marek Sieradzki
>> >  wrote:
>>  >> My vision is to create an user-friendly general purpose batch
>> compile
>>  >> tool for Source Mods. It should be written in pure C++ and licensed
>>  >> under a free software license such as the GNU GPL. It should be
>>  >> developed in union with the modding community.
>> >>
>> >> GPL is far too restrictive. Use LGPL or BSD3.
>> >>
>> >> ___
>> >> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>> >>
>> >>
>> >
>> > ___
>> > To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
>> >
>> >
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Tobias Kammersgaard
30 replies of bashing and license discussion. Effectiving working here bros!
The tools aren't really the problem, Hammer is to be honest.

- ScarT


On 18 March 2010 22:50, Jonas 'Sortie' Termansen  wrote:

> David Kraeutmann wrote:
> > LGPL is useless for standalone apps. BSD-style licenses are good tho'.
> >
> That is not true. What if I wanted to copy code from my GPL'd program to
> my LGPL library and the code is commited by others?
>
> If I released my Maxsi Compile tool under the GNU LGPLv3, then you are
> allowed to copy its code to GNU LGPLv3 libraries. This would not be
> permitted if I released it under GNU GPLv3. All my programs are
> currently under GNU LGPLv3 (because of licensing issues with
> implementing them in Source, just to be safe) and I frequently move code
> between the actual .exe files and my shared library Maxsi Engine. I
> would not be able to do that with code commited by others if I released
> it under GNU GPLv3 - so that's a bit of a problem. If I am wrong about
> any of this, feel free to correct me with properly sourced material.
>
> Whether to use GPL or LGPL is a matter of strategy and I am leaning
> towards GPL here.
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Jonas 'Sortie' Termansen
David Kraeutmann wrote:
> LGPL is useless for standalone apps. BSD-style licenses are good tho'.
>   
That is not true. What if I wanted to copy code from my GPL'd program to 
my LGPL library and the code is commited by others?

If I released my Maxsi Compile tool under the GNU LGPLv3, then you are 
allowed to copy its code to GNU LGPLv3 libraries. This would not be 
permitted if I released it under GNU GPLv3. All my programs are 
currently under GNU LGPLv3 (because of licensing issues with 
implementing them in Source, just to be safe) and I frequently move code 
between the actual .exe files and my shared library Maxsi Engine. I 
would not be able to do that with code commited by others if I released 
it under GNU GPLv3 - so that's a bit of a problem. If I am wrong about 
any of this, feel free to correct me with properly sourced material.

Whether to use GPL or LGPL is a matter of strategy and I am leaning 
towards GPL here.

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Alexander Hirsch
I guess the WTFPL is for you :P
The point is, that you might want to decide what shall happen with
your work. And licenses are just a way of making the easy sound
complicated, so that you can be backed by the law.

On Thu, Mar 18, 2010 at 10:21 PM, Tobias Kammersgaard
 wrote:
> All this license bullshit. What's the point.
>
> - ScarT
>
>
> On 18 March 2010 22:12, Alexander Hirsch <1ze...@googlemail.com> wrote:
>
>> Really just depends on your ethics.
>> If you don't care what others do with it, choose the WTFPL or something.
>> If you want to give big freedom, but still credits a BSD-style licence is
>> good.
>> If you want to force others to pass on the freedom, a GPL-style licence is
>> good.
>>
>> On Thu, Mar 18, 2010 at 9:47 PM, David Kraeutmann 
>> wrote:
>> > LGPL is useless for standalone apps. BSD-style licenses are good tho'.
>> >
>> > On Thu, Mar 18, 2010 at 9:50 AM, Marek Sieradzki
>> >  wrote:
>>  >> My vision is to create an user-friendly general purpose batch
>> compile
>>  >> tool for Source Mods. It should be written in pure C++ and licensed
>>  >> under a free software license such as the GNU GPL. It should be
>>  >> developed in union with the modding community.
>> >>
>> >> GPL is far too restrictive. Use LGPL or BSD3.
>> >>
>> >> ___
>> >> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>> >>
>> >>
>> >
>> > ___
>> > To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
>> >
>> >
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Tobias Kammersgaard
All this license bullshit. What's the point.

- ScarT


On 18 March 2010 22:12, Alexander Hirsch <1ze...@googlemail.com> wrote:

> Really just depends on your ethics.
> If you don't care what others do with it, choose the WTFPL or something.
> If you want to give big freedom, but still credits a BSD-style licence is
> good.
> If you want to force others to pass on the freedom, a GPL-style licence is
> good.
>
> On Thu, Mar 18, 2010 at 9:47 PM, David Kraeutmann 
> wrote:
> > LGPL is useless for standalone apps. BSD-style licenses are good tho'.
> >
> > On Thu, Mar 18, 2010 at 9:50 AM, Marek Sieradzki
> >  wrote:
>  >> My vision is to create an user-friendly general purpose batch
> compile
>  >> tool for Source Mods. It should be written in pure C++ and licensed
>  >> under a free software license such as the GNU GPL. It should be
>  >> developed in union with the modding community.
> >>
> >> GPL is far too restrictive. Use LGPL or BSD3.
> >>
> >> ___
> >> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Alexander Hirsch
Really just depends on your ethics.
If you don't care what others do with it, choose the WTFPL or something.
If you want to give big freedom, but still credits a BSD-style licence is good.
If you want to force others to pass on the freedom, a GPL-style licence is good.

On Thu, Mar 18, 2010 at 9:47 PM, David Kraeutmann  wrote:
> LGPL is useless for standalone apps. BSD-style licenses are good tho'.
>
> On Thu, Mar 18, 2010 at 9:50 AM, Marek Sieradzki
>  wrote:
 >> My vision is to create an user-friendly general purpose batch compile
 >> tool for Source Mods. It should be written in pure C++ and licensed
 >> under a free software license such as the GNU GPL. It should be
 >> developed in union with the modding community.
>>
>> GPL is far too restrictive. Use LGPL or BSD3.
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives, 
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread David Kraeutmann
LGPL is useless for standalone apps. BSD-style licenses are good tho'.

On Thu, Mar 18, 2010 at 9:50 AM, Marek Sieradzki
 wrote:
>>> >> My vision is to create an user-friendly general purpose batch compile
>>> >> tool for Source Mods. It should be written in pure C++ and licensed
>>> >> under a free software license such as the GNU GPL. It should be
>>> >> developed in union with the modding community.
>
> GPL is far too restrictive. Use LGPL or BSD3.
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread Jonas 'Sortie' Termansen
I attempted to work with BINK and Source's implementation of it. Sadly 
there is not enough functions exposed and not enough documentation to 
really use it. Unless you have engine access, there is no real reliable 
way of getting it working in my experience. I recommend using ffmpeg if 
you can get it working; I have a very simple half-done implementation of 
it - but it's not as good as it could be.

Tony "omega" Sergi skrev:
> You actually shouldn't need to even use avikit.. since the engine has
> loading of avi's AND bink videos.
> preferably you would want to use bink anyway as you wouldn't need to worry
> about codecs.
>
> loading a bink video actually returns a material anyway, and there is an
> actual 'bik' shader for drawing on objects.
> i've never used the shader myself though, i just know it exists.
> -Tony
>
>
> On Fri, Mar 19, 2010 at 3:19 AM, Jonas 'Sortie' Termansen
>> wrote:
>> 
>
>   
>> I have success implementing the free software ffmpeg library in Source.
>> There is nothing like watching a 720p HD xvid on an ingame surface. :D
>> It's not very well implemented though and I don't have any sound
>> support. I'd gladly share the source code with you. ffmpeg is very fast
>> and it provides all the codecs itself and supports most formats VLC do
>> (because it is used by VLC).
>>
>> Rodrigo 'r2d2rigo' Diaz skrev:
>> 
>>> AVIkit was used in a demo MOD from the creator of the library, but AFAIK
>>>   
>> he
>> 
>>> didn't release the source code. I tried to add it some time ago, but
>>>   
>> finally
>> 
>>> dropped the idea.
>>>
>>> 2010/3/18 kevin bowen 
>>>
>>>
>>>   
 Just wondering if anyone has implemented AVIkit and is willing to part
 
>> with
>> 
 the code :) or if AVIkit has been used in any open source mods (rebirth
 
>> and
>> 
 arrangemod have the lib's included but don't actually call the
 
>> functions).
>> 
 I'd do it myself but it would literally take years (I'm a moron), it'd
 
>> be
>> 
 easier just to ask for it here just incase any devs have a dead hl1 mod
 with
 the code already laid out :)

 I've scoured the internet and all I could find was this on a russian HL
 coding site which seems to use the code but I'm not sure if it's an
 
>> entire
>> 
 replacement for avikit.cpp or if it fits in there somehow (again I'm a
 moron
 when it comes to this)



  ///
 // Only setup the avi if it's actually a video screen

 if (isVideoScreen && replacement[0] != '\0') {
char *error_msg = NULL;
long xres = 0;
long yres = 0;
float duration = 0.0f;

movie = new AVIKit( absolute_replacement, false );
if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening %s:
 %s\n", absolute_replacement, error_msg );
delete movie;
break;
}
movie->getVideoInfo( &xres, &yres, &duration );
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x %ld
 
>> (%f
>> 
 secs)\n", replacement, xres, yres, duration );
gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents (%d
 
>> %d
>> 
 %d)\n",
(int)origin[0], (int)origin[1], (int)origin[2],
(int)extents[0], (int)extents[1], (int)extents[2] );

// Create the OpenGL texture
GLuint texnum;
glGenTextures( 1, &texnum );

if (!AddComplexAvi( movie, texnum, origin, angles, extents,
 
>> &error_msg
>> 
 )) {
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding
 
>> movie:
>> 
 %s\n", error_msg );
delete movie;
}
} else if (isVideoScreen) {
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen
 
>> didn't
>> 
 have a movie specified!\n" );
}

//Setting up the texture:

movie->getVideoInfo( &data->width, &data->height, &data->total_length
 
>> );
>> 
glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, data->texture_index );
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0,
 
>> GL_RGB,
>> 
 GL_UNSIGNED_BYTE, tmpbuffer );

//Updating the texture each frame:

// Calculate the frame needed
int frame = i->movie->getVideoFrameNumber( i->current_time );

// If the frame has changed, re-upload it
if (frame != i->current_frame) {
i->current_frame = frame;
i->movie->getVideoFrame( (char*)i->buffer, frame );

// If the video isn't a power of two o

Re: [hlcoders] I intend to make free software alternative to VBCT

2010-03-18 Thread Saul Rennison
"BSD is out of the question as a strong copyleft is required for my
software; I do not want propertiary spin-offs."
LGPL is strong copyleft

Thanks,
- Saul.


On 18 March 2010 09:22, Jonas 'Sortie' Termansen  wrote:

> BSD is out of the question as a strong copyleft is required for my
> software; I do not want propertiary spin-offs.
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread kevin bowen
Thank you but I'm working with HL1.

On Thu, Mar 18, 2010 at 1:43 PM, Tony "omega" Sergi wrote:

> You actually shouldn't need to even use avikit.. since the engine has
> loading of avi's AND bink videos.
> preferably you would want to use bink anyway as you wouldn't need to worry
> about codecs.
>
> loading a bink video actually returns a material anyway, and there is an
> actual 'bik' shader for drawing on objects.
> i've never used the shader myself though, i just know it exists.
> -Tony
>
>
> On Fri, Mar 19, 2010 at 3:19 AM, Jonas 'Sortie' Termansen <
> hlcod...@maxsi.dk
> > wrote:
>
> > I have success implementing the free software ffmpeg library in Source.
> > There is nothing like watching a 720p HD xvid on an ingame surface. :D
> > It's not very well implemented though and I don't have any sound
> > support. I'd gladly share the source code with you. ffmpeg is very fast
> > and it provides all the codecs itself and supports most formats VLC do
> > (because it is used by VLC).
> >
> > Rodrigo 'r2d2rigo' Diaz skrev:
> > > AVIkit was used in a demo MOD from the creator of the library, but
> AFAIK
> > he
> > > didn't release the source code. I tried to add it some time ago, but
> > finally
> > > dropped the idea.
> > >
> > > 2010/3/18 kevin bowen 
> > >
> > >
> > >> Just wondering if anyone has implemented AVIkit and is willing to part
> > with
> > >> the code :) or if AVIkit has been used in any open source mods
> (rebirth
> > and
> > >> arrangemod have the lib's included but don't actually call the
> > functions).
> > >> I'd do it myself but it would literally take years (I'm a moron), it'd
> > be
> > >> easier just to ask for it here just incase any devs have a dead hl1
> mod
> > >> with
> > >> the code already laid out :)
> > >>
> > >> I've scoured the internet and all I could find was this on a russian
> HL
> > >> coding site which seems to use the code but I'm not sure if it's an
> > entire
> > >> replacement for avikit.cpp or if it fits in there somehow (again I'm a
> > >> moron
> > >> when it comes to this)
> > >>
> > >>
> > >>
> > >>  ///
> > >> // Only setup the avi if it's actually a video screen
> > >>
> > >> if (isVideoScreen && replacement[0] != '\0') {
> > >>char *error_msg = NULL;
> > >>long xres = 0;
> > >>long yres = 0;
> > >>float duration = 0.0f;
> > >>
> > >>movie = new AVIKit( absolute_replacement, false );
> > >>if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
> > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening
> %s:
> > >> %s\n", absolute_replacement, error_msg );
> > >>delete movie;
> > >>break;
> > >>}
> > >>movie->getVideoInfo( &xres, &yres, &duration );
> > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x %ld
> > (%f
> > >> secs)\n", replacement, xres, yres, duration );
> > >>gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents
> (%d
> > %d
> > >> %d)\n",
> > >>(int)origin[0], (int)origin[1], (int)origin[2],
> > >>(int)extents[0], (int)extents[1], (int)extents[2] );
> > >>
> > >>// Create the OpenGL texture
> > >>GLuint texnum;
> > >>glGenTextures( 1, &texnum );
> > >>
> > >>if (!AddComplexAvi( movie, texnum, origin, angles, extents,
> > &error_msg
> > >> )) {
> > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding
> > movie:
> > >> %s\n", error_msg );
> > >>delete movie;
> > >>}
> > >>} else if (isVideoScreen) {
> > >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen
> > didn't
> > >> have a movie specified!\n" );
> > >>}
> > >>
> > >>//Setting up the texture:
> > >>
> > >>movie->getVideoInfo( &data->width, &data->height,
> &data->total_length
> > );
> > >>glEnable( GL_TEXTURE_2D );
> > >>glBindTexture( GL_TEXTURE_2D, data->texture_index );
> > >>glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> > >>glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0,
> > GL_RGB,
> > >> GL_UNSIGNED_BYTE, tmpbuffer );
> > >>
> > >>//Updating the texture each frame:
> > >>
> > >>// Calculate the frame needed
> > >>int frame = i->movie->getVideoFrameNumber( i->current_time );
> > >>
> > >>// If the frame has changed, re-upload it
> > >>if (frame != i->current_frame) {
> > >>i->current_frame = frame;
> > >>i->movie->getVideoFrame( (char*)i->buffer, frame );
> > >>
> > >>// If the video isn't a power of two on all sides, we need to
> > resize
> > >> it... 
> > >>if (i->resized_buffer) {
> > >>gluScaleImage( GL_RGB, i->realwidth, i->realheight,
> > >> GL_UNSIGNED_BYTE, i->buffer, i->width, i->height, GL_UNSIGNED_BYTE,
> > >> i->resized_buffer );
> > >>// ... and update the OpenGL texture ...
> > >>glEnable(GL_TEXTURE_2D);
> > >>glBindTexture( GL_TEXTURE_2D, i->texture_index );
> > >>g

Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Harry Jeffery
Yeah, that's what I've been doing with some personal projects I have
been working on and it works pretty well.

On 18 March 2010 18:43, Alexander Hirsch <1ze...@googlemail.com> wrote:
> You can really have both.
> Use the preprocessor to have stuff like
> #if PLATFORM == WINDOWS
>  //Windows-specific code
> #elif PLATFORM == POSIX
>  //POSIX code
> #elif PLATFORM == LOL_OS
>  //lol code
> #endif
>
> On Thu, Mar 18, 2010 at 7:37 PM, Harry Jeffery
>  wrote:
>> As Steam + Source engine is moving to mac and possibly/hopefully linux
>> in the near future I'd recommend keeping this as cross-platform as
>> possible. Advanced Windows 7 features such as the task-bar
>> progress-bar aren't that important to be honest.
>>
>> On 18 March 2010 08:53, Jonas 'Sortie' Termansen  wrote:
>>> Thanks Cory for your suggestions, they are quite useful!
>>>
>>> I have been thinking the UI through and done some concept art in paint. I 
>>> realized you never use/need to change most settings in VBCT. Instead I have 
>>> been focusing on those that you really do need and designed them to be 
>>> useful. None of this is implemented yet but I managed to get the batch 
>>> compiling working perfectly yesterday. What I propose is this:
>>>
>>> - To make things simpler I will make the main screen only contain this: 1) 
>>> a dropdown list of all mods in gameconfig.txt for both ep1 and orangebox, 
>>> 2) a dropdown list of all .vmf files in mapsrc for the mod, 3) a dropdown 
>>> list of all configuration, 4) a big Compile Map button and Cancel Compile, 
>>> 5) a progress bar and the option to watch the compile output, and 6) 
>>> various buttons to show the user friendly advanced buttons.
>>> - Most of the time you just want to compile a single map for instant 
>>> testing ingame. So instead of having to browse for a map manually, I will 
>>> make the program scan all mapsrc\ folders and make it default to the most 
>>> recently saved .vmf file, as this is most likely the one you want to 
>>> compile.
>>> - I will also show all recent .vmf files newer than their .bsp counterpart 
>>> under the title "You probably want to compile these:"
>>> - The user is also likely to the same compile flags for most compiles. So I 
>>> will use configurations such as Debug (HDR only), Release (LDR+HDR), Final 
>>> Release (Both -final) and so on. The user will be able to edit this list.
>>> - The program will assume all the default values for which mod to use, what 
>>> map to compile, and with what configuration. This will allow the mapper a 
>>> one click compile in most cases, as well as allowing him to easily change 
>>> it.
>>> - The user will be able to add maps to the compile queue while compiling 
>>> other maps and be able to watch the progress for them seperately.
>>> - It will be possible to change what tools will be called and add new ones.
>>> - And there will be a progress bar showing how the compile comes along in 
>>> the Win7 superbar.
>>>
>>> And more, there are just some of my ideas for the ideal interface, and it 
>>> isn't hard to make.
>>> ___
>>> To unsubscribe, edit your list preferences, or view the list archives, 
>>> please visit:
>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>
>>>
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives, 
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread Tony "omega" Sergi
You actually shouldn't need to even use avikit.. since the engine has
loading of avi's AND bink videos.
preferably you would want to use bink anyway as you wouldn't need to worry
about codecs.

loading a bink video actually returns a material anyway, and there is an
actual 'bik' shader for drawing on objects.
i've never used the shader myself though, i just know it exists.
-Tony


On Fri, Mar 19, 2010 at 3:19 AM, Jonas 'Sortie' Termansen  wrote:

> I have success implementing the free software ffmpeg library in Source.
> There is nothing like watching a 720p HD xvid on an ingame surface. :D
> It's not very well implemented though and I don't have any sound
> support. I'd gladly share the source code with you. ffmpeg is very fast
> and it provides all the codecs itself and supports most formats VLC do
> (because it is used by VLC).
>
> Rodrigo 'r2d2rigo' Diaz skrev:
> > AVIkit was used in a demo MOD from the creator of the library, but AFAIK
> he
> > didn't release the source code. I tried to add it some time ago, but
> finally
> > dropped the idea.
> >
> > 2010/3/18 kevin bowen 
> >
> >
> >> Just wondering if anyone has implemented AVIkit and is willing to part
> with
> >> the code :) or if AVIkit has been used in any open source mods (rebirth
> and
> >> arrangemod have the lib's included but don't actually call the
> functions).
> >> I'd do it myself but it would literally take years (I'm a moron), it'd
> be
> >> easier just to ask for it here just incase any devs have a dead hl1 mod
> >> with
> >> the code already laid out :)
> >>
> >> I've scoured the internet and all I could find was this on a russian HL
> >> coding site which seems to use the code but I'm not sure if it's an
> entire
> >> replacement for avikit.cpp or if it fits in there somehow (again I'm a
> >> moron
> >> when it comes to this)
> >>
> >>
> >>
> >>  ///
> >> // Only setup the avi if it's actually a video screen
> >>
> >> if (isVideoScreen && replacement[0] != '\0') {
> >>char *error_msg = NULL;
> >>long xres = 0;
> >>long yres = 0;
> >>float duration = 0.0f;
> >>
> >>movie = new AVIKit( absolute_replacement, false );
> >>if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
> >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening %s:
> >> %s\n", absolute_replacement, error_msg );
> >>delete movie;
> >>break;
> >>}
> >>movie->getVideoInfo( &xres, &yres, &duration );
> >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x %ld
> (%f
> >> secs)\n", replacement, xres, yres, duration );
> >>gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents (%d
> %d
> >> %d)\n",
> >>(int)origin[0], (int)origin[1], (int)origin[2],
> >>(int)extents[0], (int)extents[1], (int)extents[2] );
> >>
> >>// Create the OpenGL texture
> >>GLuint texnum;
> >>glGenTextures( 1, &texnum );
> >>
> >>if (!AddComplexAvi( movie, texnum, origin, angles, extents,
> &error_msg
> >> )) {
> >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding
> movie:
> >> %s\n", error_msg );
> >>delete movie;
> >>}
> >>} else if (isVideoScreen) {
> >>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen
> didn't
> >> have a movie specified!\n" );
> >>}
> >>
> >>//Setting up the texture:
> >>
> >>movie->getVideoInfo( &data->width, &data->height, &data->total_length
> );
> >>glEnable( GL_TEXTURE_2D );
> >>glBindTexture( GL_TEXTURE_2D, data->texture_index );
> >>glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> >>glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0,
> GL_RGB,
> >> GL_UNSIGNED_BYTE, tmpbuffer );
> >>
> >>//Updating the texture each frame:
> >>
> >>// Calculate the frame needed
> >>int frame = i->movie->getVideoFrameNumber( i->current_time );
> >>
> >>// If the frame has changed, re-upload it
> >>if (frame != i->current_frame) {
> >>i->current_frame = frame;
> >>i->movie->getVideoFrame( (char*)i->buffer, frame );
> >>
> >>// If the video isn't a power of two on all sides, we need to
> resize
> >> it... 
> >>if (i->resized_buffer) {
> >>gluScaleImage( GL_RGB, i->realwidth, i->realheight,
> >> GL_UNSIGNED_BYTE, i->buffer, i->width, i->height, GL_UNSIGNED_BYTE,
> >> i->resized_buffer );
> >>// ... and update the OpenGL texture ...
> >>glEnable(GL_TEXTURE_2D);
> >>glBindTexture( GL_TEXTURE_2D, i->texture_index );
> >>glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width, i->height,
> >> GL_RGB, GL_UNSIGNED_BYTE, i->resized_buffer );
> >>} else {
> >>// ... and update the OpenGL texture ...
> >>glEnable(GL_TEXTURE_2D);
> >>glBindTexture( GL_TEXTURE_2D, i->texture_index );
> >>glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width,
>

Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Alexander Hirsch
You can really have both.
Use the preprocessor to have stuff like
#if PLATFORM == WINDOWS
  //Windows-specific code
#elif PLATFORM == POSIX
  //POSIX code
#elif PLATFORM == LOL_OS
  //lol code
#endif

On Thu, Mar 18, 2010 at 7:37 PM, Harry Jeffery
 wrote:
> As Steam + Source engine is moving to mac and possibly/hopefully linux
> in the near future I'd recommend keeping this as cross-platform as
> possible. Advanced Windows 7 features such as the task-bar
> progress-bar aren't that important to be honest.
>
> On 18 March 2010 08:53, Jonas 'Sortie' Termansen  wrote:
>> Thanks Cory for your suggestions, they are quite useful!
>>
>> I have been thinking the UI through and done some concept art in paint. I 
>> realized you never use/need to change most settings in VBCT. Instead I have 
>> been focusing on those that you really do need and designed them to be 
>> useful. None of this is implemented yet but I managed to get the batch 
>> compiling working perfectly yesterday. What I propose is this:
>>
>> - To make things simpler I will make the main screen only contain this: 1) a 
>> dropdown list of all mods in gameconfig.txt for both ep1 and orangebox, 2) a 
>> dropdown list of all .vmf files in mapsrc for the mod, 3) a dropdown list of 
>> all configuration, 4) a big Compile Map button and Cancel Compile, 5) a 
>> progress bar and the option to watch the compile output, and 6) various 
>> buttons to show the user friendly advanced buttons.
>> - Most of the time you just want to compile a single map for instant testing 
>> ingame. So instead of having to browse for a map manually, I will make the 
>> program scan all mapsrc\ folders and make it default to the most recently 
>> saved .vmf file, as this is most likely the one you want to compile.
>> - I will also show all recent .vmf files newer than their .bsp counterpart 
>> under the title "You probably want to compile these:"
>> - The user is also likely to the same compile flags for most compiles. So I 
>> will use configurations such as Debug (HDR only), Release (LDR+HDR), Final 
>> Release (Both -final) and so on. The user will be able to edit this list.
>> - The program will assume all the default values for which mod to use, what 
>> map to compile, and with what configuration. This will allow the mapper a 
>> one click compile in most cases, as well as allowing him to easily change it.
>> - The user will be able to add maps to the compile queue while compiling 
>> other maps and be able to watch the progress for them seperately.
>> - It will be possible to change what tools will be called and add new ones.
>> - And there will be a progress bar showing how the compile comes along in 
>> the Win7 superbar.
>>
>> And more, there are just some of my ideas for the ideal interface, and it 
>> isn't hard to make.
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives, 
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Harry Jeffery
As Steam + Source engine is moving to mac and possibly/hopefully linux
in the near future I'd recommend keeping this as cross-platform as
possible. Advanced Windows 7 features such as the task-bar
progress-bar aren't that important to be honest.

On 18 March 2010 08:53, Jonas 'Sortie' Termansen  wrote:
> Thanks Cory for your suggestions, they are quite useful!
>
> I have been thinking the UI through and done some concept art in paint. I 
> realized you never use/need to change most settings in VBCT. Instead I have 
> been focusing on those that you really do need and designed them to be 
> useful. None of this is implemented yet but I managed to get the batch 
> compiling working perfectly yesterday. What I propose is this:
>
> - To make things simpler I will make the main screen only contain this: 1) a 
> dropdown list of all mods in gameconfig.txt for both ep1 and orangebox, 2) a 
> dropdown list of all .vmf files in mapsrc for the mod, 3) a dropdown list of 
> all configuration, 4) a big Compile Map button and Cancel Compile, 5) a 
> progress bar and the option to watch the compile output, and 6) various 
> buttons to show the user friendly advanced buttons.
> - Most of the time you just want to compile a single map for instant testing 
> ingame. So instead of having to browse for a map manually, I will make the 
> program scan all mapsrc\ folders and make it default to the most recently 
> saved .vmf file, as this is most likely the one you want to compile.
> - I will also show all recent .vmf files newer than their .bsp counterpart 
> under the title "You probably want to compile these:"
> - The user is also likely to the same compile flags for most compiles. So I 
> will use configurations such as Debug (HDR only), Release (LDR+HDR), Final 
> Release (Both -final) and so on. The user will be able to edit this list.
> - The program will assume all the default values for which mod to use, what 
> map to compile, and with what configuration. This will allow the mapper a one 
> click compile in most cases, as well as allowing him to easily change it.
> - The user will be able to add maps to the compile queue while compiling 
> other maps and be able to watch the progress for them seperately.
> - It will be possible to change what tools will be called and add new ones.
> - And there will be a progress bar showing how the compile comes along in the 
> Win7 superbar.
>
> And more, there are just some of my ideas for the ideal interface, and it 
> isn't hard to make.
> ___
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread Jonas 'Sortie' Termansen
I have success implementing the free software ffmpeg library in Source. 
There is nothing like watching a 720p HD xvid on an ingame surface. :D 
It's not very well implemented though and I don't have any sound 
support. I'd gladly share the source code with you. ffmpeg is very fast 
and it provides all the codecs itself and supports most formats VLC do 
(because it is used by VLC).

Rodrigo 'r2d2rigo' Diaz skrev:
> AVIkit was used in a demo MOD from the creator of the library, but AFAIK he
> didn't release the source code. I tried to add it some time ago, but finally
> dropped the idea.
>
> 2010/3/18 kevin bowen 
>
>   
>> Just wondering if anyone has implemented AVIkit and is willing to part with
>> the code :) or if AVIkit has been used in any open source mods (rebirth and
>> arrangemod have the lib's included but don't actually call the functions).
>> I'd do it myself but it would literally take years (I'm a moron), it'd be
>> easier just to ask for it here just incase any devs have a dead hl1 mod
>> with
>> the code already laid out :)
>>
>> I've scoured the internet and all I could find was this on a russian HL
>> coding site which seems to use the code but I'm not sure if it's an entire
>> replacement for avikit.cpp or if it fits in there somehow (again I'm a
>> moron
>> when it comes to this)
>>
>>
>>
>>  ///
>> // Only setup the avi if it's actually a video screen
>>
>> if (isVideoScreen && replacement[0] != '\0') {
>>char *error_msg = NULL;
>>long xres = 0;
>>long yres = 0;
>>float duration = 0.0f;
>>
>>movie = new AVIKit( absolute_replacement, false );
>>if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
>>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening %s:
>> %s\n", absolute_replacement, error_msg );
>>delete movie;
>>break;
>>}
>>movie->getVideoInfo( &xres, &yres, &duration );
>>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x %ld (%f
>> secs)\n", replacement, xres, yres, duration );
>>gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents (%d %d
>> %d)\n",
>>(int)origin[0], (int)origin[1], (int)origin[2],
>>(int)extents[0], (int)extents[1], (int)extents[2] );
>>
>>// Create the OpenGL texture
>>GLuint texnum;
>>glGenTextures( 1, &texnum );
>>
>>if (!AddComplexAvi( movie, texnum, origin, angles, extents, &error_msg
>> )) {
>>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding movie:
>> %s\n", error_msg );
>>delete movie;
>>}
>>} else if (isVideoScreen) {
>>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen didn't
>> have a movie specified!\n" );
>>}
>>
>>//Setting up the texture:
>>
>>movie->getVideoInfo( &data->width, &data->height, &data->total_length );
>>glEnable( GL_TEXTURE_2D );
>>glBindTexture( GL_TEXTURE_2D, data->texture_index );
>>glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
>>glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0, GL_RGB,
>> GL_UNSIGNED_BYTE, tmpbuffer );
>>
>>//Updating the texture each frame:
>>
>>// Calculate the frame needed
>>int frame = i->movie->getVideoFrameNumber( i->current_time );
>>
>>// If the frame has changed, re-upload it
>>if (frame != i->current_frame) {
>>i->current_frame = frame;
>>i->movie->getVideoFrame( (char*)i->buffer, frame );
>>
>>// If the video isn't a power of two on all sides, we need to resize
>> it... 
>>if (i->resized_buffer) {
>>gluScaleImage( GL_RGB, i->realwidth, i->realheight,
>> GL_UNSIGNED_BYTE, i->buffer, i->width, i->height, GL_UNSIGNED_BYTE,
>> i->resized_buffer );
>>// ... and update the OpenGL texture ...
>>glEnable(GL_TEXTURE_2D);
>>glBindTexture( GL_TEXTURE_2D, i->texture_index );
>>glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width, i->height,
>> GL_RGB, GL_UNSIGNED_BYTE, i->resized_buffer );
>>} else {
>>// ... and update the OpenGL texture ...
>>glEnable(GL_TEXTURE_2D);
>>glBindTexture( GL_TEXTURE_2D, i->texture_index );
>>glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width,
>> i->height, GL_RGB, GL_UNSIGNED_BYTE, i->buffer );
>>}
>>}
>>
>>// If this is a complex movie, draw the polygons
>>if (i->texture_type == AVI_TEXTURE_USER) {
>>
>>glEnable( GL_TEXTURE_2D );
>>glBindTexture( GL_TEXTURE_2D, i->texture_index );
>>glDisable( GL_BLEND );
>>glBegin( GL_QUADS );
>>
>>// Top left
>>glColor3f( 1.0f, 1.0f, 1.0f );
>>glTexCoord2f( 0.0f, 1.0f );
>>glVertex3f( i->vertexes[0].x, i->vertexes[0].y, i->vertexes[0].z
>> );
>>
>>// Bottom left
>>glColor3f( 1.0f, 1.0f, 1.0f );
>>glTexCoord2f( 0

Re: [hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread Rodrigo 'r2d2rigo' Diaz
AVIkit was used in a demo MOD from the creator of the library, but AFAIK he
didn't release the source code. I tried to add it some time ago, but finally
dropped the idea.

2010/3/18 kevin bowen 

> Just wondering if anyone has implemented AVIkit and is willing to part with
> the code :) or if AVIkit has been used in any open source mods (rebirth and
> arrangemod have the lib's included but don't actually call the functions).
> I'd do it myself but it would literally take years (I'm a moron), it'd be
> easier just to ask for it here just incase any devs have a dead hl1 mod
> with
> the code already laid out :)
>
> I've scoured the internet and all I could find was this on a russian HL
> coding site which seems to use the code but I'm not sure if it's an entire
> replacement for avikit.cpp or if it fits in there somehow (again I'm a
> moron
> when it comes to this)
>
>
>
>  ///
> // Only setup the avi if it's actually a video screen
>
> if (isVideoScreen && replacement[0] != '\0') {
>char *error_msg = NULL;
>long xres = 0;
>long yres = 0;
>float duration = 0.0f;
>
>movie = new AVIKit( absolute_replacement, false );
>if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening %s:
> %s\n", absolute_replacement, error_msg );
>delete movie;
>break;
>}
>movie->getVideoInfo( &xres, &yres, &duration );
>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x %ld (%f
> secs)\n", replacement, xres, yres, duration );
>gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents (%d %d
> %d)\n",
>(int)origin[0], (int)origin[1], (int)origin[2],
>(int)extents[0], (int)extents[1], (int)extents[2] );
>
>// Create the OpenGL texture
>GLuint texnum;
>glGenTextures( 1, &texnum );
>
>if (!AddComplexAvi( movie, texnum, origin, angles, extents, &error_msg
> )) {
>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding movie:
> %s\n", error_msg );
>delete movie;
>}
>} else if (isVideoScreen) {
>gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen didn't
> have a movie specified!\n" );
>}
>
>//Setting up the texture:
>
>movie->getVideoInfo( &data->width, &data->height, &data->total_length );
>glEnable( GL_TEXTURE_2D );
>glBindTexture( GL_TEXTURE_2D, data->texture_index );
>glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
>glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0, GL_RGB,
> GL_UNSIGNED_BYTE, tmpbuffer );
>
>//Updating the texture each frame:
>
>// Calculate the frame needed
>int frame = i->movie->getVideoFrameNumber( i->current_time );
>
>// If the frame has changed, re-upload it
>if (frame != i->current_frame) {
>i->current_frame = frame;
>i->movie->getVideoFrame( (char*)i->buffer, frame );
>
>// If the video isn't a power of two on all sides, we need to resize
> it... 
>if (i->resized_buffer) {
>gluScaleImage( GL_RGB, i->realwidth, i->realheight,
> GL_UNSIGNED_BYTE, i->buffer, i->width, i->height, GL_UNSIGNED_BYTE,
> i->resized_buffer );
>// ... and update the OpenGL texture ...
>glEnable(GL_TEXTURE_2D);
>glBindTexture( GL_TEXTURE_2D, i->texture_index );
>glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width, i->height,
> GL_RGB, GL_UNSIGNED_BYTE, i->resized_buffer );
>} else {
>// ... and update the OpenGL texture ...
>glEnable(GL_TEXTURE_2D);
>glBindTexture( GL_TEXTURE_2D, i->texture_index );
>glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width,
> i->height, GL_RGB, GL_UNSIGNED_BYTE, i->buffer );
>}
>}
>
>// If this is a complex movie, draw the polygons
>if (i->texture_type == AVI_TEXTURE_USER) {
>
>glEnable( GL_TEXTURE_2D );
>glBindTexture( GL_TEXTURE_2D, i->texture_index );
>glDisable( GL_BLEND );
>glBegin( GL_QUADS );
>
>// Top left
>glColor3f( 1.0f, 1.0f, 1.0f );
>glTexCoord2f( 0.0f, 1.0f );
>glVertex3f( i->vertexes[0].x, i->vertexes[0].y, i->vertexes[0].z
> );
>
>// Bottom left
>glColor3f( 1.0f, 1.0f, 1.0f );
>glTexCoord2f( 0.0f, 0.0f );
>glVertex3f( i->vertexes[1].x, i->vertexes[1].y, i->vertexes[1].z
> );
>
>// Bottom right
>glColor3f( 1.0f, 1.0f, 1.0f );
>glTexCoord2f( 1.0f, 0.0f );
>glVertex3f( i->vertexes[2].x, i->vertexes[2].y, i->vertexes[2].z
> );
>
>// Top right
>glColor3f( 1.0f, 1.0f, 1.0f );
>glTexCoord2f( 1.0f, 1.0f );
>glVertex3f( i->vertexes[3].x, i->vertexes[3].y, i->vertexes[3].z
> );
>
>glEnd();
>}
>  //

[hlcoders] [GoldSrc] AviKit in any mods?

2010-03-18 Thread kevin bowen
Just wondering if anyone has implemented AVIkit and is willing to part with
the code :) or if AVIkit has been used in any open source mods (rebirth and
arrangemod have the lib's included but don't actually call the functions).
I'd do it myself but it would literally take years (I'm a moron), it'd be
easier just to ask for it here just incase any devs have a dead hl1 mod with
the code already laid out :)

I've scoured the internet and all I could find was this on a russian HL
coding site which seems to use the code but I'm not sure if it's an entire
replacement for avikit.cpp or if it fits in there somehow (again I'm a moron
when it comes to this)



 ///
// Only setup the avi if it's actually a video screen

if (isVideoScreen && replacement[0] != '\0') {
char *error_msg = NULL;
long xres = 0;
long yres = 0;
float duration = 0.0f;

movie = new AVIKit( absolute_replacement, false );
if (movie->getError( &error_msg ) != AVIKIT_NOERROR) {
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error opening %s:
%s\n", absolute_replacement, error_msg );
delete movie;
break;
}
movie->getVideoInfo( &xres, &yres, &duration );
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Opened %s: %ld x %ld (%f
secs)\n", replacement, xres, yres, duration );
gEngfuncs.Con_DPrintf( "Video screen at (%d %d %d), with extents (%d %d
%d)\n",
(int)origin[0], (int)origin[1], (int)origin[2],
(int)extents[0], (int)extents[1], (int)extents[2] );

// Create the OpenGL texture
GLuint texnum;
glGenTextures( 1, &texnum );

if (!AddComplexAvi( movie, texnum, origin, angles, extents, &error_msg
)) {
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Error adding movie:
%s\n", error_msg );
delete movie;
}
} else if (isVideoScreen) {
gEngfuncs.Con_DPrintf( "SetupAvisFromEntities: Video screen didn't
have a movie specified!\n" );
}

//Setting up the texture:

movie->getVideoInfo( &data->width, &data->height, &data->total_length );
glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, data->texture_index );
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D( GL_TEXTURE_2D, 0, 3, data->width, data->height, 0, GL_RGB,
GL_UNSIGNED_BYTE, tmpbuffer );

//Updating the texture each frame:

// Calculate the frame needed
int frame = i->movie->getVideoFrameNumber( i->current_time );

// If the frame has changed, re-upload it
if (frame != i->current_frame) {
i->current_frame = frame;
i->movie->getVideoFrame( (char*)i->buffer, frame );

// If the video isn't a power of two on all sides, we need to resize
it... 
if (i->resized_buffer) {
gluScaleImage( GL_RGB, i->realwidth, i->realheight,
GL_UNSIGNED_BYTE, i->buffer, i->width, i->height, GL_UNSIGNED_BYTE,
i->resized_buffer );
// ... and update the OpenGL texture ...
glEnable(GL_TEXTURE_2D);
glBindTexture( GL_TEXTURE_2D, i->texture_index );
glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width, i->height,
GL_RGB, GL_UNSIGNED_BYTE, i->resized_buffer );
} else {
// ... and update the OpenGL texture ...
glEnable(GL_TEXTURE_2D);
glBindTexture( GL_TEXTURE_2D, i->texture_index );
glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, i->width,
i->height, GL_RGB, GL_UNSIGNED_BYTE, i->buffer );
}
}

// If this is a complex movie, draw the polygons
if (i->texture_type == AVI_TEXTURE_USER) {

glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, i->texture_index );
glDisable( GL_BLEND );
glBegin( GL_QUADS );

// Top left
glColor3f( 1.0f, 1.0f, 1.0f );
glTexCoord2f( 0.0f, 1.0f );
glVertex3f( i->vertexes[0].x, i->vertexes[0].y, i->vertexes[0].z
);

// Bottom left
glColor3f( 1.0f, 1.0f, 1.0f );
glTexCoord2f( 0.0f, 0.0f );
glVertex3f( i->vertexes[1].x, i->vertexes[1].y, i->vertexes[1].z
);

// Bottom right
glColor3f( 1.0f, 1.0f, 1.0f );
glTexCoord2f( 1.0f, 0.0f );
glVertex3f( i->vertexes[2].x, i->vertexes[2].y, i->vertexes[2].z
);

// Top right
glColor3f( 1.0f, 1.0f, 1.0f );
glTexCoord2f( 1.0f, 1.0f );
glVertex3f( i->vertexes[3].x, i->vertexes[3].y, i->vertexes[3].z
);

glEnd();
}
 ///


Regardless of this, the AVIkit mod also included fmod.dll, which I'm
guessing is used for sound and I'm not sure how it pulls this from the AVI.

Kevin
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valveso

Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Jonas 'Sortie' Termansen
Thanks Cory for your suggestions, they are quite useful!

I have been thinking the UI through and done some concept art in paint. I 
realized you never use/need to change most settings in VBCT. Instead I have 
been focusing on those that you really do need and designed them to be useful. 
None of this is implemented yet but I managed to get the batch compiling 
working perfectly yesterday. What I propose is this:

- To make things simpler I will make the main screen only contain this: 1) a 
dropdown list of all mods in gameconfig.txt for both ep1 and orangebox, 2) a 
dropdown list of all .vmf files in mapsrc for the mod, 3) a dropdown list of 
all configuration, 4) a big Compile Map button and Cancel Compile, 5) a 
progress bar and the option to watch the compile output, and 6) various buttons 
to show the user friendly advanced buttons. 
- Most of the time you just want to compile a single map for instant testing 
ingame. So instead of having to browse for a map manually, I will make the 
program scan all mapsrc\ folders and make it default to the most recently saved 
.vmf file, as this is most likely the one you want to compile.
- I will also show all recent .vmf files newer than their .bsp counterpart 
under the title "You probably want to compile these:"
- The user is also likely to the same compile flags for most compiles. So I 
will use configurations such as Debug (HDR only), Release (LDR+HDR), Final 
Release (Both -final) and so on. The user will be able to edit this list.
- The program will assume all the default values for which mod to use, what map 
to compile, and with what configuration. This will allow the mapper a one click 
compile in most cases, as well as allowing him to easily change it.
- The user will be able to add maps to the compile queue while compiling other 
maps and be able to watch the progress for them seperately.
- It will be possible to change what tools will be called and add new ones.
- And there will be a progress bar showing how the compile comes along in the 
Win7 superbar.

And more, there are just some of my ideas for the ideal interface, and it isn't 
hard to make.
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make free software alternative to VBCT

2010-03-18 Thread Jonas 'Sortie' Termansen
> GPL is far too restrictive. Use LGPL or BSD3.

The LGPL is just the GPL with the right to link to the object file. Do you 
intend to link to my program? Otherwise it wouldn't matter as the Maxsi Engine 
library I use and develop is under the GNU LGPLv3. I am open to release it 
under the GNU LGPLv3 if you can find a good reason to (if you want to use it 
for your own tools, you should make your own software free sofware! This is for 
the greater good of the community) BSD is out of the question as a strong 
copyleft is required for my software; I do not want propertiary spin-offs.
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Zach Kanzler
Far too restrictive of what? It's a standalone tool, neh?

Regards,
Zach "theY4Kman" Kanzler


On Thu, Mar 18, 2010 at 04:50, Marek Sieradzki wrote:

> >> >> My vision is to create an user-friendly general purpose batch compile
> >> >> tool for Source Mods. It should be written in pure C++ and licensed
> >> >> under a free software license such as the GNU GPL. It should be
> >> >> developed in union with the modding community.
>
> GPL is far too restrictive. Use LGPL or BSD3.
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] I intend to make a free software alternative to VBCT

2010-03-18 Thread Marek Sieradzki
>> >> My vision is to create an user-friendly general purpose batch compile
>> >> tool for Source Mods. It should be written in pure C++ and licensed
>> >> under a free software license such as the GNU GPL. It should be
>> >> developed in union with the modding community.

GPL is far too restrictive. Use LGPL or BSD3.

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders