Skip to content

Commit

Permalink
ACS|Cleanup: Use Uri_NewWithPath3
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 29, 2014
1 parent 296bacb commit cefbff4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions doomsday/plugins/hexen/src/acscript.cpp
Expand Up @@ -83,7 +83,7 @@ struct BytecodeScriptInfo
int argCount;

// Current state:
/// @todo Move to a separate array, in Interpreter
/// @todo Move to a separate array, in ACScriptInterpreter
ACScriptState state;
int waitValue;
};
Expand Down Expand Up @@ -1142,8 +1142,8 @@ ACS_COMMAND(PolyWaitDirect)

ACS_COMMAND(ChangeFloor)
{
Uri *uri = Uri_NewWithPath2("Flats:", RC_NULL);
Uri_SetPath(uri, Str_Text(Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(S_POP())))));
AutoStr *path = Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(S_POP())));
Uri *uri = Uri_NewWithPath3("Flats", Str_Text(path));

Material *mat = (Material *) P_ToPtr(DMU_MATERIAL, Materials_ResolveUri(uri));
Uri_Delete(uri);
Expand All @@ -1169,8 +1169,8 @@ ACS_COMMAND(ChangeFloorDirect)
{
int tag = LONG(*S_PCODEPTR++);

Uri *uri = Uri_NewWithPath2("Flats:", RC_NULL);
Uri_SetPath(uri, Str_Text(Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(LONG(*S_PCODEPTR++))))));
AutoStr *path = Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(LONG(*S_PCODEPTR++))));
Uri *uri = Uri_NewWithPath3("Flats", Str_Text(path));

Material *mat = (Material *) P_ToPtr(DMU_MATERIAL, Materials_ResolveUri(uri));
Uri_Delete(uri);
Expand All @@ -1192,8 +1192,8 @@ ACS_COMMAND(ChangeFloorDirect)

ACS_COMMAND(ChangeCeiling)
{
Uri *uri = Uri_NewWithPath2("Flats:", RC_NULL);
Uri_SetPath(uri, Str_Text(Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(S_POP())))));
AutoStr *path = Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(S_POP())));
Uri *uri = Uri_NewWithPath3("Flats", Str_Text(path));

Material *mat = (Material *) P_ToPtr(DMU_MATERIAL, Materials_ResolveUri(uri));
Uri_Delete(uri);
Expand All @@ -1219,8 +1219,8 @@ ACS_COMMAND(ChangeCeilingDirect)
{
int tag = LONG(*S_PCODEPTR++);

Uri *uri = Uri_NewWithPath2("Flats:", RC_NULL);
Uri_SetPath(uri, Str_Text(Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(LONG(*S_PCODEPTR++))))));
AutoStr *path = Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(LONG(*S_PCODEPTR++))));
Uri *uri = Uri_NewWithPath3("Flats", Str_Text(path));

Material *mat = (Material *) P_ToPtr(DMU_MATERIAL, Materials_ResolveUri(uri));
Uri_Delete(uri);
Expand Down Expand Up @@ -1540,8 +1540,8 @@ ACS_COMMAND(SetLineTexture)
#define TEXTURE_MIDDLE 1
#define TEXTURE_BOTTOM 2

Uri *uri = Uri_NewWithPath2("Textures:", RC_NULL);
Uri_SetPath(uri, Str_Text(Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(S_POP())))));
AutoStr *path = Str_PercentEncode(Str_Copy(AutoStr_New(), S_INTERPRETER().string(S_POP())));
Uri *uri = Uri_NewWithPath3("Textures", Str_Text(path));

Material *mat = (Material *) P_ToPtr(DMU_MATERIAL, Materials_ResolveUri(uri));
Uri_Delete(uri);
Expand Down

0 comments on commit cefbff4

Please sign in to comment.