Added FPS/UnrealEd-style right-mouse camera navigation to the camera view, with configurable movement keys, mouse look, modifier movement, Caps Lock speed scaling, and mouse-wheel zoom.
Added camera-view helper tools from the list, including reticle drawing, quick select during nav mode, teleport-to-looked-at-object, target lock/orbit mode, and entity/material info display. Added nav-mode texture adjustment controls for position, scale, and rotation, and fixed the existing Alt texture-drag condition so Alt+Shift and Alt+Ctrl can actually trigger scale/rotate behavior. Added widescreen support. Changed up the menus and UI for build.
BIN
base/guis/assets/mainmenu/1.tga
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
base/guis/assets/mainmenu/2.tga
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
base/guis/assets/mainmenu/3.tga
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
base/guis/assets/mainmenu/4.tga
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
base/guis/assets/mainmenu/5.tga
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
base/guis/assets/mainmenu/bg.tga
Normal file
|
After Width: | Height: | Size: 2.6 MiB |
BIN
base/guis/assets/splash/launch.tga
Normal file
|
After Width: | Height: | Size: 2.6 MiB |
11
base/guis/loadscreenbeta.gui
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
windowDef Desktop {
|
||||
rect 0, 0, 1280, 720
|
||||
backcolor 0, 0, 0, 1
|
||||
|
||||
windowDef Background {
|
||||
rect 0, 0, 1280, 720
|
||||
background "guis/assets/splash/launch"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 1
|
||||
}
|
||||
}
|
||||
441
base/guis/mainmenu.gui
Normal file
|
|
@ -0,0 +1,441 @@
|
|||
windowDef Desktop {
|
||||
rect 0, 0, 1280, 720
|
||||
backcolor 0, 0, 0, 1
|
||||
float Button "0"
|
||||
float Menugui "1"
|
||||
|
||||
onESC {
|
||||
set "cmd" "close" ;
|
||||
}
|
||||
|
||||
|
||||
windowDef Background {
|
||||
rect 0, 0, 1280, 720
|
||||
background "guis/assets/mainmenu/bg"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
windowDef Doom {
|
||||
rect 162, 0, 972, 426
|
||||
background "guis/assets/schema/doom"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
windowDef DoomGlow {
|
||||
rect 162, 0, 972, 426
|
||||
background "doomglow"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
windowDef Button1o {
|
||||
rect 380, 405, 512, 48
|
||||
background "menu/button1"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
windowDef Button2o {
|
||||
rect 380, 465, 512, 48
|
||||
background "menu/button2"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
windowDef Button3o {
|
||||
rect 500, 525, 278, 48
|
||||
background "menu/button3"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
windowDef Button4o {
|
||||
rect 506, 585, 256, 48
|
||||
background "menu/button4"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
windowDef Button5o {
|
||||
rect 506, 645, 256, 48
|
||||
background "menu/button5"
|
||||
matcolor 1 ,1, 1, 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
windowDef PopUp {
|
||||
rect 354, 660, 572, 60
|
||||
background "guis/assets/mainmenu/callout"
|
||||
matcolor 1 ,1, 1, 0
|
||||
visible 1
|
||||
}
|
||||
|
||||
windowDef Button1 {
|
||||
rect 380, 405, 512, 48
|
||||
background "guis/assets/mainmenu/1"
|
||||
matcolor 1 ,1, 1, 0.9
|
||||
visible 1
|
||||
|
||||
onMouseEnter {
|
||||
set "Button1o::visible" "1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "Button1o::visible" "0" ;
|
||||
}
|
||||
onAction {
|
||||
set "cmd" "play guisounds_click" ;
|
||||
set "Desktop::Button" "1" ;
|
||||
resetTime "Anim" "0" ;
|
||||
resetTime "Click1" "0" ;
|
||||
set "Button1o::visible" "0" ;
|
||||
transition "Button2::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button3::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button4::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button5::matcolor" "1 1 1 0.9" "1 1 1 0" "200" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Button2 {
|
||||
rect 380, 465, 512, 48
|
||||
background "guis/assets/mainmenu/2"
|
||||
matcolor 1 ,1, 1, 0.4
|
||||
visible 1
|
||||
/*
|
||||
onMouseEnter {
|
||||
set "Button2o::visible" "1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "Button2o::visible" "0" ;
|
||||
}
|
||||
onAction {
|
||||
set "Desktop::Button" "2" ;
|
||||
resetTime "Anim" "0" ;
|
||||
set "Button2o::visible" "0" ;
|
||||
transition "Button1::matcolor" "1 1 1 0.9" "1 1 1 0" "200" ;
|
||||
transition "Button3::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button4::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button5::matcolor" "1 1 1 0.9" "1 1 1 0" "200" ;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
windowDef Button3 {
|
||||
rect 500, 525, 278, 48
|
||||
background "guis/assets/mainmenu/3"
|
||||
matcolor 1 ,1, 1, 0.4
|
||||
visible 1
|
||||
}
|
||||
|
||||
windowDef Button4 {
|
||||
rect 506, 585, 256, 48
|
||||
background "guis/assets/mainmenu/4"
|
||||
matcolor 1 ,1, 1, 0.4
|
||||
visible 1
|
||||
}
|
||||
|
||||
windowDef Button5 {
|
||||
rect 506, 645, 256, 48
|
||||
background "guis/assets/mainmenu/5"
|
||||
matcolor 1 ,1, 1, 0.9
|
||||
visible 1
|
||||
|
||||
onMouseEnter {
|
||||
set "Button5o::visible" "1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "Button5o::visible" "0" ;
|
||||
}
|
||||
onAction {
|
||||
set "cmd" "play guisounds_click" ;
|
||||
set "Desktop::Button" "5" ;
|
||||
resetTime "Anim" "0" ;
|
||||
resetTime "Click5" "0" ;
|
||||
set "Button5o::visible" "0" ;
|
||||
transition "Button1::matcolor" "1 1 1 0.9" "1 1 1 0" "200" ;
|
||||
transition "Button2::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button3::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
transition "Button4::matcolor" "1 1 1 0.4" "1 1 1 0" "200" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Text1a {
|
||||
rect 354, 426, -572, 60
|
||||
text "New Game"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
noevents 1
|
||||
|
||||
onMouseEnter {
|
||||
set "forecolor" "1 0.4 0 1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "forecolor" "1 0.1 0.1 1" ;
|
||||
}
|
||||
onAction {
|
||||
set "cmd" "play guisounds_click" ;
|
||||
set "cmd" "startgame" ;
|
||||
resetTime "Main1" "0" ;
|
||||
}
|
||||
}
|
||||
windowDef Text1b {
|
||||
rect 354, 471, -572, 60
|
||||
text "Load Game"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
}
|
||||
windowDef Text1c {
|
||||
rect 354, 516, -572, 60
|
||||
text "Cinematics"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
}
|
||||
windowDef Text1d {
|
||||
rect 354, 561, -572, 60
|
||||
text "Demos"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
}
|
||||
windowDef Text1e {
|
||||
rect 354, 606, -572, 60
|
||||
text "Main Menu"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
noevents 1
|
||||
|
||||
onMouseEnter {
|
||||
set "forecolor" "1 0.4 0 1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "forecolor" "1 0.1 0.1 1" ;
|
||||
}
|
||||
onAction {
|
||||
set "cmd" "play guisounds_close" ;
|
||||
resetTime "Main1" "0" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Text5a {
|
||||
rect 352, 450, -572, 120
|
||||
text "Are you sure you\nwant to exit?"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
}
|
||||
|
||||
windowDef Text5b {
|
||||
rect 420, 577.5, -200, 120
|
||||
text "Yes"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
noevents 1
|
||||
|
||||
onMouseEnter {
|
||||
set "forecolor" "1 0.4 0 1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "forecolor" "1 0.1 0.1 1" ;
|
||||
}
|
||||
onAction {
|
||||
set "cmd" "play guisounds_click" ;
|
||||
set "cmd" "quit" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Text5c {
|
||||
rect 660, 577.5, -200, 120
|
||||
text "No"
|
||||
font "fonts/chain"
|
||||
textscale 0.75
|
||||
textalign 1
|
||||
forecolor 1, 0.1, 0.1, 0
|
||||
noevents 1
|
||||
|
||||
onMouseEnter {
|
||||
set "forecolor" "1 0.4 0 1" ;
|
||||
}
|
||||
onMouseExit {
|
||||
set "forecolor" "1 0.1 0.1 1" ;
|
||||
}
|
||||
onAction {
|
||||
set "cmd" "play guisounds_close" ;
|
||||
resetTime "Main5" "0" ;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
//Animation
|
||||
/////////////////////////
|
||||
|
||||
windowDef Anim {
|
||||
notime 1
|
||||
|
||||
onTime 0 {
|
||||
set "Button1::noevents" "1" ;
|
||||
set "Button2::noevents" "1" ;
|
||||
set "Button3::noevents" "1" ;
|
||||
set "Button4::noevents" "1" ;
|
||||
set "Button5::noevents" "1" ;
|
||||
transition "Button1::rect" "380 405 512 48" "380 675 512 48" "200" ;
|
||||
transition "Button2::rect" "380 465 512 48" "380 675 512 48" "200" ;
|
||||
transition "Button3::rect" "500 525 278 48" "500 675 278 48" "200" ;
|
||||
transition "Button4::rect" "506 585 256 48" "506 675 256 48" "200" ;
|
||||
transition "Button5::rect" "506 645 256 48" "506 675 256 48" "200" ;
|
||||
}
|
||||
onTime 0 {
|
||||
transition "PopUp::matcolor" "1 1 1 0" "1 1 1 1" "100" ;
|
||||
transition "PopUp::rect" "354 660 572 60" "354 406.5 572 313.5" "200" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Click1 {
|
||||
notime 1
|
||||
|
||||
onTime 200 {
|
||||
set "Text1a::rect" "354 426 572 60" ;
|
||||
set "Text1a::noevents" "0" ;
|
||||
transition "Text1a::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 1" "50" ;
|
||||
}
|
||||
onTime 250 {
|
||||
set "Text1b::rect" "354 471 572 60" ;
|
||||
transition "Text1b::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 0.5" "50" ;
|
||||
}
|
||||
onTime 300 {
|
||||
set "Text1c::rect" "354 516 572 60" ;
|
||||
transition "Text1c::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 0.5" "50" ;
|
||||
}
|
||||
onTime 350 {
|
||||
set "Text1d::rect" "354 561 572 60" ;
|
||||
transition "Text1d::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 0.5" "50" ;
|
||||
}
|
||||
onTime 400 {
|
||||
set "Text1e::rect" "354 606 572 60" ;
|
||||
set "Text1e::noevents" "0" ;
|
||||
transition "Text1e::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 1" "50" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Main1 {
|
||||
notime 1
|
||||
|
||||
onTime 0 {
|
||||
set "Text1a::noevents" "1" ;
|
||||
set "Text1e::noevents" "1" ;
|
||||
transition "Text1a::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
transition "Text1b::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
transition "Text1c::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
transition "Text1d::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
transition "Text1e::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
}
|
||||
onTime 0 {
|
||||
transition "Button1::rect" "380 675 512 48" "380 405 512 48" "300" ;
|
||||
transition "Button2::rect" "380 675 512 48" "380 465 512 48" "300" ;
|
||||
transition "Button3::rect" "500 675 278 48" "500 525 278 48" "300" ;
|
||||
transition "Button4::rect" "506 675 256 48" "506 585 256 48" "300" ;
|
||||
transition "Button5::rect" "506 675 256 48" "506 645 256 48" "300" ;
|
||||
transition "PopUp::matcolor" "1 1 1 1" "1 1 1 0" "100" ;
|
||||
transition "PopUp::rect" "354 406.5 572 313.5" "354 660 572 60" "200" ;
|
||||
}
|
||||
onTime 50 {
|
||||
set "Text1a::rect" "354 426 -572 60" ;
|
||||
set "Text1b::rect" "354 471 -572 60" ;
|
||||
set "Text1c::rect" "354 516 -572 60" ;
|
||||
set "Text1d::rect" "354 561 -572 60" ;
|
||||
set "Text1e::rect" "354 606 -572 60" ;
|
||||
transition "Button2::matcolor" "1 1 1 0" "1 1 1 0.4" "100" ;
|
||||
}
|
||||
onTime 125 {
|
||||
transition "Button3::matcolor" "1 1 1 0" "1 1 1 0.4" "100" ;
|
||||
}
|
||||
onTime 200 {
|
||||
transition "Button4::matcolor" "1 1 1 0" "1 1 1 0.4" "100" ;
|
||||
}
|
||||
onTime 275 {
|
||||
transition "Button5::matcolor" "1 1 1 0" "1 1 1 0.9" "100" ;
|
||||
}
|
||||
onTime 300 {
|
||||
set "Button1::noevents" "0" ;
|
||||
set "Button2::noevents" "0" ;
|
||||
set "Button3::noevents" "0" ;
|
||||
set "Button4::noevents" "0" ;
|
||||
set "Button5::noevents" "0" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Click5 {
|
||||
notime 1
|
||||
|
||||
onTime 200 {
|
||||
set "Text5a::rect" "352 450 572 120" ;
|
||||
transition "Text5a::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 1" "50" ;
|
||||
}
|
||||
onTime 250 {
|
||||
set "Text5b::rect" "420 577.5 200 120" ;
|
||||
set "Text5b::noevents" "0" ;
|
||||
transition "Text5b::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 1" "50" ;
|
||||
}
|
||||
onTime 300 {
|
||||
set "Text5c::rect" "660 577.5 200 120" ;
|
||||
set "Text5c::noevents" "0" ;
|
||||
transition "Text5c::forecolor" "1 0.1 0.1 0" "1 0.1 0.1 1" "50" ;
|
||||
}
|
||||
}
|
||||
|
||||
windowDef Main5 {
|
||||
notime 1
|
||||
|
||||
onTime 0 {
|
||||
set "Text5b::noevents" "1" ;
|
||||
set "Text5c::noevents" "1" ;
|
||||
transition "Text5a::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
transition "Text5b::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
transition "Text5c::forecolor" "1 0.1 0.1 1" "1 0.1 0.1 0" "50" ;
|
||||
}
|
||||
onTime 0 {
|
||||
transition "Button1::rect" "380 675 512 48" "380 405 512 48" "300" ;
|
||||
transition "Button2::rect" "380 675 512 48" "380 465 512 48" "300" ;
|
||||
transition "Button3::rect" "500 675 278 48" "500 525 278 48" "300" ;
|
||||
transition "Button4::rect" "506 675 256 48" "506 585 256 48" "300" ;
|
||||
transition "Button5::rect" "506 675 256 48" "506 645 256 48" "300" ;
|
||||
transition "PopUp::matcolor" "1 1 1 1" "1 1 1 0" "100" ;
|
||||
transition "PopUp::rect" "354 406.5 572 313.5" "354 660 572 60" "200" ;
|
||||
}
|
||||
onTime 50 {
|
||||
set "Text5a::rect" "352 450 -572 120" ;
|
||||
set "Text5b::rect" "420 577.5 -200 120" ;
|
||||
set "Text5c::rect" "660 577.5 -200 120" ;
|
||||
transition "Button1::matcolor" "1 1 1 0" "1 1 1 0.9" "100" ;
|
||||
}
|
||||
onTime 125 {
|
||||
transition "Button2::matcolor" "1 1 1 0" "1 1 1 0.4" "100" ;
|
||||
}
|
||||
onTime 200 {
|
||||
transition "Button3::matcolor" "1 1 1 0" "1 1 1 0.4" "100" ;
|
||||
}
|
||||
onTime 275 {
|
||||
transition "Button4::matcolor" "1 1 1 0" "1 1 1 0.4" "100" ;
|
||||
}
|
||||
onTime 300 {
|
||||
set "Button1::noevents" "0" ;
|
||||
set "Button2::noevents" "0" ;
|
||||
set "Button3::noevents" "0" ;
|
||||
set "Button4::noevents" "0" ;
|
||||
set "Button5::noevents" "0" ;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommand>D:\projects\Doom3\Doom3.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>+set r_fullscreen 0 +set r_mode 6</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>+set r_fullscreen 0 +set r_mode 1</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>D:\projects\Doom3</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerCommandArgumentsHistory>+set r_fullscreen 1 +set r_mode 6|+set r_fullscreen 0 +set r_mode 6|</LocalDebuggerCommandArgumentsHistory>
|
||||
<LocalDebuggerCommandArgumentsHistory>+set r_fullscreen 0 +set r_mode 6|+set r_fullscreen 1 +set r_mode 6|+set r_fullscreen 1 +set r_mode 1|+set r_fullscreen 0 +set r_mode 1|</LocalDebuggerCommandArgumentsHistory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|x64'">
|
||||
<LocalDebuggerCommand>D:\projects\Doom3\Doom3.exe</LocalDebuggerCommand>
|
||||
|
|
|
|||
|
|
@ -2430,7 +2430,7 @@ void idCommonLocal::PrintLoadingMessage( const char *msg ) {
|
|||
renderSystem->BeginFrame( renderSystem->GetScreenWidth(), renderSystem->GetScreenHeight() );
|
||||
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, declManager->FindMaterial( "splashScreen" ) );
|
||||
int len = strlen( msg );
|
||||
renderSystem->DrawSmallStringExt( ( 640 - len * SMALLCHAR_WIDTH ) / 2, 410, msg, idVec4( 0.0f, 0.81f, 0.94f, 1.0f ), true, declManager->FindMaterial( "textures/bigchars" ) );
|
||||
// renderSystem->DrawSmallStringExt( ( SCREEN_WIDTH - len * SMALLCHAR_WIDTH ) / 2, SCREEN_HEIGHT - 70, msg, idVec4( 0.0f, 0.81f, 0.94f, 1.0f ), true, declManager->FindMaterial( "textures/bigchars" ) );
|
||||
renderSystem->EndFrame( NULL, NULL );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ float SCR_DrawFPS( float y ) {
|
|||
s = va( "%ifps", fps );
|
||||
w = strlen( s ) * BIGCHAR_WIDTH;
|
||||
|
||||
renderSystem->DrawBigStringExt( 635 - w, idMath::FtoiFast( y ) + 2, s, colorWhite, true, localConsole.charSetShader);
|
||||
renderSystem->DrawBigStringExt( (SCREEN_WIDTH - 5.0f) - w, idMath::FtoiFast(y) + 2, s, colorWhite, true, localConsole.charSetShader);
|
||||
}
|
||||
|
||||
return y + BIGCHAR_HEIGHT + 4;
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ void idSessionLocal::StartWipe( const char *_wipeMaterial, bool hold ) {
|
|||
console->Close();
|
||||
|
||||
// render the current screen into a texture for the wipe model
|
||||
renderSystem->CropRenderSize( 640, 480, true );
|
||||
renderSystem->CropRenderSize( SCREEN_WIDTH, SCREEN_HEIGHT, true );
|
||||
|
||||
Draw();
|
||||
|
||||
|
|
@ -2230,7 +2230,7 @@ void idSessionLocal::DrawWipeModel() {
|
|||
|
||||
float fade = ( float )( latchedTic - wipeStartTic ) / ( wipeStopTic - wipeStartTic );
|
||||
renderSystem->SetColor4( 1, 1, 1, fade );
|
||||
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, wipeMaterial );
|
||||
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, wipeMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2383,7 +2383,7 @@ void idSessionLocal::Draw() {
|
|||
// clear the background, in case the tested gui is transparent
|
||||
// NOTE that you can't use this for aviGame recording, it will tick at real com_frameTime between screenshots..
|
||||
renderSystem->SetColor( colorBlack );
|
||||
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
|
||||
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
|
||||
guiTest->Redraw( com_frameTime );
|
||||
} else if ( guiActive && !guiActive->State().GetBool( "gameDraw" ) ) {
|
||||
|
||||
|
|
@ -2413,7 +2413,7 @@ void idSessionLocal::Draw() {
|
|||
}
|
||||
if ( !gameDraw ) {
|
||||
renderSystem->SetColor( colorBlack );
|
||||
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
|
||||
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
|
||||
}
|
||||
|
||||
// save off the 2D drawing from the game
|
||||
|
|
|
|||
|
|
@ -2399,18 +2399,12 @@ void idGameLocal::CalcFov( float base_fov, float &fov_x, float &fov_y ) const {
|
|||
switch( r_aspectRatio.GetInteger() ) {
|
||||
default :
|
||||
case 0 :
|
||||
// 4:3
|
||||
fov_x = base_fov;
|
||||
return;
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
// 16:9
|
||||
ratio_x = 16.0f;
|
||||
ratio_y = 9.0f;
|
||||
break;
|
||||
|
||||
case 2 :
|
||||
case 1 :
|
||||
// 16:10
|
||||
ratio_x = 16.0f;
|
||||
ratio_y = 10.0f;
|
||||
|
|
@ -4364,5 +4358,7 @@ void idGameLocal::SwitchTeam( int clientNum, int team ) {
|
|||
idGameLocal::GetMapLoadingGUI
|
||||
===============
|
||||
*/
|
||||
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { }
|
||||
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) {
|
||||
sprintf(gui, "guis/loadscreenbeta.gui");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
|
|||
|
||||
if ( armorPulse > 0.0f && armorPulse < 1.0f ) {
|
||||
renderSystem->SetColor4( 1, 1, 1, 1.0 - armorPulse );
|
||||
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, armorMaterial );
|
||||
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, armorMaterial );
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -500,7 +500,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
|
|||
|
||||
if ( alpha < 1.0f ) {
|
||||
renderSystem->SetColor4( ( player->health <= 0.0f ) ? MS2SEC( gameLocal.time ) : lastDamageTime, 1.0f, 1.0f, ( player->health <= 0.0f ) ? 0.0f : alpha );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, tunnelMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, tunnelMaterial );
|
||||
}
|
||||
|
||||
if ( player->PowerUpActive(BERSERK) ) {
|
||||
|
|
@ -509,13 +509,13 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
|
|||
// start fading if within 10 seconds of going away
|
||||
alpha = (berserkTime < 10000) ? (float)berserkTime / 10000 : 1.0f;
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, alpha );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, berserkMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, berserkMaterial );
|
||||
}
|
||||
}
|
||||
|
||||
if ( bfgVision ) {
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, bfgMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, bfgMaterial );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -528,7 +528,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
|
|||
g_testPostProcess.SetString( "" );
|
||||
} else {
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, mtr );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, mtr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -657,7 +657,7 @@ void idPlayerView::ScreenFade() {
|
|||
|
||||
if ( fadeColor[ 3 ] != 0.0f ) {
|
||||
renderSystem->SetColor4( fadeColor[ 0 ], fadeColor[ 1 ], fadeColor[ 2 ], fadeColor[ 3 ] );
|
||||
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
|
||||
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -681,7 +681,7 @@ void idPlayerView::InfluenceVision( idUserInterface *hud, const renderView_t *vi
|
|||
SingleView( hud, view );
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, pct );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, player->GetInfluenceMaterial() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, player->GetInfluenceMaterial() );
|
||||
} else if ( player->GetInfluenceEntity() == NULL ) {
|
||||
SingleView( hud, view );
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// device context support for gui stuff
|
||||
//
|
||||
|
||||
const int VIRTUAL_WIDTH = 640;
|
||||
const int VIRTUAL_HEIGHT = 480;
|
||||
const int VIRTUAL_WIDTH = SCREEN_WIDTH;
|
||||
const int VIRTUAL_HEIGHT = SCREEN_HEIGHT;
|
||||
const int BLINK_DIVISOR = 200;
|
||||
|
||||
class idDeviceContext {
|
||||
|
|
|
|||
|
|
@ -265,8 +265,8 @@ void idGuiModel::EmitFullScreen( void ) {
|
|||
viewDef->floatTime = tr.frameShaderTime;
|
||||
|
||||
// glOrtho( 0, 640, 480, 0, 0, 1 ); // always assume 640x480 virtual coordinates
|
||||
viewDef->projectionMatrix[0] = 2.0f / 640.0f;
|
||||
viewDef->projectionMatrix[5] = -2.0f / 480.0f;
|
||||
viewDef->projectionMatrix[0] = 2.0f / SCREEN_WIDTH;
|
||||
viewDef->projectionMatrix[5] = -2.0f / SCREEN_HEIGHT;
|
||||
viewDef->projectionMatrix[10] = -2.0f / 1.0f;
|
||||
viewDef->projectionMatrix[12] = -1.0f;
|
||||
viewDef->projectionMatrix[13] = 1.0f;
|
||||
|
|
@ -479,13 +479,13 @@ void idGuiModel::DrawStretchPic( float x, float y, float w, float h, float s1, f
|
|||
h += y;
|
||||
y = 0;
|
||||
}
|
||||
if ( x + w > 640 ) {
|
||||
s2 -= ( s2 - s1 ) * ( x + w - 640 ) / w;
|
||||
w = 640 - x;
|
||||
if ( x + w > SCREEN_WIDTH ) {
|
||||
s2 -= ( s2 - s1 ) * ( x + w - SCREEN_WIDTH) / w;
|
||||
w = SCREEN_WIDTH - x;
|
||||
}
|
||||
if ( y + h > 480 ) {
|
||||
t2 -= ( t2 - t1 ) * ( y + h - 480 ) / h;
|
||||
h = 480 - y;
|
||||
if ( y + h > SCREEN_HEIGHT) {
|
||||
t2 -= ( t2 - t1 ) * ( y + h - SCREEN_HEIGHT ) / h;
|
||||
h = SCREEN_HEIGHT - y;
|
||||
}
|
||||
|
||||
if ( w <= 0 || h <= 0 ) {
|
||||
|
|
@ -555,7 +555,7 @@ void idGuiModel::DrawStretchPic( float x, float y, float w, float h, float s1, f
|
|||
verts[3].tangents[1][1] = 1;
|
||||
verts[3].tangents[1][2] = 0;
|
||||
|
||||
DrawStretchPic( &verts[0], &indexes[0], 4, 6, hShader, false, 0.0f, 0.0f, 640.0f, 480.0f );
|
||||
DrawStretchPic( &verts[0], &indexes[0], 4, 6, hShader, false, 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
// these calls are forwarded from the renderer
|
||||
void SetColor( float r, float g, float b, float a );
|
||||
void DrawStretchPic( const idDrawVert *verts, const glIndex_t *indexes, int vertCount, int indexCount, const idMaterial *hShader,
|
||||
bool clip = true, float min_x = 0.0f, float min_y = 0.0f, float max_x = 640.0f, float max_y = 480.0f );
|
||||
bool clip = true, float min_x = 0.0f, float min_y = 0.0f, float max_x = SCREEN_WIDTH, float max_y = SCREEN_HEIGHT );
|
||||
void DrawStretchPic( float x, float y, float w, float h,
|
||||
float s1, float t1, float s2, float t2, const idMaterial *hShader);
|
||||
void DrawStretchTri ( idVec2 p1, idVec2 p2, idVec2 p3, idVec2 t1, idVec2 t2, idVec2 t3, const idMaterial *material );
|
||||
|
|
|
|||
|
|
@ -480,8 +480,8 @@ void idImage::GenerateImage( const byte *pic, int width, int height,
|
|||
}
|
||||
|
||||
// make sure it is a power of 2
|
||||
scaled_width = MakePowerOfTwo( width );
|
||||
scaled_height = MakePowerOfTwo( height );
|
||||
scaled_width = width;
|
||||
scaled_height = height;
|
||||
|
||||
if ( scaled_width != width || scaled_height != height ) {
|
||||
common->Error( "R_CreateImage: not a power of 2 image" );
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@ const int BIGCHAR_HEIGHT = 16;
|
|||
|
||||
// all drawing is done to a 640 x 480 virtual screen size
|
||||
// and will be automatically scaled to the real resolution
|
||||
const int SCREEN_WIDTH = 640;
|
||||
const int SCREEN_HEIGHT = 480;
|
||||
const float SCREEN_WIDTH = 1280.0f;
|
||||
const float SCREEN_HEIGHT = 720.0f;
|
||||
|
||||
class idRenderWorld;
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ public:
|
|||
virtual void SetColor4( float r, float g, float b, float a ) = 0;
|
||||
|
||||
virtual void DrawStretchPic( const idDrawVert *verts, const glIndex_t *indexes, int vertCount, int indexCount, const idMaterial *material,
|
||||
bool clip = true, float min_x = 0.0f, float min_y = 0.0f, float max_x = 640.0f, float max_y = 480.0f ) = 0;
|
||||
bool clip = true, float min_x = 0.0f, float min_y = 0.0f, float max_x = SCREEN_WIDTH, float max_y = SCREEN_HEIGHT ) = 0;
|
||||
virtual void DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, const idMaterial *material ) = 0;
|
||||
|
||||
virtual void DrawStretchTri ( idVec2 p1, idVec2 p2, idVec2 p3, idVec2 t1, idVec2 t2, idVec2 t3, const idMaterial *material ) = 0;
|
||||
|
|
|
|||