Показать все 14 сообщений этой темы на одной странице |
HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- BSP in Background. (https://hlfx.ru/forum/showthread.php?threadid=2640)
BSP in Background.
Hi there fellas
I was recently checking new mod updates in moddb and i found something very super mega ultra cool interesting, which can be very very usefull for everyone who want to make such thing (look this thread name) in his modification.
http://www.moddb.com/mods/cry-of-fe...w-menu#imagebox
This is such awesome that it can't just be 'bypassed' by half-life modding community.
Well i think it works like this :
Check when client is beign initialized. Render map, entities and everything which should be rendered on our background map, run your own precoded VGUI menu.
But do anyone have idea or clues how to "give" it life ?
Cheers.
__________________
настоящий мужчина не нуждается в подписи.
I think this is actually a loaded map with custom menu code. I don't know what the hell is "awesome" here and I prefer static menus - they are robust and load quickly.
__________________
The awesomness is that we can create source stuff in goldsource and this is more fun than creating goldsource stuff in source
__________________
настоящий мужчина не нуждается в подписи.
The most fun is to create goldsource stuff in goldsource and source stuff in source. Crutches are never funny.
__________________
Well i started to code this stuff, i already have map load on start by using engfuncs command but here i have problem with chapter files :
code:
string BSPBackground::LoadBackgroundFile( void ) { level_id = 1; const char* szGameDir = gEngfuncs.pfnGetGameDirectory(); ifstream infile("%s/scripts/background0%s.txt", szGameDir, level_id); if (!infile) { gEngfuncs.Con_Printf( "Cannot find background0%s.txt . Game will load default background file.", level_id); } else { gEngfuncs.Con_Printf( "The file background0%s.txt found ! Game will load specified background file.", level_id); string line; infile >> line; infile.close(); return line; } } and i got this stupid error
code:
Compiling... cdll_int.cpp C:\HLSDK\Single-Player Source\cl_dll\cdll_int.cpp(318) : error C2661: 'basic_ifstream<char,struct std::char_traits<char> >::basic_ifstream<char,struct std::char_traits<char> >' : no overloaded function takes 3 parameters Error executing cl.exe.
__________________
настоящий мужчина не нуждается в подписи.
What is 'level_id' ?
__________________
My Projects: download page
F.A.Q по XashNT
Блог разработчика в телеграме
C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'
supra36, Why, you are using ifstream?
You have a very strange code that uses the function engine.
1 | char *BSPBackground::LoadBackgroundFile( void ) |
2 | { |
3 | level_id = 1; |
4 |
5 | char szChapterConfig[MAX_PATH]; |
6 | sprintf( "scripts/background0%d.txt", level_id ); |
7 |
8 | char *pChapterFile = (char*)gEngfuncs.COM_LoadFile( sz, 5, NULL ); |
9 |
10 | if(!pChapterFile) |
11 | { |
12 | gEngfuncs.Con_Printf( "Cannot find %s . Game will load default background file.\n", szChapterConfig ); |
13 |
14 | return 0; |
15 | } |
16 |
17 | gEngfuncs.Con_Printf( "The file %s found !\n Game will load specified background file.\n", szChapterConfig ); |
18 |
19 | gEngfuncs.COM_FreeFile( pChapterFile ); |
20 |
21 | return pChapterFile; |
22 | } |
23 |
__________________
Вся сила лысого кощея,
Сокрыта в башне из костей
Воздвигнутой, под небесами
На месте похорон людей
__________________
У котёнка мокрый нос и гладенькая шерсть, у него забавный хвост и быстрых лапок шесть. Две задних, две средних и две передних лапы, такая многоножка получилася у папы.
Он ученый — папа мой — зверушек изучает, гуляет по помойкам, ловит крыс и чаек. Две крысы белокрылые и чайки две унылые покрытые пупырчатою кожей лягушат без пёрышек тоскуют и ускакать спешат.
А ещё есть муравей большой размером с гуся он пугает всех зверей, и я его боюся, когда он ковыляет на лапках на своих.
И в двери ударяет, и начинает стих: Я — муравей, воды налей! Не меньше ведра, напиться мне пора!
@up : Yeah, btw the code you have is old, first try xD Whatever, it was first time when im working with fstream, i spent lot of time on chaning gameplay, not really on codding features like that.
Well level_id represents actual background.
If level_id will be 5 then game will load background5.txt.
__________________
настоящий мужчина не нуждается в подписи.
supra36 forget about io streams, STL an so on. It is the work of the devil.
__________________
Re: BSP in Background.
I have no idea why I'm complicating my life, on maths lessons I do not make fractions shorter, I was always making stuff in a harder way. Well, maybe harder way = win sometimes ?
I will check out if you hav any screenshot of your work, and I'm making menu concept already.
By the way i cannot decide about something, there is a model renderer by DJShark23Prog but I'm afraid that if i will use paranoia's renderer in my modification i won't be able to use new model renderer which supports up to 48,000 polys and i wanted to make facial animations for mod characters.
@edit : Hell no, you do not have any screenshot's , can you show us an example or this is TOP SECRET ?
__________________
настоящий мужчина не нуждается в подписи.
Well i had inside-out bug but it was because i made wrong defines values, like #define STUDIO_NF_UNLIT or #define STUDIO_NF_ALPHA ect. After i set them on 0 it worked one time but i changed sth (idk what exactly) and i have ugly bug now
__________________
настоящий мужчина не нуждается в подписи.
Временная зона GMT. Текущее время 03:51. | Показать все 14 сообщений этой темы на одной странице |
На основе vBulletin версии 2.3.0
Авторское право © Jelsoft Enterprises Limited 2000 - 2002.
Дизайн и программирование: Crystice Softworks © 2005 - 2024