Todo List

Global <globalScope>::_pico_ptr_malloc )(size_t)
: fix p->curLine for parser routines. increased twice

Global <globalScope>::AB_LoadXML (mxml_node_t *parent)
this is for old saves now only

Global <globalScope>::abstractScrollbarExtraData_t

think about switching to percent when its possible (lowPosition, hightPosition)

think about adding a "direction" property and merging v and h scrollbar

Global <globalScope>::AC_UpdateMenu (const base_t *base)
Select the containment we (maybe) just clicked again

Global <globalScope>::actorHands_t
remove this and use the container id - not every unit must have two hands

Global <globalScope>::actorL_shoot (lua_State *L)

Choose fire mode based on TU available - currently the first one is used.

actually handle fire modes

Global <globalScope>::AddLump (qFILE *bspfile, dBspHeader_t *header, int lumpnum, void *data, int len)
Implement this without the ftell stuff - don't write the bsp file twice

Global <globalScope>::AI_ActorThink (player_t *player, edict_t *ent)
If possible targets that can shoot back (check their inventory for weapons, not for ammo) are close, go into reaction fire mode, too

Global <globalScope>::AI_CheckUsingDoor (const edict_t *ent, const edict_t *door)
Finish implementation

Global <globalScope>::AI_FighterCalcBestAction (edict_t *ent, pos3_t to, aiAction_t *aia)

fill z_align values

optimize this

do this decently, only penalizing the visible part of walk and penalizing much more for reaction shooters around; now it may remove some tactical options from aliens, e.g. they may now choose only the closer doors; however it's still better than going three times around soldier and only then firing at him

Try to crouch if no hiding spot was found - randomized

also add bonus for fleeing from reaction fire and a huge malus if more than 1 move under reaction

Global <globalScope>::AI_FighterCheckShoot (const edict_t *ent, const edict_t *check, const fireDef_t *fd, float *dist)

Check whether radius and power of fd are to to big for dist

Check whether the alien will die when shooting

Global <globalScope>::AI_NUMERICSERV
Move this into the configure script AI_ADDRCONFIG, AI_ALL, and AI_V4MAPPED are available since glibc 2.3.3. AI_NUMERICSERV is available since glibc 2.3.4.

Global <globalScope>::AI_SearchBestTarget (aiAction_t *aia, const edict_t *ent, edict_t *check, const item_t *item, shoot_types_t shootType, int tu, float *maxDmg, int *bestTime, const fireDef_t *fdArray)
timed firedefs that bounce around should not be thrown/shoot about the whole distance

Global <globalScope>::AI_SearchDestroyableObject (const edict_t *ent, const fireDef_t *fd)
This feature causes the 'aliens shoot at walls'-bug. I considered adding a visibility check, but that wouldn't prevent aliens from shooting at the breakable parts of their own ship. So I disabled it for now. Duke, 23.10.09

Global <globalScope>::AIL_see (lua_State *L)
Properly implement at edict level, get rid of magic numbers. These are only "placeholders".

Global <globalScope>::AIM_AutoEquipAircraft (aircraft_t *aircraft)
Eliminate hardcoded techs here.

Global <globalScope>::AIM_CheckTechnologyIntoSlot (const aircraftSlot_t *slot, const technology_t *tech)
It is a generic function, we can move it into cp_mapfightequip.c

Global <globalScope>::AIM_SelectableCraftItem (const aircraftSlot_t *slot, const technology_t *tech)

maybe this isn't working, aircraft slot type can't be an AMMO

This only works for ammo that is usable in exactly one weapon check the weap_idx array and not only the first value

Global <globalScope>::AIM_UpdateItemDescription (qboolean fromList, qboolean fromSlot)
we should clone the text, and not using the ufopaedia text

Global <globalScope>::AIR_DeleteAircraft (aircraft_t *aircraft)
Return status of deletion for better error handling.

Global <globalScope>::AIR_DestroyAircraft (aircraft_t *aircraft)
Return status of deletion for better error handling.

Global <globalScope>::AIR_GetDestinationWhilePursuing (const aircraft_t const *shooter, const aircraft_t const *target, vec2_t *dest)

only compute this calculation every time target changes destination, or one of the aircraft speed changes.

add EQUAL_EPSILON here?

Global <globalScope>::aircraftItemType_t
move into campaign only structure

Global <globalScope>::aircraftParams_t
move into campaign only structure

Global <globalScope>::AIRFIGHT_ExecuteActions (aircraft_t *air, aircraft_t *ufo)

Implement me and display an attack popup.

This should be calculated only when target destination changes, or when aircraft speed changes.

Global <globalScope>::AIRFIGHT_ProbabilityToHit (const aircraft_t *shooter, const aircraft_t *target, const aircraftSlot_t *slot)
This probability should also depend on the pilot skills, when they will be implemented.

Global <globalScope>::AL_AddAlienTypeToAircraftCargo (struct aircraft_s *aircraft, const teamDef_t *teamDef, int amount, qboolean dead)
Return false for cases where the alien race could not be added to the alien cargo of the aircraft

Global <globalScope>::AL_ChangeAliveAlienNumber (struct base_s *base, aliensCont_t *containment, int num)
handle containment[j].amountDead++; in case the num is negative?

Global <globalScope>::AL_RemoveAliens (struct base_s *base, const teamDef_t *alienType, int amount, const alienCalcType_t action)
integrate this with research system

Global <globalScope>::ammoStatus_t
do we still need this?

Global <globalScope>::B_AssembleMap (const base_t *base)

Search a empty field and add a alien craft there

If a building is still under construction, it will be assembled as a finished part. Otherwise we need mapparts for all the maps under construction.

Global <globalScope>::B_BaseInit_f (void)
integrate building status tooltips from B_CheckBuildingStatusForMenu_f into this one

Global <globalScope>::B_BuildFromTemplate (base_t *base, const char *templateName, qboolean hire)
if there is no more space for mandatory building, remove a non mandatory one or build mandatory ones first

Global <globalScope>::B_BuildingOnDestroy_f (void)
Why does this exist? why is this not part of B_BuildingDestroy?

Global <globalScope>::B_BuildingStatus (const base_t *base, const building_t *building)
shorten text or provide more space in overview popup

Global <globalScope>::B_Destroy (base_t *base)
Destroy the base if we solved aircraft transfer issue it should be done via moving other bases (and adjusting pointers where needed. We don't allow holes in baselist

Global <globalScope>::B_InitCallbacks (void)
unify the names into mn_base_*

Global <globalScope>::B_InitialEquipment (base_t *base, aircraft_t *assignInitialAircraft, const char *eqname, equipDef_t *edTarget)
Make sure all equipment including soldiers equipment is added to capacity.cur.

Global <globalScope>::B_LoadXML (mxml_node_t *parent)

this must be set after the aircraft are loaded

can't we use something like I_DestroyInventory here?

Global <globalScope>::B_MarkBuildingDestroy (base_t *base, building_t *building)
: make base destroyable by destroying entrance

Global <globalScope>::B_MoveAircraftOnGeoscapeToOtherBases (const base_t *base)
What should happen with it if no other base has enough free storage for it? Spawn a dropship crash mission if no more fuel?

Global <globalScope>::B_PackInitialEquipment (aircraft_t *aircraft, const equipDef_t *ed)
Move this function to a better place - has nothing to do with bases anymore

Global <globalScope>::B_RemoveAircraftExceedingCapacity (base_t *base, buildingType_t buildingType)

If player choose to destroy the building, a popup should ask him if he wants to sell aircraft in it.

move aircraft being transfered to the destBase

Better solution? let it crash due to technical difficulties and spawn a rescue mission?

Global <globalScope>::B_SetUpFirstBase (base_t *base)

move aircraft to .ufo

cleanup this mess:

Global <globalScope>::B_ShutdownCallbacks (void)
unify the names into mn_base_*

Global <globalScope>::B_UpdateAllBaseBuildingStatus (building_t *building, base_t *base, buildingStatus_t status)
this should be an user option defined in Game Options.

Global <globalScope>::BASEMAP_SIZE_X
take the values from scriptfile

Global <globalScope>::BaseSummary_Init (const base_t *base)
use the same method as we do in PR_ProductionInfo

Global <globalScope>::BREATHINGAPPARATUS_TECH
remove harcoded tech

Global <globalScope>::BrushMostlyOnSide (const bspbrush_t *brush, const plane_t *plane)
Or vice versa?

Global <globalScope>::BS_BuyItem_f (void)
make this depend on market as well?

Global <globalScope>::BS_BuyType (const base_t *base)

Add this entry to the list

use the market to get the price

Use craftitem name here? See also BS_MarketClick_f

select first heavy item

Global <globalScope>::BS_CheckAndDoBuyItem (base_t *base, const objDef_t *item, int number)

Handle items with price 0 better

Handle items with size 0 better

Global <globalScope>::BS_GetMinMaxValueByItemID (const base_t *base, int itemNum, int *min, int *max, int *value)
compute something better

Global <globalScope>::BS_SellItem_f (void)

message - Couldn't fire employee.

make this depend on market as well?

Global <globalScope>::BYTES_NONE
rename this after merging with savegame breakage branch and also change the value to -1

Global <globalScope>::capturedNode
think about replacing it by a boolean. When capturedNode != NULL => hoveredNode == capturedNode it create unneed case

Global <globalScope>::Cbuf_InsertText (const char *text)
actually change the command buffer to do less copying

Global <globalScope>::Check_InfoStartAligned (const entityDef_t *ed, const entity_t *e)
check for brush intersection as well as alignment, and move to a good position if bad.

Global <globalScope>::checkcount
not thread safe

Global <globalScope>::CheckMixedFaceContents (void)
at the moment only actorclip is removed if only set on less than half of the faces. there may be other contentflags that would benefit from this treatment

Global <globalScope>::ChopWindingInPlace (winding_t **w, const vec3_t normal, const vec_t dist, const vec_t epsilon)
Why + 4?

Global <globalScope>::CIN_OGM_PlayCinematic (struct cinematic_s *cin, const char *filename)

vorbis/theora-header & init in sub-functions

"clean" error-returns ...

FIXME? can serialno be 0 in ogg? (better way to check initialized?)

support for more than one audio stream? / detect files with one stream(or without correct ones)

FIXME? better way to find audio stream

Global <globalScope>::CL_ActorConditionalMoveCalc (le_t *le)
seems like this function is called *before* the TUs are set

Global <globalScope>::CL_ActorDoorAction (const eventRegister_t *self, struct dbuffer *msg)
Hud should have a button that should be activated now

Global <globalScope>::CL_ActorDoShoot (const eventRegister_t *self, struct dbuffer *msg)
Improve detection of left- or right animation.

Global <globalScope>::CL_ActorDoThrow (const eventRegister_t *self, struct dbuffer *msg)
add victim support for blood and hurt sounds

Global <globalScope>::CL_ActorGetChr (const le_t *le)
We really needs a better way to sync this up.

Global <globalScope>::CL_ActorMouseTrace (void)
Shouldn't we check the return value of CM_TestLineDM here - maybe we don't have to do the second Grid_Fall call at all and can safe a lot of traces

Global <globalScope>::CL_ActorRemoveFromTeamList (le_t *le)
why the heck is that needed? the inventory was already dropped to floor.

Global <globalScope>::CL_ActorSelect (le_t *le)
remove this here, doesn't really belong here

Global <globalScope>::CL_ActorStartShoot (const eventRegister_t *self, struct dbuffer *msg)
Improve detection of left- or right animation.

Global <globalScope>::CL_ActorUseHeadgear_f (void)
make this a variable somewhere?

Global <globalScope>::CL_AddActor (le_t *le, entity_t *ent)
Better value for this?

Global <globalScope>::CL_AddUGV (le_t *le, entity_t *ent)

Global <globalScope>::CL_CampaignRunAircraft (int dt, qboolean updateRadarOverlay)
check if aircraft can go to a closer base with free space

Global <globalScope>::CL_ChangeSkin_f (void)

Get the skin id from the model by using the customskin id

Or remove skins from models and convert character_t->skin to string

Global <globalScope>::CL_ChangeSkinForWholeTeam_f (void)

What happens if a model of a team member does not have the selected skin?

Get the skin id from the model by using the customskin id

Or remove skins from models and convert character_t->skin to string

Global <globalScope>::CL_CompleteNetworkAddress (const char *partial, const char **match)
Extend this for all the servers on the server browser list

Global <globalScope>::CL_DateConvertLong (const date_t *date, dateLong_t *dateLong)
Make this conversion a function as well (DateConvertSeconds?) See also CL_SecondConvert

Global <globalScope>::CL_DoorClose (const eventRegister_t *self, struct dbuffer *msg)
YAW should be the orientation of the door

Global <globalScope>::CL_DoorOpen (const eventRegister_t *self, struct dbuffer *msg)
YAW should be the orientation of the door

Global <globalScope>::CL_EndRoundAnnounce (const eventRegister_t *self, struct dbuffer *msg)
Build into hud

Global <globalScope>::CL_FinishHTTPDownload (void)
technically i shouldn't need to do this as curl will auto reuse the existing handle when you change the URL. however, the handleCount goes all weird when reusing a download slot in this way. if you can figure out why, please let me know.

Global <globalScope>::CL_GameAutoGo (mission_t *mission)
set other counts, use the counts above

Global <globalScope>::CL_GetHitProbability (const le_t *actor)

The hit probability should work somewhat differently for splash damage weapons. Since splash damage weapons can deal damage even when they don't directly hit an actor, the hit probability should be defined as the predicted percentage of the maximum splash damage of the firemode, assuming the projectile explodes at the desired location. This means that a percentage should be displayed for EVERY actor in the predicted blast radius. This will likely require specialized code.

use LE_FindRadius

Global <globalScope>::CL_GetTipOfTheDay_f (void)
not his role, remove it when its possible

Global <globalScope>::CL_HandleNationData (qboolean won, mission_t *mis)

Scoring should eventually be expanded to include such elements as infected humans and mission objectives other than xenocide.

HACK: This should be handled properly, i.e. civilians should only factor into the scoring if the mission objective is actually to save civilians.

The score for aliens is always negative or zero currently, but this should be dependent on the mission objective. In a mission that has a special objective, the amount of killed aliens should only serve to increase the score, not reduce the penalty.

Global <globalScope>::CL_HudRadarDown_f (void)
only call/register it when we are on the battlescape

Global <globalScope>::CL_HudRadarUp_f (void)
only call/register it when we are on the battlescape

Global <globalScope>::CL_InvReload (const eventRegister_t *self, struct dbuffer *msg)
reload sound should depend on the weapon we reload

Global <globalScope>::CL_NationDrawStats (const nation_t *nation, uiNode_t *node, lineStrip_t *funding, int maxFunding, int color)

Somehow the display of the months isn't really correct right now (straight line :-/)

should be into the chart node code

Sort this in reverse? -> Having current month on the right side?

Global <globalScope>::CL_NationsMaxFunding (void)
Extend to other values?

Global <globalScope>::CL_NationStatsUpdate_f (void)
Display summary of nation info

Global <globalScope>::CL_ParseComponents (const char *name, const char **text)
Set item links to NONE if needed

Global <globalScope>::CL_ParseResearchableCampaignStates (const char *name, const char **text, qboolean researchable)
Mark unresearchable

Global <globalScope>::CL_ParseTeamInfoMessage (struct dbuffer *msg)
warning must not be into the player list. if we see this we are the first player that would be connected to the server

Global <globalScope>::CL_ParticleFunction (ptl_t *p, ptlCmd_t *cmd)
make the children boolean configurable

Global <globalScope>::CL_ParticleLoadArt (ptlArt_t *a)
Support the frame data from ptlArt_t for models, too

Global <globalScope>::CL_ParticleRun2 (ptl_t *p)

We should ensure, that every other particle is rendered, before we add weather particles

don't do this every frame

Global <globalScope>::CL_PopupInterceptClick_f (void)
are these newlines really needed? at least the first should be handled by the menu code

Global <globalScope>::CL_PrecacheCharacterModels (void)
Does not precache armoured models

Global <globalScope>::CL_ResearchSelect_f (void)
improve that, don't need to update everything

Global <globalScope>::CL_ResearchType_f (void)
wrong computation: researchListLength doesn't say if there are research on this base

Global <globalScope>::CL_Reset (const eventRegister_t *self, struct dbuffer *msg)
this can and should be done earlier - it's not the correct place here for doing this

Global <globalScope>::CL_ResetSinglePlayerData (void)

subsystems should have Init/Shutdown functions like callbacks have and do these cleanups for themselves

this isn't working per per-base, as get next from base won't give every available craft (not every craft must be in a base). Maybe we should use the tags for the memory allocation for linked list (like we do for the game shared object already, too)

Global <globalScope>::CL_SaveItemXML (mxml_node_t *p, item_t item, containerIndex_t container, int x, int y)
: is there any case when amount != 1 for soldier inventory item?

Global <globalScope>::CL_SecondConvert (int second)
Abstract the code into an extra function (DateConvertSeconds?) see also CL_DateConvertLong

Global <globalScope>::CL_SetRatioFilter_f (void)
We should check the ratio list and remove matched resolutions, here it is a hack

Global <globalScope>::CL_ShouldUpdateSoldierRank (const rank_t *rank, const character_t *chr)
(Zenerka 20080301) extend ranks and change calculations here.

Global <globalScope>::CL_Shutdown (void)
this is a callback from Sys_Quit and Com_Error. It would be better to run quit through here before the final handoff to the sys code.

Global <globalScope>::CL_StartHTTPDownload (dlqueue_t *entry, dlhandle_t *dl)
use the FS_OpenFile function here

Global <globalScope>::CL_SwapSkills (chrList_t *team)

This currently always uses exactly the first two firemodes (see fmode1+fmode2) for calculation. This needs to be adapted to support less (1) or more 3+ firemodes. I think the function will even break on only one firemode .. never tested it.

i think currently also the different ammo/firedef types for each weapon (different weaponr_fd_idx and weaponr_fd_idx values) are ignored.

Global <globalScope>::CL_TargetingGrenade (const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
character strength should be used here, too the stronger the character, the further the throw

Global <globalScope>::CL_UpdateCharacterStats (const base_t *base, const aircraft_t *aircraft)
use chrScore_t to determine negative influence on soldier here, like killing too many civilians and teammates can lead to unhire and disband such soldier, or maybe rank degradation.

Global <globalScope>::CL_UpdateEquipmentMenuParameters_f (void)

Do we allow EMPL_ROBOTs to be equipable? Or is simple buying of ammo enough (similar to original UFO/XCOM)? In the first case the EMPL_SOLDIER stuff below needs to be changed.

Skip EMPL_ROBOT (i.e. ugvs) for now .

Global <globalScope>::CL_UpdatePilotList_f (void)
Make this function use a temporary list with all list-able employees instead of using ccs.employees[][] directly. See also CL_Select_f->SELECT_MODE_TEAM

Global <globalScope>::CL_UpdateSoldierList_f (void)
Make this function use a temporary list with all list-able employees instead of using ccs.employees[][] directly. See also CL_Select_f->SELECT_MODE_TEAM

Global <globalScope>::CL_ViewLoadMedia (void)
Parse fog from configstrings

Global <globalScope>::CM_HintedTransformedBoxTrace (mapTile_t *tile, const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, const int headnode, const int brushmask, const int brushrejects, const vec3_t origin, const vec3_t angles, const vec3_t rmaShift, const float fraction)
figure out how to do this with existing angles

Global <globalScope>::Cmd_ExecuteString (const char *text)
lookupnoadd the token to speed search?

Global <globalScope>::Cmd_GetCommandDesc (const char *command)
- search alias, too

Global <globalScope>::CMod_LoadLighting (mapTile_t *tile, const byte *base, const lump_t *l)
Implement this

Global <globalScope>::CMod_LoadRouting (mapTile_t *tile, mapData_t *mapData, const byte *base, const char *name, const lump_t *l, int sX, int sY, int sZ)

TEST z-level routing

this eats a lot of memory - load directory into mapData->map

Global <globalScope>::colorDefault

it may be nice to vectorise that

it may be nice to vectorise that

Global <globalScope>::Com_FilePath (const char *in, char *out)
add a size parameter to prevent buffer overflows

Global <globalScope>::Com_GrenadeTarget (const vec3_t from, const vec3_t at, float speed, qboolean launched, qboolean rolled, vec3_t v0)

refactor and move me

Com_GrenadeTarget() is called from CL_TargetingGrenade() with speed param as (fireDef_s) fd->range (gi.GrenadeTarget, too), while it is being used here for speed calculations - a bug or just misleading documentation?

Global <globalScope>::Com_ParseValue (void *base, const char *token, valueTypes_t type, int ofs, size_t size, size_t *writtenBytes)
This function has much in common with Com_SetValue. Refactor them !

Global <globalScope>::CON_FlushIn (void)
relevant?

Global <globalScope>::CP_AddCampaignCallbackCommands (void)
callbacks should be registered on menu push (what about sideeffects for commands that are called from different menus?)

Global <globalScope>::CP_AddRadarCoverage (const vec2_t pos, float innerRadius, float outerRadius, qboolean source)
add EQUAL_EPSILON here?

Global <globalScope>::CP_AddWeaponAmmo (equipDef_t *ed, item_t item)

We may want to change this to use the type->ammo[] info.

on return from a mission with no clips left and one weapon half-loaded wielded by soldier and one empty in equip, on the first opening of equip, the empty weapon will be in soldier hands, the half-full in equip; this should be the other way around.

We may want to change this to use the type->ammo[] info.

Global <globalScope>::CP_BaseAttackStartMission (mission_t *mission)

handle command centre properly

EMPL_ROBOT

remove me - this is not needed because we are using the base->aircraftCurrent pointer for resolving the aircraft - only CL_GameAutoGo needs this

Global <globalScope>::CP_BuildBaseGovernmentLeave (mission_t *mission)
when the mission is created, we should select a position where nation exists, otherwise subverting a government is meaningless

Global <globalScope>::CP_CampaignInit (campaign_t *campaign, qboolean load)
this should be called in this function for new campaigns too but as researched items not yet set, it can't. It's called in B_SetUpFirstBase for new campaigns

Global <globalScope>::CP_CheckLostCondition (void)
Should we make the campaign lost when a player loses all his bases? until he has set up a base again, the aliens might have invaded the whole world ;) - i mean, removing the credits check here.

Global <globalScope>::CP_CreateCivilianTeam (const mission_t *mission)
There should always be a nation, no? Otherwise the mission was placed wrong.

Global <globalScope>::CP_GetRandomPosOnGeoscapeWithParameters (vec2_t pos, const linkedList_t *terrainTypes, const linkedList_t *cultureTypes, const linkedList_t *populationTypes, const linkedList_t *nations)

- cache the counted hits

add EQUAL_EPSILON here?

Global <globalScope>::CP_GetWinProbabilty (const mission_t *mis, const base_t *base, const aircraft_t *aircraft)

This needs work - also take mis->initialIndividualInterest into account?

change the formular here to reflect the above comment

change the formular here to reflect the above comment

change the formular here to reflect the above comments

fix this value

fix this value

Global <globalScope>::CP_HarvestMissionGo (mission_t *mission)
Remove me when CP_XVIMissionGo will be implemented This function should take a location close to an XVI infection point see gameplay proposal on wiki

Global <globalScope>::CP_InitStartup (void)
remove me and move all the included stuff to proper places

Global <globalScope>::CP_MissionEnd (mission_t *mission, qboolean won)

<= -50, etc. (implants)

this shouldn't be here. Ideally we should check for alien/store space when aircraft arrived home and start a player controlled transfer

Global <globalScope>::CP_MissionStageEnd (mission_t *mission)
wouldn't that mean that we've won the battle? but in fact we did nothing, no?

Global <globalScope>::CP_NationBackupMonthlyData (void)
other stuff to back up?

Global <globalScope>::CP_RemoveCampaignCallbackCommands (void)
callbacks should be removed on menu pop (what about sideeffects for commands that are called from different menus?)

Global <globalScope>::CP_SpawnRescueMission (aircraft_t *aircraft, aircraft_t *ufo)
don't "kill" everyone - this should depend on luck and a little bit on the skills

Global <globalScope>::CP_StartXVISpreading_f (void)
ccs.XVIShowMap should not be enabled at the same time than CP_IsXVIResearched(): ccs.XVIShowMap means that PHALANX has a map of XVI, whereas CP_IsXVIResearched() means that aliens started spreading XVI

Global <globalScope>::CP_TerrorMissionAvailableUFOs (const mission_t const *mission, ufoType_t *ufoTypes)
Add Battleship when maps will be available

Global <globalScope>::craftitem_t
move into campaign only structure

Global <globalScope>::do_accept (int sock)
close stream?

Global <globalScope>::Door_Use (edict_t *door, edict_t *activator)
Check if the door can be opened or closed - there should not be anything in the way (e.g. an actor)

Global <globalScope>::E_CountAllHired (const base_t *const base)
What about EMPL_ROBOT?

Global <globalScope>::E_CreateEmployeeAtIndex (employeeType_t type, nation_t *nation, const ugv_t *ugvType, const int emplIdx)
use Cvar_GetString("cl_teamdef"); for campaign games

Global <globalScope>::E_DeleteEmployee (employee_t *employee, employeeType_t type)

remove this once the employees are a linked list, too

This might not work as expected - maybe we have to memmove the array

Global <globalScope>::E_EmployeeList_f (void)
replace magic numbers - use confuncs

Global <globalScope>::E_GetEmployeeType (const char *type)
use Com_ConstInt*

Global <globalScope>::E_HireEmployee (base_t *base, employee_t *employee)
handle EMPL_ROBOT capacities here?

Global <globalScope>::E_LoadXML (mxml_node_t *parent)
: if research was removed we should free the scientists

Global <globalScope>::E_RemoveEmployeeFromBuildingOrAircraft (employee_t *employee)

Add check for base vs. employee_type and abort if they do not match.

are soldiers and pilots assigned to a building, too? quarters?

Global <globalScope>::E_UnhireEmployee (employee_t *employee)
handle EMPL_ROBOT capacities here?

Global <globalScope>::employeeType_t
MAX_EMPLOYEES_IN_BUILDING should be redefined by a config variable that is lab/workshop/quarters-specific, e.g.:

Global <globalScope>::FS_CopyFile (const char *fromOSPath, const char *toOSPath)
Allow copy of pk3 file content

Global <globalScope>::FS_FileLength (qFILE *f)
Implement for pk3

Global <globalScope>::FS_GetMaps (qboolean reset)
paths are normalized here?

Global <globalScope>::G_ActorDieOrStun (edict_t *ent, edict_t *attacker)
Discuss whether stunned actor should really drop everything to floor. Maybe it should drop only what he has in hands? Stunned actor can wake later during mission.

Global <globalScope>::G_ActorDoTurn (edict_t *ent, byte dir)
If performing an action, ensure the actor is facing the direction needed to perform the action if needed (climbing ladders).

Global <globalScope>::G_ActorFall (edict_t *ent)
Handle cases where the grid position the actor would fall to is occupied by another actor already.

Global <globalScope>::G_ActorInvMove (edict_t *ent, const invDef_t *from, invList_t *fItem, const invDef_t *to, int tx, int ty, qboolean checkaction)
what if we don't have enough TUs after subtracting the reserved ones?

Global <globalScope>::G_ActorRevitalise (edict_t *ent)
have a look at the morale value of the ent and maybe get into rage or panic?

Global <globalScope>::G_ClientAssignDefaultActorValues (edict_t *ent)
for now, heal fully upon entering mission

Global <globalScope>::G_ClientConnect (player_t *player, char *userinfo, size_t userinfoSize)
Check if the teamnum preference has already reached maxsoldiers and reject connection if so

Global <globalScope>::G_ClientMove (const player_t *player, int visTeam, edict_t *ent, const pos3_t to)
Handle dazed via trigger_hurt

Global <globalScope>::G_ClientShoot (const player_t *player, edict_t *ent, const pos3_t at, shoot_types_t shootType, fireDefIndex_t firemode, shot_mock_t *mock, qboolean allowReaction, int z_align)

check for direct shot / splash damage shot?

This really needs an overhaul.And it might get dumped completely when Feature Request "[1814158] Extended shot-definitions in firedef" https://sourceforge.net/tracker/?func=detail&atid=805245&aid=1814158&group_id=157793 gets implemented.

Global <globalScope>::G_ClientUseEdict (const player_t *player, edict_t *actor, edict_t *door)
Do we have to change the trigger position here, too? I don't think this is really needed.

Global <globalScope>::G_Damage (edict_t *target, const fireDef_t *fd, int damage, edict_t *attacker, shot_mock_t *mock)

there should be a possible protection, too

Also increase the morale a little bit when soldier gets healing and morale is lower than max possible?

Global <globalScope>::G_FireAffectedSurface (const cBspSurface_t *surface, const fireDef_t *fd)
Such function should check notonly fire - it should be generic function to check surface vulnerability for given damagetype.

Global <globalScope>::G_GetEarnedExperience (abilityskills_t skill, character_t *chr)
Make a formula for this once strength is used in combat.

Global <globalScope>::G_GetTeam (player_t *player)
Check whether there are enough free spawnpoints in all cases

Global <globalScope>::G_MatchEndCheck (void)

count from 0 to get the civilians for objectives

< 2 does not work when we count civilians

Global <globalScope>::G_MatchSendResults (int team)
We have to make sure, that the teaminfo is not completely resent otherwise we would have the same team again and died actors are not taken into account

Global <globalScope>::G_MissionThink (edict_t *self)
not yet working - particle stays active

Global <globalScope>::G_MissionTouch (edict_t *self, edict_t *activator)

use level.nextmap to spawn another map when every living actor has touched the mission trigger

use level.actualRound to determine the 'King of the Hill' time

Global <globalScope>::G_PhysicsStep (edict_t *ent)

Use this function to enable footsteps over network

don't play foot step sounds for flying units.

Global <globalScope>::G_ReactionFireGetTUsForItem (const edict_t *ent, const edict_t *target, const invList_t *invList)
why only right hand?

Global <globalScope>::G_ReactionFireReset (int team)
why do we send the state here and why do we change the "shaken" state? - see G_MoraleBehaviour

Global <globalScope>::G_ShootGrenade (const player_t *player, edict_t *ent, const fireDef_t *fd, const vec3_t from, const pos3_t at, int mask, const item_t *weapon, shot_mock_t *mock, int z_align)
Remove the 2.0f and use gaussian random number instead of crand()

Global <globalScope>::G_ShootSingle (edict_t *ent, const fireDef_t *fd, const vec3_t from, const pos3_t at, int mask, const item_t *weapon, shot_mock_t *mock, int z_align, int i, shoot_types_t shootType)

The random dir-modifier?

need some change to reflect 2x2 units. Also might need a check if the distance is bigger than the one to the impact location.

can't we use the fd->shotOrg here and get rid of the sv_shot_origin cvar?

reduce even more if the wall was hit far away and not close by the shooting actor

Global <globalScope>::G_SplashDamage (edict_t *ent, const fireDef_t *fd, vec3_t impact, shot_mock_t *mock, const trace_t *tr)
splash might also hit other surfaces and the trace doesn't handle that

Global <globalScope>::G_UpdateStunState (int team)
Make this depend on the character-attributes. http://lists.cifrid.net/pipermail/ufoai/2008-February/000346.html

Global <globalScope>::GAME_CP_Drop (void)
maybe create a savegame?

Global <globalScope>::GAME_EndRoundAnnounce (int playerNum, int team)
do we need the team number here? isn't the playernum enough to get the team?

Global <globalScope>::GAME_MP_StartServer_f (void)
implement different ufo and dropship support for multiplayer, too (see skirmish)

Global <globalScope>::GAME_SK_Start_f (void)
make the teamdef configurable

Global <globalScope>::GET_ACC (ab, sk)
Skill-influence needs some balancing.

Global <globalScope>::Grid_Fall (const routing_t *map, const actorSizeEnum_t actorSize, const pos3_t pos)
if an actor can fly, then set this to true.

Global <globalScope>::Grid_MoveMark (const routing_t *map, const pos3_t exclude, const actorSizeEnum_t actorSize, pathing_t *path, const pos3_t pos, byte crouchingState, const int dir, priorityQueue_t *pqueue)

flier should return true if the actor can fly.

has_ladder_support should return true if 1) There is a ladder in the new cell in the specified direction or 2) There is a ladder in any direction in the cell below the new cell and no ladder in the new cell itself.

has_ladder_climb should return true if 1) There is a ladder in the new cell in the specified direction.

falling_height should be replaced with an arbitrary max falling height based on the actor.

actor_height is currently the fixed height of a 1x1 actor. This needs to be adjusted to the actor's actual height, including crouching.

actor_stepup_height should be replaced with an arbitrary max stepup height based on the actor.

Global <globalScope>::Grid_SetMoveData (pathing_t *path, const int x, const int y, const int z, const int c, const byte length, const int dir, const int ox, const int oy, const int oz, const int oc, priorityQueue_t *pqueue)
add heuristic for A* algorithm

Global <globalScope>::HashVec (const vec3_t vec)
Fix this to support the full bsp level bounds

Global <globalScope>::HUD_DisplayFiremodes (const le_t *actor, actorHands_t hand, qboolean firemodesChangeDisplay)
these should probably not be called from other places than menu

Global <globalScope>::HUD_GetLeftHandWeapon (le_t *actor, containerIndex_t *container)
remove me

Global <globalScope>::HUD_PopupFiremodeReservation (qboolean reset, qboolean popupReload)
use components and confuncs here

Global <globalScope>::HUD_RefreshButtons (const le_t *le)
this is called every frames... is this really needed?

Global <globalScope>::HUD_SetWeaponButton (buttonTypes_t button, weaponButtonState_t state)
This should be a confunc which also sets the tooltips

Global <globalScope>::HUD_ShotReserve_f (void)
do this on the server

Global <globalScope>::HUD_SwitchFiremodeList_f (void)
Should be done from within the scripts

Global <globalScope>::HUD_UsableReactionTUs (const le_t *le)
Maybe only return "reaction" value if reaction-state is active? The value _should_ be 0, but one never knows :)

Global <globalScope>::humanAircraftType_t
doesn't belong here, but AIRCRAFTTYPE_MAX is needed for the equipment definitions

Global <globalScope>::I_MoveInInventory (inventoryInterface_t *self, inventory_t *const i, const invDef_t *from, invList_t *fItem, const invDef_t *to, int tx, int ty, int *TU, invList_t **icp)
change the other code to browse trough these things.

Global <globalScope>::I_RemoveFromInventory (inventoryInterface_t *self, inventory_t *const i, const invDef_t *container, invList_t *fItem)
the problem here is, that in case of a move inside the same container the item don't just get updated x and y values but it is tried to remove one of the items => crap - maybe we have to change the inventory move function to check for this case of move and only update the x and y coordinates instead of calling the add and remove functions

Global <globalScope>::IMAGE_WIDTH
Replace magic number 64 by some script definition

Global <globalScope>::Info_ValueForKey (const char *s, const char *key)
Not thread safe

Global <globalScope>::INV_GetFilterFromItem (const objDef_t *obj)
need to implement everything

Global <globalScope>::INV_ItemDescription (const objDef_t *od)

Do we need to add checks for od->isDummy here somewhere?

is there ammo with no firedefs?

Global <globalScope>::INV_ItemMatchesFilter (const objDef_t *obj, const itemFilterTypes_t filterType)

Should we handle FILTER_AIRCRAFT here as well?

I guess we should search for components matching this item here.

Global <globalScope>::INVSH_CheckToInventory (const inventory_t *const i, const objDef_t *ob, const invDef_t *container, const int x, const int y, const invList_t *ignoredItem)
aren't both (equip and floor) temp container?

Global <globalScope>::INVSH_FindSpace (const inventory_t *const inv, const item_t *item, const invDef_t *container, int *const px, int *const py, const invList_t *ignoredItem) __attribute__((nonnull(1)))
optimize for single containers

Global <globalScope>::Irc_Client_CmdRplEndofnames (const char *params, const char *trailing)
Implement me

Global <globalScope>::Irc_Client_Invite_f (void)

get own external ip and remove the 127.0.0.1 nonsense (maybe ask the masterserver for this info?)

Maybe somehow check the version of the client with ctcp VERSION and only send to those, that are connected with ufoai and have a correct version

Global <globalScope>::Irc_Logic_Frame (void)
do this without disconnect, connect

Global <globalScope>::Irc_Proto_Enqueue (const char *msg, size_t msg_len)
strip high bits - or unprintable chars

Global <globalScope>::Irc_Proto_ProcessServerMsg (const irc_server_msg_t *msg)
Skip non printable chars here

Global <globalScope>::Key_Console (int key, int unicode)
use isprint here?

Global <globalScope>::Key_KeynumToString (int keynum)

handle quote special (general escape sequence?)

use isprint here?

Global <globalScope>::Key_Message (int key)
figure out which unicode codes to accept

Global <globalScope>::keyBindings [K_KEY_SIZE]
To support international keyboards nicely, we will need full support for binding to either
  • a unicode value, however achieved
  • a key
  • modifier + key with a priority system to decide which to try first. This will mean that cleverly-hidden punctuation keys will still have their expected effect, even if they have to be pressed as Shift-AltGr-7 or something. At the same time, it allows key combinations to be bound regardless of what their translated meaning is, so that for example Shift-4 can do something with the 4th agent regardless of which punctuation symbol is above the 4.

Global <globalScope>::LE_AddProjectile (const fireDef_t *fd, int flags, const vec3_t muzzle, const vec3_t impact, int normal, le_t *leVictim)
Special particles for stun attack (mind you that there is electrical and gas/chemical stunning)?

Global <globalScope>::LE_PlaySoundFileAndParticleForSurface (le_t *le, const char *textureName)
use the Grid_Fall method (ACTOR_SIZE_NORMAL) to ensure, that the particle is drawn at the ground (if needed - maybe the origin is already ground aligned)

Global <globalScope>::LE_Unlock (le_t *le)
If the event loop ever becomes multithreaded, this should be a real mutex lock.

Global <globalScope>::LEAFNODE
replace this with CONTENTS_NODE?

Global <globalScope>::LET_Projectile (le_t *le)
Special particles for stun attack (mind you that there is electrical and gas/chemical stunning)?

Global <globalScope>::lineChartExtraData_t
add info about axes min-max...

Global <globalScope>::LINEHEIGHT
use the font height?

Global <globalScope>::LIST_Add (linkedList_t **list, const byte *data, size_t length)
Optimize this to not allocate memory for every entry - but use a hunk

Global <globalScope>::LIST_AddPointer (linkedList_t **listDest, void *data)
Optimize this to not allocate memory for every entry - but use a hunk

Global <globalScope>::LIST_AddString (linkedList_t **list, const char *data)
Optimize this to not allocate memory for every entry - but use a hunk

Global <globalScope>::listBlock_t
This block list code is broken in terms of filename order To see the bug reduce the FL_BLOCKSIZE to 1024 and verify the order of the filenames FS_NextScriptHeader gives you - you will see that the last files will be in reversed order

Global <globalScope>::LM_AddToSceneOrder (qboolean parents)
what if the tagent is not rendered due to different level flags?

Global <globalScope>::M_Change_f (void)
Make the music a scriptable list

Global <globalScope>::main (int argc, char **argv)
see https://sourceforge.net/tracker/?func=detail&aid=2993773&group_id=157793&atid=805242

Global <globalScope>::MAP_AngleOfPath3D (const vec3_t start, const vec2_t end, vec3_t direction, vec3_t ortVector)
Save the value angle instead of direction: we don't need a vector here, we could just compare angle to current angle.

Global <globalScope>::MAP_DrawMap (const uiNode_t *node)
I think this check is wrong; isn't zoom clamped to this value already? A value of 3.3 seems about right for me, but this should probably be fixed...

Global <globalScope>::MAP_DrawMapMarkers (const uiNode_t *node)
we should only show healthbar if aircraft is fighting but it's a slow algo

Global <globalScope>::MAP_DrawMapOnePhalanxAircraft (const uiNode_t *node, aircraft_t *aircraft, qboolean oneUFOVisible)

: check why path.numPoints can be sometime equal to -1

we should only show healthbar if aircraft is fighting but it's a slow algo

Global <globalScope>::MAP_GetColor (const vec2_t pos, mapType_t type)
add EQUAL_EPSILON here?

Global <globalScope>::MAP_GetMissionModel (const mission_t *mission)

Should be a special story related mission model

each category should have a its own model

we have two different alienbase models

Global <globalScope>::MAP_MapClick (struct uiNode_s *node, int x, int y)
make this a function in cp_base.c - B_BuildBaseAtPos and make newBasePos static

Global <globalScope>::MAX_CAMPAIGNS
remove this once the uiNode_t usage is cleaned up

Global <globalScope>::MD2SkinEdit (const byte *buf, const char *fileName, int bufSize, void *userData)
: Implement this

Global <globalScope>::MIN_TILE_SIZE
take this datum from the correct place

Global <globalScope>::mn_sequence
client code should manage itself this vars

Global <globalScope>::MS_AddNewMessageSound (const char *title, const char *text, qboolean popup, messageType_t type, struct technology_s *pedia, qboolean playSound)
(menu) Handle translated text - don't use single byte string copy here

Global <globalScope>::MS_LoadXML (mxml_node_t *parent)
is this really meant to depend on DEBUG_ALL with NO individual bit like DEBUG_MSG ??

Global <globalScope>::MSO_LoadXML (mxml_node_t *parent)
(menu) check why this message is not shown anywhere in logs

Global <globalScope>::NAT_SetHappiness (nation_t *nation, const float happiness)
need to more specific message

Global <globalScope>::nationInfo_t
Maybe we should also move the "funding" stuff (see nation_t) in here? It is static right now though so i see no reason to do that yet.

Global <globalScope>::NET_Connect (const char *node, const char *service)
What about a timeout

Global <globalScope>::NET_DatagramBroadcast (struct datagram_socket *s, const char *buf, int len, int port)
This is only sending on the first available device, what if we have several devices?

Global <globalScope>::OF ((unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize))
Describe parameters and the two headers.

Global <globalScope>::OLDEVENTTIME
remove the old event timing

Global <globalScope>::origin

- the updating of the per-entity list of nearest lights doesn't necessarily need to be updated before every frame; if the list is a few frames (or even a few seconds) out of date, it would still probably look just fine. Ideally, this updating could be done in the background by a separate, low-priority thread that constantly looped through all the entities and updated their light lists, while the high-priority rendering thread just used the most up to date version available. The current version isn't really thread-safe because it uses a global variable, which is needed due to the way that the standard qsort() function works, but this would be easy to fix if we used our own sorting algorithm, which we should probably do anyway, since qsort() isn't actually likely to be very efficient given that the ordering of the list isn't likely to change very much between calls. Bubble sort would probably be faster on average.

Global <globalScope>::pcmdData [MAX_PCMD_DATA]
check pcmdData overflow

Global <globalScope>::PicoFindSurfaceVertexNum (picoSurface_t *surface, picoVec3_t xyz, picoVec3_t normal, int numSTs, picoVec2_t *st, int numColors, picoColor_t *color, picoIndex_t smoothingGroup)
needs non-naive algorithm

Global <globalScope>::PLAYER2x2_WIDTH
may need some tweaks.

Global <globalScope>::popupAircraft
Save me why? The popup stuff should be regenerated from the campaign data --mattn

Global <globalScope>::PR_ProductionDecrease_f (void)
add (confirmaton) popup in case storage cannot take all the items we add back to it

Global <globalScope>::PR_ProductionIncrease_f (void)

-) need to popup something like: "You need the following items in order to produce more of ITEM: x of ITEM, x of ITEM, etc..." This info should also be displayed in the item-info. -) can can (if possible) change the 'amount' to a vlalue that _can_ be produced (i.e. the maximum amount possible).

this popup hides any previous popup, like popup created in PR_QueueNew

Global <globalScope>::PR_ProductionListClick_f (void)
left click on spacer should either delete current selection or do nothing, not update visible selection but show old info

Global <globalScope>::PR_QueueNew (base_t *base, production_queue_t *queue, objDef_t *item, aircraft_t *aircraftTemplate, struct storedUFO_s *ufo, signed int amount)

move this check out into a new function

move popup into menucode

move popup into menucode

we should also count aircraft that are already in the queue list

Global <globalScope>::PrecalcNormalsAndTangents (const char *filename)
currently md2 models only have one mesh - for md3 files this would get overwritten for each mesh

Global <globalScope>::ProcessLevel (unsigned int levelnum)
Check what happens if two threads do the memcpy

Global <globalScope>::PruneNodes_r (node_t *node)
free stuff

Global <globalScope>::Qcommon_Init (int argc, const char **argv)
This line wants to be removed

Global <globalScope>::R_AddLight (const vec3_t origin, float radius, const vec3_t color)
- integrate the particle-based lights into the new dynamic light system

Global <globalScope>::R_CleanupDepthBuffer (int x, int y, int width, int height)
can we fix bigZ with a value come from glGet?

Global <globalScope>::R_Draw3DGlobe (int x, int y, int w, int h, int day, int second, const vec3_t rotate, float zoom, const char *map, qboolean disableSolarRender, float ambient, qboolean overlayNation, qboolean overlayXVI, qboolean overlayRadar, image_t *r_xviTexture, image_t *r_radarTexture)
Replace this magic number with some speaking constant

Global <globalScope>::R_DrawBspModelSurfaces (const entity_t *e, const vec3_t modelorg)
This leads to unrendered backfaces for e.g. doors

Global <globalScope>::R_DrawBuffers (int n)
introduce enum or speaking constants for the buffer numbers that are drawn here and elsewhere

Global <globalScope>::R_DrawMaterialSurfaces (mBspSurfaces_t *surfs)
- integrate BSP lighting with dynamic lighting

Global <globalScope>::R_FillArrayData (mAliasModel_t *mod, mAliasMesh_t *mesh, float backlerp, int framenum, int oldframenum, qboolean prerender)
damn slow - optimize this

Global <globalScope>::R_FontAnalyze (const char *name, const char *path, int renderStyle, int size)
Check whether font is already loaded

Global <globalScope>::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)
This could be replaced with a set of much simpler interfaces.

Global <globalScope>::R_FontFindFit (const font_t *f, char *text, int maxlen, int maxWidth, int *widthp)
Smart breaking of Chinese text

Global <globalScope>::R_FontMakeChunks (const font_t *f, const char *text, int maxWidth, longlines_t method, int *lines, qboolean *aborted)
check for infinite recursion here

Global <globalScope>::R_InitExtensions (void)
does opengl 2.0 and later really expose the above extension? the npot support is a must since 2.0

Global <globalScope>::r_lightsArray [MAX_GL_LIGHTS]
- merge this stuff into the new lighitng system using r_light_t objects

Global <globalScope>::R_LoadBspVertexArrays (model_t *mod)

Don't use the buffers from r_state here - they might overflow

Decrease MAX_GL_ARRAY_LENGTH to 32768 again when this is fixed

Global <globalScope>::R_ModelAutoScale (const vec2_t boxSize, modelInfo_t *mi, vec3_t scale, vec3_t center)
Take the rotation info from modelInfo_t into account

Global <globalScope>::R_ModLoadAliasDPMModel (struct model_s *mod, byte *buffer, int bufSize)
Load this into mAliasModel_t structure

Global <globalScope>::R_ModReloadSurfacesArrays (void)
fix this for threaded renderer mode

Global <globalScope>::R_PreprocessShader (const char *name, const char *in, char *out, int len)
(arisian): don't GLSL compilers have built-in preprocessors that can handle this kind of stuff?

Global <globalScope>::R_RunThread (void *p)
- update per-model dynamic light list sorting here

Global <globalScope>::R_SortLightList (r_light_t **list, vec3_t v)
qsort may not be the best thing to use here, given that the ordering of the list usually won't change much (if at all) between calls. Something like bubble-sort might actually be more efficient in practice.

Global <globalScope>::R_StageVertex (const mBspSurface_t *surf, const materialStage_t *stage, const vec3_t in, vec3_t out)
implement this

Global <globalScope>::R_UseFramebuffer (const r_framebuffer_t *buf)
buf != &screenBuffer

Global <globalScope>::racetypes_t
add different robot races.

Global <globalScope>::RADAR_CheckUFOSensored (radar_t *radar, const vec2_t posRadar, const aircraft_t *ufo, qboolean detected)
There is a hardcoded detection probability here
  • this should be scripted. Probability should be a function of UFO type and maybe radar type too.

Global <globalScope>::reserved_tokens []
Use dichotomic search

Global <globalScope>::RS_AssignScientist (technology_t *tech, struct base_s *base, struct employee_s *employee)
make reassign possible with this.

Global <globalScope>::RS_ChangeScientist_f (void)
use the diff as a value, not only as a +1 or -1

Global <globalScope>::RS_InitGUI (base_t *base, qboolean update)
Display free space in all labs in the current base for each item.

Global <globalScope>::RS_InitGUIData (base_t *base)
add missing items, unresearchable items

Global <globalScope>::RS_InitTree (qboolean load)

Add a function to reset ALL research-stati to RS_NONE; -> to be called after start of a new game.

Enhance ammo model display (see comment in code).

Implement me

Global <globalScope>::RS_LoadXML (mxml_node_t *parent)
this should be handled by the mail system

Global <globalScope>::RS_MarkResearched (technology_t *tech, const base_t *base)
Base shouldn't be needed here - check RS_MarkResearchable() for that.

Global <globalScope>::RS_ParseTechnologies (const char *name, const char **text)

use Com_RegisterConstInt();

escape "type weapon/tech/etc.." here

Global <globalScope>::RS_RequirementsMet (const requirements_t *requiredAND, const requirements_t *requiredOR, const base_t *base)
Add support for the "delay" value.

Global <globalScope>::RS_ResearchRun (void)

Needs to check on the exact time that elapsed since the last check of the status.

Just for testing, better formular may be needed. Include employee-skill in calculation.

CHECK THAT: very very strange

Global <globalScope>::RS_ResearchStart_f (void)
If there are enough items add them to the tech (i.e. block them from selling or for other research), otherwise pop an errormessage telling the player what is missing

Global <globalScope>::RS_ResearchStop_f (void)
remove? Popup info how much is already researched?

Global <globalScope>::RS_SaveXML (mxml_node_t *parent)
this should be handled by the mail system

Global <globalScope>::RS_ScriptSanityCheck (void)
error++; Crafts still give errors - are there any definitions missing?

Global <globalScope>::RS_UpdateInfo (const base_t *base)
it can be an assert

Global <globalScope>::RT_AllCellsBelowAreFilled (const routing_t *map, const int actorSize, const pos3_t pos)
see CL_ActorMoveMouse

Global <globalScope>::RT_TraceOnePassage (mapTiles_t *mapTiles, const routing_t *map, const actorSizeEnum_t actorSize, place_t *from, place_t *to, opening_t *opening, const char **list)
CELL_HEIGHT can be replaced with the largest actor height.

Global <globalScope>::S_Init (void)
implement the volume change for already loaded sample chunks

Global <globalScope>::SCR_UpdateScreen (void)
Not really need, the menu can do the job

Global <globalScope>::SelectSplitSide (bspbrush_t *brushes, node_t *node)
This will overflow if numsides is bigger than 6

Global <globalScope>::SEQ_Render2D (sequenceContext_t *context)

We need this check - but this does not work

use this for some nice line spacing

Global <globalScope>::sequences [MAX_SEQUENCES]
move it to cls?

Global <globalScope>::SP_civilian_start (edict_t *ent)
Does anybody know _why_ this is set to 99?

Global <globalScope>::SP_civilian_target (edict_t *ent)
These waypoints should be placeable by the human player (e.g. spawn a special particle on the waypoint) to direct the civilians to a special location

Global <globalScope>::SP_light (const localEntityParse_t *entData)
Add the lights

Global <globalScope>::SP_misc_model (edict_t *ent)
is fieldsize and forbidden list update really needed here?

Global <globalScope>::SP_player_start (edict_t *ent)
Wrong place here

Global <globalScope>::SP_worldspawn (const localEntityParse_t *entData)
- make sun position/color vary based on local time at location?

Global <globalScope>::SplitBrush (const bspbrush_t *brush, int planenum, bspbrush_t **front, bspbrush_t **back)

Print brush and entnum either of the brush that was splitted or the plane that was used as splitplane

Print brush and entnum either of the brush that was split or the plane that was used as splitplane

Print brush and entnum either of the brush that was splitted or the plane that was used as splitplane

Print brush and entnum either of the brush that was splitted or the plane that was used as splitplane

Global <globalScope>::SV_MapcycleAdd (const char *mapName, qboolean day, const char *gameType)
check for maps and valid gametypes here

Global <globalScope>::SV_ModLoadObjModel (sv_model_t *mod, const byte *buffer, int bufferLength)
implement me

Global <globalScope>::SV_ParallelSearch (mapInfo_t *map)
Maybe we also need to reduce the timeout value a bit every time it succeeds?

Global <globalScope>::SV_Trace (const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, const edict_t *passedict, int contentmask)
There is more than one world in case of a map assembly - use clip.trace.mapTile to get the correct one

Global <globalScope>::Sys_TTYConsoleShow (void)
need to position the cursor if needed?

Global <globalScope>::Sys_TTYDeleteCharacter (void)
there may be a way to find out if '' alone would work though

Global <globalScope>::td
move this into ccs_t

Global <globalScope>::testConnection (void)

use a special testmap

implement the test

Global <globalScope>::Touch_HurtTrigger (edict_t *self, edict_t *activator)
Handle dazed via trigger_hurt

Global <globalScope>::TR_BoxTrace (TR_TILE_TYPE *tile, const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, const int headnode, const int brushmask, const int brushreject, const float fraction)
Would Interpolating aend to traceData.fraction and passing traceData.fraction instead of 1.0 make this faster?

Global <globalScope>::TR_CargoListSelect_f (void)
not ccs.numEmployees? isn't this (the td.trEmployeesTmp array) updated when an employee gets deleted?

Global <globalScope>::TR_ClipBoxToBrush (boxtrace_t *traceData, cBspBrush_t *brush, TR_LEAF_TYPE *leaf)
special case for axial

Global <globalScope>::TR_EmptyTransferCargo (base_t *destination, transfer_t *transfer, qboolean success)
If source base is destroyed during transfer, aircraft doesn't exist anymore. aircraftArray should contain pointers to aircraftTemplates to avoid this problem, and be removed from source base as soon as transfer starts

Global <globalScope>::TR_GetTransferEmployee (employeeType_t emplType, int *cnt, const base_t *base, int num)
we have to decide what to do if the check fails - there are hard failures, and soft ones - soft ones should continue to add the next employee type

Global <globalScope>::TR_TestBoxInBrush (boxtrace_t *traceData, cBspBrush_t *brush)
special case for axial

Global <globalScope>::TR_TransferAliensFromMission_f (void)

tooltip assigining wrong here, also ui doesn't yet support tooltip on options

send a message (?)

Global <globalScope>::TR_TransferCheck (void)
make it TR_Remove()

Global <globalScope>::TR_TransferEnd (transfer_t *transfer)
what if source base is lost? we won't be able to unhire transfered employees.

Global <globalScope>::TR_TransferStart (base_t *srcBase, struct transferData_s *transData)
This doesn't work - it would require to store the aliens as the first entries in the teamDef array - and this is not guaranteed. The alienAmount array may not contain more than numAliensTD entries though

Global <globalScope>::UFO_CampaignCheckEvents (void)
present a popup with possible orders like: return to base, attack the ufo, try to flee the rockets

Global <globalScope>::UFO_SearchAircraftTarget (aircraft_t *ufo)
present a popup with possible orders like: return to base, attack the ufo, try to flee the rockets

Global <globalScope>::UI_AbstractOptionGetFirstOption (uiNode_t *node)
check versionId and update cached data, and fire events

Global <globalScope>::UI_AddListener (struct uiNode_s *node, const value_t *property, struct uiNode_s *functionNode)
It is a hack, we should remove that

Global <globalScope>::UI_AllocNode (const char *name, const char *type, qboolean isDynamic)
Assert out when we are not in parsing/loading stage

Global <globalScope>::UI_AllocNodeWithoutNew (const char *name, const char *type, qboolean isDynamic)

Assert out when we are not in parsing/loading stage

fix this hard coded '8' value

Global <globalScope>::UI_AllocStaticColor (int count) __attribute__((warn_unused_result))
Assert out when we are not in parsing/loading stage

Global <globalScope>::UI_AllocStaticFloat (int count) __attribute__((warn_unused_result))
Assert out when we are not in parsing/loading stage

Global <globalScope>::UI_AllocStaticIcon (const char *name) __attribute__((warn_unused_result))

Assert out when we are not in parsing/loading stage

understand why we must hide this assert in release build with mingw

Global <globalScope>::UI_AllocStaticString (const char *string, int size) __attribute__((warn_unused_result))
Assert out when we are not in parsing/loading stage

Global <globalScope>::UI_BaseMapNodeDraw (uiNode_t *node)
we should not compute here if we can (or not build something) the map model know it better

Global <globalScope>::UI_ButtonNodeDraw (uiNode_t *node)

need custom color when button is disabled

should we move it according to the text align?

Global <globalScope>::UI_CaptureDrawOver (struct uiNode_s *node)
it can be better to capture the draw over only one time (need new event like mouseEnter, mouseLeave)

Global <globalScope>::UI_CheckCvar (const cvar_t *cvar)
move it into a better file

Global <globalScope>::UI_CloneNode (const uiNode_t *node, uiNode_t *newWindow, qboolean recursive, const char *newName, qboolean isDynamic)

exclude rect is not safe cloned.

actions are not cloned. It is be a problem if we use add/remove listener into a cloned node.

Global <globalScope>::UI_CloseWindowByRef (uiNode_t *window)

Find better name

If the focus is not on the window we close, we don't need to remove it

Global <globalScope>::UI_ColumnLayout (uiNode_t *node)
Use child to align each nodes inside respective cell.

Global <globalScope>::UI_ContainerItemIteratorNext (containerItemIterator_t *iterator)
not sure its the right check

Global <globalScope>::UI_ContainerNodeAutoPlace (uiNode_t *node, int mouseX, int mouseY)

Not generic function. Not sure we can do it in a generic way

Merge it with node container, bad code but it is worst to have copy-paste of it

None generic function. Not sure we can do it in a generic way

Global <globalScope>::UI_ContainerNodeDNDFinished (uiNode_t *source, qboolean isDropped)

Is filterEquipType needed here?, we can use anyway INVSH_SearchInInventory if we disable dragInfoFromX/Y when we start DND

We must split the move in two. Here, we should not know how to add the item to the target (see dndDrop)

Global <globalScope>::UI_ContainerNodeGetExistingItem (const uiNode_t *node, objDef_t *item, const itemFilterTypes_t filterType)

Remove filter it is not a generic concept, and here it mean nothing

Remove filter it is not a generic concept, and here it mean nothing

Global <globalScope>::UI_ContainerNodeLoaded (uiNode_t *const node)
find a better way to add more equip node, without this hack

Global <globalScope>::UI_ContainerNodeUpdateEquipment (inventory_t *inv, equipDef_t *ed)

it's not obvious for the caller that ui_inventory pointer must be set

dont use, and dont called by the container node; should we move it outside?

Global <globalScope>::UI_CustomButtonNodeDraw (uiNode_t *node)
need custom color when button is disabled

Global <globalScope>::UI_DebugMode (void)
move it into a better file

Global <globalScope>::UI_DeleteNode (uiNode_t *node)
We must delete all EA_LISTENER too

Global <globalScope>::UI_DeleteWindowFromStack (uiNode_t *window)
Why dont we call onClose?

Global <globalScope>::UI_DrawIconInBox (const uiIcon_t *icon, uiIconStatus_t status, int posX, int posY, int sizeX, int sizeY)

use named const for status

Add warning

merge all this cases

Global <globalScope>::UI_DrawItem (uiNode_t *node, const vec3_t org, const item_t *item, int x, int y, const vec3_t scale, const vec4_t color)

Change the rotation of the image as well, right now only the location is changed. How is image-rotation handled right now?

Image size calculation depends on handling of image-rotation. imgWidth = od->sy * C_UNIT; imgHeight = od->sx * C_UNIT;

Global <globalScope>::UI_DrawModelNode (struct uiNode_s *node, const char *source)
need to merge UI model case, and the common case (look to be a copy-pasted code)

Global <globalScope>::UI_DrawNode (uiNode_t *node)

remove it when its possible: we can create a 'box' node with this properties, but we often don't need it

move it at the right position

move it at the right position

Global <globalScope>::UI_DrawNotice (void)
Move it into Window node, and/or convert it in a reserved named string node and update the protocol

Global <globalScope>::UI_DrawPanel (const vec2_t pos, const vec2_t size, const char *texture, int texX, int texY, const int panelDef[6])

can we improve the code? is it need?

merge texX and texY here

Global <globalScope>::UI_DrawStringInBox (const char *fontID, align_t align, int x, int y, int width, int height, const char *text, longlines_t method)

remove the use of UI_DrawString

test the code for multiline?

fix problem with truncation (maybe problem into UI_DrawString)

Global <globalScope>::UI_EKGNodeDraw (uiNode_t *node)

this magic number should be replaced with a sane calculation of the value

these cvars should come from the script

code is duplicated in the image node code

Global <globalScope>::UI_ExecuteAction (const uiAction_t *action, uiCallContext_t *context)
Skipping actions like that is a bad way. the function should return the next action, or we should move IF,ELSE,ELIF... in a IF block and not interleave it with default actions

Global <globalScope>::UI_FireInit_f (void)
replace that by a common action "call *ufopedia.init"

Global <globalScope>::UI_FocusExecuteActionNode (void)

need a cleanup

need a cleanup

Global <globalScope>::UI_FocusNextActionNode (void)
need a cleanup

Global <globalScope>::UI_FuncNodeLoaded (uiNode_t *node)

special cases should be managed as a common property event of the parent node

move this code into the parser (it should not create a node)

Global <globalScope>::UI_GenAllRadarMapRelease_f (void)
allow to call UI_TimerRelease into timer callback

Global <globalScope>::UI_GetActiveRenderRect (int *x, int *y, int *width, int *height)
the better way is to add a 'battlescape' node

Global <globalScope>::UI_GetFloatFromExpression (uiAction_t *expression, const uiCallContext_t *context)
do we have some check to do?

Global <globalScope>::UI_GetNodeInTreeAtPosition (uiNode_t *node, int rx, int ry)
we should improve the loop (last-to-first)

Global <globalScope>::UI_GetPath (const uiNode_t *node) __attribute__((warn_unused_result))
we can use something faster than cat

Global <globalScope>::UI_GetRadarMapInFrameBuffer (int *x, int *y, int *width, int *height)
fix that function, map is not well captured

Global <globalScope>::UI_GetReferenceFloat (const uiNode_t *const node, const void *ref)

maybe this code is never used

need a full rework

Global <globalScope>::UI_GetReferenceString (const uiNode_t *const node, const char *ref)

we should review this code, '*' doesn't work very well for all the needed things

need a full rework

Global <globalScope>::UI_GetStringFromExpression (uiAction_t *expression, const uiCallContext_t *context)

this should not work very well, because too much va are used then we should locally cache values, or manage a temporary string structure

should we add a delta?

should we add a delta?

should we add a delta?

Global <globalScope>::UI_ImageNodeDraw (struct uiNode_s *node)

Center image, or use textalign property

convert all pic using mousefx into button.

delete mousefx

code is duplicated in the ekg node code

convert all pic using mousefx into button.

delete mousefx

Global <globalScope>::UI_Init (void)

not sure it is a ui var

should be a client Cvar, not a ui

Global <globalScope>::UI_InitializeNodeBehaviour (uiBehaviour_t *behaviour)

check (when its possible) properties are ordered by name

not possible at the moment, not sure its the right way

not possible at the moment, not sure its the right way

Global <globalScope>::UI_InitModelInfoView (uiNode_t *node, modelInfo_t *mi, uiModel_t *model)
the param "model" is not used !?

Global <globalScope>::UI_InitOptionIteratorAtIndex (int index, struct uiNode_s *option, uiOptionIterator_t *iterator)
Rework that code, we should split "Init" and "AtIndex"

Global <globalScope>::UI_InitRawActionValue (uiAction_t *action, uiNode_t *node, const value_t *property, const char *string)

remove node param and catch error where we call that function

we should hide use of ui_global.curadata

Global <globalScope>::UI_InitStack (const char *activeWindow, const char *mainWindow, qboolean popAll, qboolean pushActive)

remove Cvar_Set we have direct access to the cvar

check why activeWindow can be NULL. It should never be NULL: a stack must not be empty

We should only call it a very few time. When we switch from/to this different par of the game: main-option-interface / geoscape-and-base / battlescape

Update the code: popAll should be every time true

Update the code: pushActive should be every time true

Illustration about when/how we should use UI_InitStack http://ufoai.ninex.info/wiki/index.php/Image:UI_InitStack.jpg

Global <globalScope>::UI_InitWindows (void)
move it outside

Global <globalScope>::ui_inventory
need refactoring to remove, reduce use... of that var Global access to many node content like that is very bad.

Global <globalScope>::UI_ItemNodeDraw (uiNode_t *node)
we should not use DrawItem but draw the image with render function (remove dependency with container)

Global <globalScope>::UI_KeyBindingNodeDraw (uiNode_t *node)
check that this is a keybinding value (with macro expansion)

Global <globalScope>::UI_KeyBindingNodeKeyPressed (uiNode_t *node, unsigned int key, unsigned short unicode)

what about macro expansion?

ensure that the binding for the key command is not executed

Global <globalScope>::UI_KeyPressed (unsigned int key, unsigned short unicode)
think about what we should do when the mouse is captured

Global <globalScope>::UI_LeftClick (int x, int y)

need to refactoring it with the focus code (cleaner)

at least should be moved on the mouse down event (when the focus should change)

Global <globalScope>::UI_MapInfo (int step)
Skip special map that start with a '.' (e.g. .baseattack)

Global <globalScope>::UI_MaterialEditorNodeDraw (uiNode_t *node)
do it incremental. Don't need all this math

Global <globalScope>::UI_MAX_SMALLTEXTLEN
we should delete it, UI script support random text size

Global <globalScope>::UI_MessageGetIcon (const message_t *message)

do not hard code icons

cache icon result

Global <globalScope>::UI_MouseDown (int x, int y, int button)
should be send this event when the mouse up (after a down on the same node)

Global <globalScope>::UI_MouseMove (int x, int y)
we can remove that loop with an array allocation

Global <globalScope>::UI_NodeSetPropertyFromActionValue (uiNode_t *node, const value_t *property, const uiCallContext_t *context, uiAction_t *value)

refactoring it to remove "context", we should only call that function when the action value is a leaf (then a value, and not an expression)

we should improve if when the prop is a boolean/int/float

Global <globalScope>::UI_OptionNodeRemoveHigherOption (uiNode_t **option)
option should start with '_' if we need to translate it

Global <globalScope>::UI_OptionNodeSortOptions (struct uiNode_s *node)
the sort option should do it itself

Global <globalScope>::UI_OptionTreeNodeGetFirstOption (uiNode_t *node)

we should remove this call loop

check versionId and update cached data, and fire events

Global <globalScope>::UI_OptionTreeSetSelectedValue (uiNode_t *node, const uiCallContext_t *context)
merge that into the Init iterator function

Global <globalScope>::UI_ParseActionList (uiNode_t *node, const char **text, const const char **token)

need cleanup, compute action out of the final memory; reduce number of var

better to append the action after initialization

Global <globalScope>::UI_ParseExcludeRect (uiNode_t *node, const char **text, const char **token, const char *errhead)
move it into a property array

Global <globalScope>::UI_ParseNode (uiNode_t *parent, const char **text, const char **token, const char *errhead)

we can think about merging UI_ParseNodeProperties here

move it into caller

Global <globalScope>::UI_ParseProperty (void *object, const value_t *property, const char *objectName, const char **text, const char **token)

don't read the next token (need to change the script language)

check for the moment its not a cvar

Global <globalScope>::UI_ParseValueExpression (const char **text)

when it is possible, we must check range of param id

We MUST remove the OLD code as fast as possible

use a better check - e.g. Com_ParseValue with V_INT or V_FLOAT

Global <globalScope>::UI_PoolAllocAction (uiAction_t **action, int type, const void *data)
we should create a function to free the memory. We can use a tag in the Mem_PoolAlloc calls and use use Mem_FreeTag.

Global <globalScope>::UI_RadarNodeDraw (uiNode_t *node)

Show frustum view area for actors (

use the same coef for x and y

Global <globalScope>::UI_RadarNodeDrawItem (const le_t *le, const vec3_t pos)
We can merge actor and items draw function

Global <globalScope>::UI_RadioButtonNodeActivate (uiNode_t *node)
the parser should already check that the property value is a right cvar

Global <globalScope>::UI_RadioButtonNodeDraw (uiNode_t *node)
need to implement image. We can't do everything with only one icon (or use nother icon)

Global <globalScope>::UI_ReadNodePath (const char *path, const uiNode_t *relativeNode, uiNode_t **resultNode, const value_t **resultProperty)
find a way to fix the bad cast. only here to remove "discards qualifiers" warning

Global <globalScope>::UI_RegisterAbstractNode (uiBehaviour_t *)
move it into common?

Global <globalScope>::UI_RegisterImageNode (struct uiBehaviour_s *behaviour)
rename it according to the function name when its possible

Global <globalScope>::UI_ReleaseVariable (uiValue_t *variable)
most of cases here are useless, it only should be EA_VALUE_STRING

Global <globalScope>::UI_SelectBoxNodeCapturedMouseMove (uiNode_t *node, int x, int y)
we can remove the loop if we save the current element in the node

Global <globalScope>::UI_SetCvar (const char *name, const char *str, float value)
move it into a better file

Global <globalScope>::UI_SetKeyBinding (const char *path, int key)

check: only one binding per nodes

check: key per window must be unique

check: key used into UI_KeyPressed can't be used

Global <globalScope>::UI_SetNewWindowPos (uiNode_t *window, int x, int y)

remove that

move it on m_nodes, its a common getter/setter

Global <globalScope>::UI_StarLayout (struct uiNode_s *node)
Tag it static when it is possible

Global <globalScope>::UI_TabNodeDraw (uiNode_t *node)

this dont work when an option is hidden

fontWidth can be =0, maybe a bug from the font cache

Global <globalScope>::UI_TabNodeInit (uiNode_t *node)
move cvar check to AbstractOption

Global <globalScope>::UI_TabNodeTabAtPosition (const uiNode_t *node, int x, int y)

improve test when we are on a junction

improve test when we are on a chopped tab

this dont work when an option is hidden

Global <globalScope>::UI_TextEntryNodeDraw (uiNode_t *node)

need custom color when node is disabled

we don't need to edit the text to draw the cursor

Global <globalScope>::UI_TextListNodeRightClick (uiNode_t *node, int x, int y)
we should delete that function

Global <globalScope>::UI_TextNodeDrawText (uiNode_t *node, const char *text, const linkedList_t *list, qboolean noDraw)

verry big, what about static, rendering is not multi threaded

what about multiline text that should be highlighted completely?

Global <globalScope>::UI_Translate_f (void)

overflow check

overflow check

Global <globalScope>::UI_WindowNodeAddIndexedNode (struct uiNode_s *const node, struct uiNode_s *const child)
display a warning, we must not override a node name here

Global <globalScope>::UI_WindowNodeClone (const uiNode_t *source, uiNode_t *clone)
anyway we should remove soon renderNode

Global <globalScope>::UI_WindowNodeClose (uiNode_t *node)
we can move generic code into abstract node

Global <globalScope>::UI_WindowNodeDoLayout (uiNode_t *node)
check and fix here window outside the screen

Global <globalScope>::UI_WindowNodeDraw (uiNode_t *node)

it should be over the window

why not using glClear here with glClearColor set to black here?

Global <globalScope>::UI_WindowNodeInit (uiNode_t *node)
we can move generic code into abstract node

Global <globalScope>::UI_WindowNodeLoaded (uiNode_t *node)

Once image_t is known on the client, use image->width resp. image->height here

Once image_t is known on the client, use image->width resp. image->height here

Global <globalScope>::UI_WindowNodeRegisterKeyBinding (struct uiNode_s *window, struct uiKeyBinding_s *binding)
Rework that function to remove possible wrong use of that function

Global <globalScope>::uiTimer_t
We can use void* for the owner type, and allow to use it outside nodes

Global <globalScope>::UP_AircraftDescription (const technology_t *tech)
Display crippled info and pre-research text here

Global <globalScope>::UP_AircraftItemDescription (const objDef_t *item)
Don't display things like speed for base defence items - a missile facility isn't getting slower or faster due a special weapon or ammunition

Global <globalScope>::UP_DisplayTechTree (const technology_t *t)

Add support for "requireAND"

re-iterate trough logic blocks (i.e. append the tech-names it references recursively)

If it is one (a logic tech) we may want to re-iterate from its requirements?

Global <globalScope>::UP_TechTreeClick_f (void)
The "num" value and the link-index will most probably not match.

Global <globalScope>::UP_UGVDescription (const ugv_t *ugvType)

make me shiny

Display crippled info and pre-research text here

Global <globalScope>::US_LoadXML (mxml_node_t *p)
this is for old saves now only

Global <globalScope>::UTF8_char_len (unsigned char c)
Using this does not solve the truncation problem in case of decomposed characters. For example a code for "a" followed by a code for "put dots above previous character: the "a" will be reported as a character of length 1 by this function, even though the code that follows is part of its visual appearance and should not be cut off separately. Fortunately decomposed characters are rarely used.

Global <globalScope>::V_UI_MASK
we should split/flag parse type (type need only 1 lex; and other)

Global <globalScope>::VectorNormalize (vec3_t v)

Global <globalScope>::VectorNormalize2 (const vec3_t v, vec3_t out)

Global <globalScope>::VID_Restart_f (void)

only reload the skins, not all models

going back into the map isn't working as long as GAME_ReloadMode is called

Global aircraftProjectile_s::idx
: is this really needed?

Global base_s::aircraft
move aircraft out from base structure

Global base_s::map [BASE_SIZE][BASE_SIZE]
maybe integrate BASE_INVALID_SPACE and BASE_FREE_SPACE here?

Global BrushInstance::BrushInstance (const scene::Path &path, scene::Instance *parent, Brush &brush)
Make this work with instancing.

Global ccs_s::baseAction
move into the base node extra data

Global ccs_s::selectedMission
make this a union?

Class cgame_import_t
define the import interface

Global chrScoreGlobal_s::experience [SKILL_NUM_TYPES+1]
What are the mins and maxs for these values

Global chrScoreMission_s::kills [KILLED_NUM_TYPES]
use existing code

Global chrScoreMission_s::skillKills [SKILL_NUM_TYPES]
Check HEALING of others.

Global client_state_s::numMapParticles
make this private to the particle code

File cp_airfight.c
Somehow i need to know which alien race was in the ufo we shoot down I need this info for spawning the crash site

File cp_messageoptions_callbacks.c
Remove direct access to nodes

File cp_overlay.c
update the alpha values for radar like the ones for the xvi map - it's much faster like this

File cp_research.c
comment on used global variables.

File cp_transfer.c
Remove direct access to nodes

File cp_ufopedia.c

Split the mail code into cl_mailclient.c/h

Remove direct access to nodes

Global csi_s::damStunGas
Maybe even make a differentiation between aliens/humans here?

Global dateLong_s::hour
check what number-range this gives)

Global descriptions_s::usedDescription
Check if we should set this in the function that updates the research_proposals? Currently it's only in RS_GetDescription.

Global edict_s::STUN

How is this handled after mission-end?

How is this checked to determine the stun-state? (I've found HP<=STUN in g_combat.c:G_Damage)

Global employee_s::transfer
make use of this wherever needed.

Global EntityClassAttribute::m_description
use this as tooltip in entityinspector?

Class EntityClassScanner
remove this - we will only support the entities.ufo from base/ufos

Global le_s::fieldSize
future thoughts: maybe define this in team_*.ufo files instead and use le->teamdef->fieldsize

Global level_locals_t::nextmap [MAX_QPATH]
Spawn the new map after the current one was ended

Global mapData_s::reroute [ACTOR_MAX_SIZE][PATHFINDING_WIDTH][PATHFINDING_WIDTH]
not threadsafe

Global MemStream::printf (const char *,...)
implement on MemStream

Global ogmCinematic_t::videoStreamIsXvid
atm there isn't really a check for this (all "video" streams are handled as xvid, because xvid support more than one "subtype")

Global production_s::aircraft
Is there any way to make this const without cp_produce.c to break?

Global production_s::item
Make this a union

Global production_s::production
remove production flag

File q_shared.h
Apparently included by every file - unnecessary?

Class Renderer
This class probably doesn't need to be a state machine, convert it to a single submit method with necessary parameters.

Global routing::EDirection
perhaps it would be better to have an extended enum/class for direction which provides the rotate arrow, the order here is another than the one in routing data

Global routing::RoutingLump::add (const RoutingLumpEntry &dataEntry)
check whether this function should be private

Class ScopedArchiveBuffer
move somewhere else

File scriplib.c
Remove this and use parse.c

Global shot_mock_t::self
incorrect actor facing or shotOrg, or bug in trace code?

File sv_clientstub.c
Calls to functions not required by the dedicated server should be surrounded by the DEDICATED_ONLY macro.

Global TargetKeys::readTargetKey (const std::string &key, std::size_t &index)
optimize string operation

Global technology_s::delay
Number in days the system should wait until the tech is available for research. Starting from the first time all other dependencies have been fulfilled and counting only if a day has passed and they still are met.

File ui_data.h
clean up the interface

File ui_node_abstractscrollable.c
use this interface into every scrollable node

File ui_node_baseinventory.c

Move base container list outside

Move container role outside of the node name

Link soldier container with a soldier

Link base container with a base

Link floor container with a map/cell...

File ui_node_button.c

add an icon if possible.

implement clicked button when its possible.

allow auto size (use the size need looking string, problem when we change language)

File ui_node_container.c

Move base container list outside

Move container role outside of the node name

Link soldier container with a soldier

Link base container with a base

Link floor container with a map/cell...

File ui_node_controls.c
Remove it. Window node can manage itself dragging.

File ui_node_messagelist.c
add getter/setter to cleanup access to extradata from cl_*.c files (check "u.text.")

File ui_node_optionlist.c
manage disabled option

File ui_node_optiontree.c
manage disabled option

File ui_node_panel.c
clean up all properties

File ui_node_selectbox.c

manage disabled option

manage disabled option

File ui_node_special.c
Find a way to remove the zone called "render". Create a node for the battlescape?

File ui_node_tab.c
auto tooltip for chopped options

File ui_node_text.c
add getter/setter to cleanup access to extradata from cl_*.c files (check "u.text.")

File ui_node_text2.c
add getter/setter to cleanup access to extradata from cl_*.c files (check "u.text2.")

File ui_node_textentry.c

allow to edit text without any cvar

add a custom max size

File ui_node_video.c

add function to play/stop/pause

fix fullscreen, looped video

event when video end

function to move the video by position

function or cvar to know the video position

cvar or property to know the size of the video

File ui_node_vscrollbar.c

implement disabled

robustness

File ui_node_window.c
move it as an inheritance of panel bahaviour?

File ui_parse.c

remove all "token" param from function and use Com_UnParseLastToken

reduce use of uiGlobal (create global functions to add/get/... entities)

Global uiAction_s::terminal
Define the "sometimes"

Global uiNode_s::excludeRect
use a linked list of excluderect?

Global uiNode_s::num
delete it

Global uiNode_s::textalign
needs cleanup

Global windowExtraData_t::onInit
think about converting it to action instead of node

Global windowExtraData_t::renderNode
we can remove it if we create a node for the battlescape

Generated by  doxygen 1.6.2