[TPTnet] Diff

  • TPTCreator
    10th Jul 2015 Member 0 Permalink

    Uh... your "Diff" option is broken... It redirects you to a page with this:

    diff --git a/data/IntroText.h b/data/IntroText.h
    index f353c75..d16a94f 100644
    --- a/data/IntroText.h
    +++ b/data/IntroText.h
    @@ -2,6 +2,7 @@ static const char *introTextData =
     	"\blThe Powder Toy - Version " MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) " - http://powdertoy.co.uk, irc.freenode.net #powder\n"
     	"\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\n"
     	"\n"
    +	"\btTPTNet Community server BETA\n\n"
     	"\bgControl+C/V/X are Copy, Paste and cut respectively.\n"
     	"\bgTo choose a material, hover over one of the icons on the right, it will show a selection of elements in that group.\n"
     	"\bgPick your material from the menu using mouse left/right buttons.\n"
    @@ -23,7 +24,7 @@ static const char *introTextData =
     	"\bgFelix Wallin, Lieuwe Mosch, Anthony Boot, Matthew \"me4502\", MaksProg, jacob1, mniip\n"
     	"\n"
     #ifndef BETA
    -	"\bgTo use online features such as saving, you need to register at: \brhttps://powdertoy.co.uk/Register.html\n"
    +	"\bgTo use online features such as saving, you need to register at: \brhttp://thepowdertoy.net/Register.php\n"
     #else
     	"\brThis is a BETA, you cannot save things publicly. If you are planning on publishing any saves, use the release version\n"
     #endif
    diff --git a/src/Config.h b/src/Config.h
    index 239d1be..6c2b8c5 100644
    --- a/src/Config.h
    +++ b/src/Config.h
    @@ -71,9 +71,9 @@
     #define MTOS_EXPAND(str) #str
     #define MTOS(str) MTOS_EXPAND(str)
     
    -#define SERVER "powdertoy.co.uk"
    +#define SERVER "thepowdertoy.net"
     #define SCRIPTSERVER "powdertoy.co.uk"
    -#define STATICSERVER "static.powdertoy.co.uk"
    +#define STATICSERVER "static.thepowdertoy.net"
     
     #define LOCAL_SAVE_DIR "Saves"
     
    diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp
    index 0e372bc..f3173f5 100644
    --- a/src/gui/game/GameView.cpp
    +++ b/src/gui/game/GameView.cpp
    @@ -288,7 +288,7 @@ GameView::GameView():
     	upVoteButton->SetIcon(IconVoteUp);
     	upVoteButton->Appearance.Margin.Top+=2;
     	upVoteButton->Appearance.Margin.Left+=2;
    -	currentX+=38;
    +	currentX+=40;
     	upVoteButton->SetActionCallback(new UpVoteAction(this));
     	AddComponent(upVoteButton);
     
    @@ -306,9 +306,9 @@ GameView::GameView():
     	downVoteButton->SetIcon(IconVoteDown);
     	downVoteButton->Appearance.Margin.Bottom+=2;
     	downVoteButton->Appearance.Margin.Left+=2;
    -	currentX+=16;
    +	//currentX+=16;
     	downVoteButton->SetActionCallback(new DownVoteAction(this));
    -	AddComponent(downVoteButton);
    +	//AddComponent(downVoteButton);
     
     	class TagSimulationAction : public ui::ButtonAction
     	{
    @@ -320,7 +320,7 @@ GameView::GameView():
     			v->c->OpenTags();
     		}
     	};
    -	tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(227, 15), "[no tags set]", "Add simulation tags");
    +	tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(241, 15), "[no tags set]", "Add simulation tags");
     	tagSimulationButton->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
     	tagSimulationButton->SetIcon(IconTag);
     	currentX+=252;
    diff --git a/src/gui/save/ServerSaveActivity.cpp b/src/gui/save/ServerSaveActivity.cpp
    index 49adce7..cd9f739 100644
    --- a/src/gui/save/ServerSaveActivity.cpp
    +++ b/src/gui/save/ServerSaveActivity.cpp
    @@ -161,14 +161,14 @@ ServerSaveActivity::ServerSaveActivity(SaveInfo save, ServerSaveActivity::SaveUp
     	PublishingInfoButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
     	PublishingInfoButton->Appearance.TextInactive = style::Colour::InformationTitle;
     	PublishingInfoButton->SetActionCallback(new PublishingAction(this));
    -	AddComponent(PublishingInfoButton);
    +	//AddComponent(PublishingInfoButton);
     
     	ui::Button * RulesButton = new ui::Button(ui::Point((Size.X*3/4)-75, Size.Y-22), ui::Point(150, 16), "Save Uploading Rules");
     	RulesButton->Appearance.HorizontalAlign = ui::Appearance::AlignCentre;
     	RulesButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
     	RulesButton->Appearance.TextInactive = style::Colour::InformationTitle;
     	RulesButton->SetActionCallback(new RulesAction(this));
    -	AddComponent(RulesButton);
    +	//AddComponent(RulesButton);
     
     	if(save.GetGameSave())
     		RequestBroker::Ref().RenderThumbnail(save.GetGameSave(), false, true, (Size.X/2)-16, -1, this);
    @@ -331,8 +331,8 @@ void ServerSaveActivity::OnDraw()
     
     	if(thumbnail)
     	{
    -		g->draw_image(thumbnail, Position.X+(Size.X/2)+((Size.X/2)-thumbnail->Width)/2, Position.Y+25, 255);
    -		g->drawrect(Position.X+(Size.X/2)+((Size.X/2)-thumbnail->Width)/2, Position.Y+25, thumbnail->Width, thumbnail->Height, 180, 180, 180, 255);
    +		g->draw_image(thumbnail, Position.X+(Size.X/2)+((Size.X/2)-thumbnail->Width)/2, Position.Y+(Size.Y-thumbnail->Height)/2, 255);
    +		g->drawrect(Position.X+(Size.X/2)+((Size.X/2)-thumbnail->Width)/2, Position.Y+(Size.Y-thumbnail->Height)/2, thumbnail->Width, thumbnail->Height, 180, 180, 180, 255);
     	}
     }
     
    
    So... Yeah :P
  • jacksonmj
    10th Jul 2015 Developer 0 Permalink

    That is what a diff is supposed to look like.

     

    A diff is a summary of what changes have been made. In this case, what changes have been made to the source code of TPT to make it work with TPTNET.

     

    Lines starting with - were in the original version, and have been removed in the TPTNET version.

    Lines starting with + were not in the original version, but have been added in the TPTNET version.

    Lines not starting with + or - are context, present in both the original and TPTNET versions.

     

    Changed lines are represented by the original version of the line being removed (-) followed by the new version being added (+).

     

    These bits indicate which file that part of the diff relates to:

    diff --git a/data/IntroText.h b/data/IntroText.h
    index f353c75..d16a94f 100644
    --- a/data/IntroText.h
    +++ b/data/IntroText.h

    These bits give line numbers in the original (-) and new (+) versions, and the function name:

    @@ -161,14 +161,14 @@ ServerSaveActivity::ServerSaveActivity(SaveInfo save, ServerSaveActivity::SaveUp
    Edited 5 times by jacksonmj. Last: 10th Jul 2015
  • Lockheedmartin
    10th Jul 2015 Moderator 0 Permalink

    As jacksonmj has said. Also please use the official thread for support questions regarding TPTNet:

    https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=19479

Locked by Lockheedmartin: TPTNet Support