|
UFO: Alien Invasion
|
#include "renderer/r_image.h"#include "renderer/r_model.h"#include "renderer/r_program.h"#include <SDL.h>

Go to the source code of this file.
Data Structures | |
| struct | corona_t |
| coronas are soft, alpha-blended, rounded polys More... | |
| struct | modelInfo_t |
| struct | ptlCmd_t |
| struct | ptlDef_t |
| struct | ptlArt_t |
| struct | ptl_t |
| struct | rendererData_t |
| struct | renderer_threadstate_t |
Macros | |
| #define | RDF_NOWORLDMODEL 1 |
| #define | RDF_IRGOGGLES 2 |
| #define | WEATHER_NONE 0 |
| #define | WEATHER_FOG 1 |
| #define | VID_NORM_WIDTH 1024 |
| #define | VID_NORM_HEIGHT 768 |
| #define | MAX_PTL_ART 1024 |
| #define | MAX_PTLS 2048 |
| #define | MAX_CORONAS 128 |
| #define | MAX_GL_LIGHTS 8 |
Enumerations | |
| enum | artType_t { ART_PIC , ART_MODEL } |
| particle art type More... | |
| enum | threadstate_t { THREAD_DEAD , THREAD_IDLE , THREAD_CLIENT , THREAD_BSP , THREAD_RENDERER } |
| enum | longlines_t { LONGLINES_WRAP , LONGLINES_CHOP , LONGLINES_PRETTYCHOP , LONGLINES_LAST } |
Functions | |
| void | R_Color (const vec4_t rgba) |
| Change the color to given value. | |
| void | R_ModBeginLoading (const char *tiles, bool day, const char *pos, const char *mapName, const char *mapZone) |
| Specifies the model that will be used as the world. | |
| void | R_SwitchModelMemPoolTag (void) |
| After all static models are loaded, switch the pool tag for these models to not free them everytime R_ShutdownModels is called. | |
| void | R_LoadImage (const char *name, byte **pic, int *width, int *height) |
| Generic image-data loading fucntion. | |
| void | R_FontShutdown (void) |
| frees the SDL_ttf fonts | |
| void | R_FontInit (void) |
| void | R_FontRegister (const char *name, int size, const char *path, const char *style) |
| void | R_FontSetTruncationMarker (const char *marker) |
| void | R_FontTextSize (const char *fontId, const char *text, int maxWidth, longlines_t method, int *width, int *height, int *lines, bool *isTruncated) |
| Supply information about the size of the text when it is linewrapped and rendered, without actually rendering it. Any of the output parameters may be nullptr. | |
| int | R_FontDrawString (const char *fontId, align_t align, int x, int y, int absX, int maxWidth, int lineHeight, const char *c, int boxHeight, int scrollPos, int *curLine, longlines_t method) |
Variables | |
| rendererData_t | refdef |
| renderer_threadstate_t | r_threadstate |
| #define MAX_CORONAS 128 |
Definition at line 53 of file cl_renderer.h.
Referenced by R_AddCorona().
| #define MAX_GL_LIGHTS 8 |
Definition at line 55 of file cl_renderer.h.
Referenced by R_AddLight(), R_AddSustainedLight(), R_DisableLights(), R_DisableSpotLight(), R_EnableModelLights(), R_EnableWorldLights(), and R_UpdateSustainedLights().
| #define MAX_PTL_ART 1024 |
Definition at line 43 of file cl_renderer.h.
Referenced by CL_ParticleGetArt().
| #define MAX_PTLS 2048 |
Definition at line 44 of file cl_renderer.h.
Referenced by CL_ParticleSpawn(), and TEST_F().
| #define RDF_IRGOGGLES 2 |
actor is using ir goggles and everything with RF_IRGOGGLES is visible for him
Definition at line 35 of file cl_renderer.h.
Referenced by CL_ActorDoShoot(), CL_ActorSelect(), CL_ClearState(), CL_DoEndRound(), and R_DrawAliasModel().
| #define RDF_NOWORLDMODEL 1 |
Definition at line 34 of file cl_renderer.h.
Referenced by CL_ViewRender(), R_CullEntity(), R_DrawBlendMeshEntities(), R_DrawOpaqueMeshEntities(), R_GetLevelOfDetailForModel(), R_RenderFrame(), R_Setup2D(), R_Setup3D(), R_SetupFrustum(), and SEQ_Render3D().
| #define VID_NORM_HEIGHT 768 |
Definition at line 41 of file cl_renderer.h.
Referenced by uiWindowNode::onLoading(), R_InitMiscTexture(), R_Setup3D(), R_UpdateVidDef(), SEQ_Render(), UI_DrawTooltip(), and UI_Window_FlagFullscreen().
| #define VID_NORM_WIDTH 1024 |
Definition at line 40 of file cl_renderer.h.
Referenced by Con_Init(), uiWindowNode::onLoading(), R_InitMiscTexture(), R_Setup3D(), R_UpdateVidDef(), SEQ_Render(), SEQ_Render2D(), UI_DrawNotice(), UI_DrawTooltip(), and UI_Window_FlagFullscreen().
| #define WEATHER_FOG 1 |
Definition at line 38 of file cl_renderer.h.
Referenced by R_EnableFog().
| #define WEATHER_NONE 0 |
Definition at line 37 of file cl_renderer.h.
Referenced by SP_worldspawn().
| enum artType_t |
| enum longlines_t |
| Enumerator | |
|---|---|
| LONGLINES_WRAP | |
| LONGLINES_CHOP | |
| LONGLINES_PRETTYCHOP | |
| LONGLINES_LAST | |
Definition at line 217 of file cl_renderer.h.
| enum threadstate_t |
| Enumerator | |
|---|---|
| THREAD_DEAD | |
| THREAD_IDLE | |
| THREAD_CLIENT | |
| THREAD_BSP | |
| THREAD_RENDERER | |
Definition at line 209 of file cl_renderer.h.
Change the color to given value.
| [in] | rgba | A pointer to a vec4_t with rgba color value |
Definition at line 1011 of file r_state.cpp.
References color_white, and R_CheckError.
Referenced by uiButtonNode::draw(), uiImageNode::draw(), uiLineChartNode::draw(), uiOptionListNode::draw(), uiOptionTreeNode::draw(), uiSelectBoxNode::draw(), uiStringNode::draw(), uiTextEntryNode::draw(), uiText2Node::drawText(), uiTextListNode::drawText(), uiTextNode::drawText(), GAME_GetImportData(), R_DrawAliasModel(), R_DrawArrow(), R_DrawBoundingBoxes(), R_DrawBox(), R_DrawBspNormals(), R_DrawCircle(), R_DrawCoronas(), R_DrawEntityEffects(), R_DrawFills(), R_DrawFlareSurfaces(), R_DrawFloor(), R_DrawMaterialSurfaces(), R_DrawMeshModelShell(), R_DrawMeshShadow(), R_DrawModelDirect(), R_DrawModelParticle(), R_DrawParticles(), R_DrawPtlLine(), R_DrawRect(), R_DrawSprite(), R_DrawSurfaces(), R_EndFrame(), R_RenderFrame(), R_SetSurfaceStageState(), R_SetSurfaceState(), R_Setup2D(), Weather::render(), SEQ_Render2D(), UI_DrawItem(), UI_DrawNotice(), UI_DrawSpriteInBox(), UI_DrawTooltip(), UI_MessageDraw(), UI_RadarNodeDrawArrays(), and cgame_import_t::void().
| int R_FontDrawString | ( | const char * | fontId, |
| align_t | align, | ||
| int | x, | ||
| int | y, | ||
| int | absX, | ||
| int | maxWidth, | ||
| int | lineHeight, | ||
| const char * | c, | ||
| int | boxHeight, | ||
| int | scrollPos, | ||
| int * | curLine, | ||
| longlines_t | method ) |
| [in] | fontId | the font id (defined in ufos/fonts.ufo) |
| align | Alignment of the text inside the text zone | |
| [in] | x | Current x position (may differ from absX due to tabs e.g.) |
| [in] | y | Current y position (may differ from absY due to linebreaks) |
| [in] | absX | Absolute x value for this string |
| [in] | maxWidth | Max width - relative from absX |
| [in] | lineHeight | The lineheight of that node |
| [in] | c | The string to draw |
| boxHeight | Number of line the box can contain. If <= 0 the value is autogenerated according to the number of line of the text input | |
| [in] | scrollPos | Starting line in this node (due to scrolling) |
| [in] | curLine | Current line (see lineHeight) |
| method | Explain the way we manage line overflow |
Definition at line 681 of file r_font.cpp.
References chunkCache, wrapCache_t::chunkIdx, i, chunkCache_t::linenum, wrapCache_t::numChunks, wrapCache_t::numLines, R_FontDrawTexture(), R_FontGenerateTexture(), R_FontWrapText(), R_GetFont(), chunkCache_t::texnum, chunkCache_t::texsize, and chunkCache_t::width.
Referenced by UI_BaseInventoryNodeDraw2(), and UI_DrawString().
Definition at line 716 of file r_font.cpp.
References chunkCache, Com_Error(), Com_Printf(), ERR_FATAL, fonts, hash, numChunks, numFonts, numWraps, OBJZERO, and wrapCache.
Referenced by CL_NewLanguage(), R_Init(), CampaignTest::SetUpTestCase(), FootStepTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefTest::SetUpTestCase(), ParticleTest::SetUpTestCase(), ScriptTest::SetUpTestCase(), and UI_Restart_f().
Definition at line 744 of file r_font.cpp.
References fontStyle, i, name, NUM_FONT_STYLES, Q_strcasecmp, and R_FontAnalyze().
Referenced by UI_RegisterFont().
| void R_FontSetTruncationMarker | ( | const char * | marker | ) |
Definition at line 112 of file r_font.cpp.
References Q_strncpyz(), and truncmarker.
Referenced by CL_NewLanguage().
frees the SDL_ttf fonts
Definition at line 144 of file r_font.cpp.
References fonts, i, Mem_Free, numFonts, OBJZERO, and R_FontCleanCache().
Referenced by CL_NewLanguage(), R_Shutdown(), and UI_Restart_f().
| void R_FontTextSize | ( | const char * | fontId, |
| const char * | text, | ||
| int | maxWidth, | ||
| longlines_t | method, | ||
| int * | width, | ||
| int * | height, | ||
| int * | lines, | ||
| bool * | isTruncated ) |
Supply information about the size of the text when it is linewrapped and rendered, without actually rendering it. Any of the output parameters may be nullptr.
| [in] | fontId | the font id (defined in ufos/fonts.ufo) |
| [in] | text | The text to check |
| maxWidth | Max width available | |
| method | Line overflow method | |
| [out] | width | receives width in pixels of the longest line in the text |
| [out] | height | receives height in pixels when rendered with standard line height |
| [out] | lines | receives total number of lines in text, including blank ones |
| [out] | isTruncated | receives true, if the text must be trucated |
Definition at line 522 of file r_font.cpp.
References chunkCache, wrapCache_t::chunkIdx, font_t::height, i, font_t::lineSkip, wrapCache_t::numChunks, wrapCache_t::numLines, R_FontWrapText(), and R_GetFont().
Referenced by uiButtonNode::draw(), uiTabNode::draw(), uiText2Node::drawText(), uiTextNode::drawText(), uiStringNode::drawTooltip(), HUD_UpdateCursor(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_DrawNotice(), UI_DrawTooltip(), UI_MessageGetLines(), and UI_TabNodeTabAtPosition().
Generic image-data loading fucntion.
| [in] | name | (Full) pathname to the image to load. Extension (if given) will be ignored. |
| [out] | pic | Image data. |
| [out] | width | Width of the loaded image. |
| [out] | height | Height of the loaded image. |
Definition at line 152 of file r_image.cpp.
References Com_Error(), Com_StripExtension(), ERR_FATAL, Img_LoadImage(), MAX_QPATH, Mem_PoolAllocTypeN, name, Q_strnull(), and vid_imagePool.
Referenced by GAME_GetImportData().
| void R_ModBeginLoading | ( | const char * | tiles, |
| bool | day, | ||
| const char * | pos, | ||
| const char * | mapName, | ||
| const char * | mapZone ) |
Specifies the model that will be used as the world.
| [in] | tiles | The tiles string can be only one map or a list of space seperated map tiles for random assembly. In case of random assembly we also need the pos string. Every tile needs an entry in the pos string, too. |
| [in] | day | Load the day lightmap |
| [in] | pos | In case of a random map assembly this is the string that holds the world grid positions of the tiles. The positions are x, y and z values. They are just written one after another for every tile in the tiles string and every of the three components must exists for every tile. |
| [in] | mapName | The mapname that the get from the server (used to identify the correct name for the materials in case of a random assembly). |
| [in] | mapZone | The terrain type for texture replacement |
CM_LoadMap code only loads the collision and pathfinding stuff. Definition at line 1098 of file r_model_brush.cpp.
References Com_Error(), Com_Parse(), Com_sprintf(), ERR_DROP, i, mapName, MAX_QPATH, MAX_VAR, name, PATHFINDING_HEIGHT, PATHFINDING_WIDTH, Q_strncpyz(), R_BeginBuildingLightmaps(), R_ClearGrass(), R_ClearStaticLights(), R_ModAddMapTile(), R_ModEndLoading(), r_numMapTiles, and r_numModelsInline.
Referenced by CL_ViewLoadMedia().
After all static models are loaded, switch the pool tag for these models to not free them everytime R_ShutdownModels is called.
Definition at line 299 of file r_model.cpp.
References model_t::alias, Com_Printf(), i, it_static, Mem_ChangeTag, MEM_TAG_STATIC_MODELS, mAliasModel_t::meshes, model_t::name, mAliasModel_t::num_meshes, mAliasMesh_t::num_skins, r_models, r_noTexture, r_numModels, r_numModelsStatic, mAliasSkin_t::skin, mAliasMesh_t::skins, image_t::type, and vid_modelPool.
Referenced by CL_ViewPrecacheModels().
|
extern |
Definition at line 34 of file r_thread.cpp.
Referenced by CL_ViewRender(), R_InitThreads(), R_RenderFrame(), R_RunThread(), R_ShutdownThreads(), and SCR_TimeRefresh_f().
|
extern |
Definition at line 45 of file r_main.cpp.
Referenced by CL_ActorDoShoot(), CL_ActorSelect(), CL_ClearState(), CL_DoEndRound(), CL_GetWorldCoordsUnderMouse(), CL_ParseConfigString(), CL_ParseServerData(), CL_ViewCalcFieldOfViewX(), CL_ViewCalcFieldOfViewY(), CL_ViewLoadMedia(), CL_ViewRender(), CL_ViewUpdateRenderData(), MYgluPerspective(), R_AddCorona(), R_AddEntity(), R_AddLight(), R_AddStaticLight(), R_AddSustainedLight(), R_CalcTransform(), R_CleanupDepthBuffer(), R_ClearScene(), R_ClearStaticLights(), R_CullEntity(), R_Draw2DArray(), R_DrawAliasFrameLerp(), R_DrawAliasModel(), R_DrawAliasModelBuffer(), R_DrawAliasStatic(), R_DrawAliasTags(), R_DrawArrow(), R_DrawBlendMeshEntities(), R_DrawBox(), R_DrawBspNormals(), R_DrawChars(), R_DrawCircle(), R_DrawCoronas(), R_DrawEntityEffects(), R_DrawFills(), R_DrawFlareSurfaces(), R_DrawFlatGeoscape(), R_DrawFloor(), R_DrawGrass(), R_DrawImageArray(), R_DrawMeshModelShell(), R_DrawMeshShadow(), R_DrawModelDirect(), R_DrawModelParticle(), R_DrawNullModel(), R_DrawOpaqueMeshEntities(), R_DrawParticles(), R_DrawPtlLine(), R_DrawQuad(), R_DrawRect(), R_DrawSprite(), R_DrawStarfield(), R_DrawSurfaces(), R_DrawSurfaceStage(), R_EnableFog(), R_EnableModelLights(), R_EnableShell(), R_EnableWorldLights(), R_FontDrawTexture(), R_GetEntity(), R_GetEntityLists(), R_GetFreeEntity(), R_GetLevelOfDetailForModel(), R_GetLevelSurfaceLists(), R_InitModelProgram(), R_InitWarpProgram(), R_InitWorldProgram(), R_RenderFrame(), R_RunThread(), R_Setup2D(), R_Setup3D(), R_SetupFrustum(), R_SphereRender(), R_SphereRenderTris(), R_SpriteTexcoords(), R_StageTexCoord(), R_Trace(), R_UpdateLightList(), R_UpdateMaterial(), R_UpdateShadowOrigin(), R_UpdateSustainedLights(), R_UseModelProgram(), R_UseProgram(), R_UseWarpProgram(), R_UseWorldProgram(), Weather::render(), SCR_TimeRefresh_f(), SCR_UpdateScreen(), SEQ_Render3D(), SP_worldspawn(), and VID_Restart_f().