changeset 10127 | 7f29a65aa1e4 |
parent 10122 | cefede760264 |
child 10129 | cd2a64a1f4aa |
10126:2fa3bb7785ee | 10127:7f29a65aa1e4 |
---|---|
226 |
226 |
227 function lc_showmission(L : Plua_State) : LongInt; Cdecl; |
227 function lc_showmission(L : Plua_State) : LongInt; Cdecl; |
228 begin |
228 begin |
229 if lua_gettop(L) = 5 then |
229 if lua_gettop(L) = 5 then |
230 begin |
230 begin |
231 ShowMission(lua_tostring(L, 1), lua_tostring(L, 2), lua_tostring(L, 3), lua_tointeger(L, 4), lua_tointeger(L, 5)); |
231 ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), lua_tointeger(L, 4), lua_tointeger(L, 5)); |
232 end |
232 end |
233 else |
233 else |
234 LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L)); |
234 LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L)); |
235 lc_showmission:= 0; |
235 lc_showmission:= 0; |
236 end; |
236 end; |
306 end; |
306 end; |
307 |
307 |
308 function lc_addcaption(L : Plua_State) : LongInt; Cdecl; |
308 function lc_addcaption(L : Plua_State) : LongInt; Cdecl; |
309 begin |
309 begin |
310 if lua_gettop(L) = 1 then |
310 if lua_gettop(L) = 1 then |
311 AddCaption(lua_tostring(L, 1), cWhiteColor, capgrpMessage) |
311 AddCaption(lua_tostringA(L, 1), cWhiteColor, capgrpMessage) |
312 else if lua_gettop(L) = 3 then |
312 else if lua_gettop(L) = 3 then |
313 begin |
313 begin |
314 AddCaption(lua_tostring(L, 1), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3))); |
314 AddCaption(lua_tostringA(L, 1), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3))); |
315 end |
315 end |
316 else |
316 else |
317 LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L)); |
317 LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L)); |
318 lc_addcaption:= 0; |
318 lc_addcaption:= 0; |
319 end; |
319 end; |
845 begin |
845 begin |
846 hh:= team^.Hedgehogs[j]; |
846 hh:= team^.Hedgehogs[j]; |
847 if (hh.Gear <> nil) or (hh.GearHidden <> nil) then |
847 if (hh.Gear <> nil) or (hh.GearHidden <> nil) then |
848 begin |
848 begin |
849 FreeTexture(hh.NameTagTex); |
849 FreeTexture(hh.NameTagTex); |
850 hh.NameTagTex:= RenderStringTex(hh.Name, clan^.Color, fnt16); |
850 hh.NameTagTex:= RenderStringTex(ansistring(hh.Name), clan^.Color, fnt16); |
851 RenderHealth(hh); |
851 RenderHealth(hh); |
852 end; |
852 end; |
853 end; |
853 end; |
854 FreeTexture(team^.NameTagTex); |
854 FreeTexture(team^.NameTagTex); |
855 team^.NameTagTex:= RenderStringTex(clan^.Teams[i]^.TeamName, clan^.Color, fnt16); |
855 team^.NameTagTex:= RenderStringTex(ansistring(clan^.Teams[i]^.TeamName), clan^.Color, fnt16); |
856 end; |
856 end; |
857 |
857 |
858 clan^.HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, clan^.Teams[0]^.NameTagTex^.h, clan^.Color); |
858 clan^.HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, clan^.Teams[0]^.NameTagTex^.h, clan^.Color); |
859 end; |
859 end; |
860 |
860 |
896 if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then |
896 if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then |
897 begin |
897 begin |
898 gear^.Hedgehog^.Team^.TeamName := lua_tostring(L, 2); |
898 gear^.Hedgehog^.Team^.TeamName := lua_tostring(L, 2); |
899 |
899 |
900 FreeTexture(gear^.Hedgehog^.Team^.NameTagTex); |
900 FreeTexture(gear^.Hedgehog^.Team^.NameTagTex); |
901 gear^.Hedgehog^.Team^.NameTagTex:= RenderStringTex(gear^.Hedgehog^.Team^.TeamName, gear^.Hedgehog^.Team^.Clan^.Color, fnt16); |
901 gear^.Hedgehog^.Team^.NameTagTex:= RenderStringTex(ansistring(gear^.Hedgehog^.Team^.TeamName), gear^.Hedgehog^.Team^.Clan^.Color, fnt16); |
902 end |
902 end |
903 else |
903 else |
904 lua_pushnil(L); |
904 lua_pushnil(L); |
905 end; |
905 end; |
906 lc_sethogteamname:= 1 |
906 lc_sethogteamname:= 1 |
941 if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then |
941 if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then |
942 begin |
942 begin |
943 gear^.Hedgehog^.Name:= lua_tostring(L, 2); |
943 gear^.Hedgehog^.Name:= lua_tostring(L, 2); |
944 |
944 |
945 FreeTexture(gear^.Hedgehog^.NameTagTex); |
945 FreeTexture(gear^.Hedgehog^.NameTagTex); |
946 gear^.Hedgehog^.NameTagTex:= RenderStringTex(gear^.Hedgehog^.Name, gear^.Hedgehog^.Team^.Clan^.Color, fnt16) |
946 gear^.Hedgehog^.NameTagTex:= RenderStringTex(ansistring(gear^.Hedgehog^.Name), gear^.Hedgehog^.Team^.Clan^.Color, fnt16) |
947 end |
947 end |
948 end; |
948 end; |
949 lc_sethogname:= 0; |
949 lc_sethogname:= 0; |
950 end; |
950 end; |
951 |
951 |