Compare commits
7 Commits
playtest-2
...
playtest-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a3868abd0 | ||
|
|
112047d2b3 | ||
|
|
cd9f584729 | ||
|
|
31741a1ab3 | ||
|
|
eb6440694a | ||
|
|
2c388308c7 | ||
|
|
1c8f744719 |
4
Makefile
4
Makefile
@@ -123,8 +123,8 @@ install: all
|
||||
@$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR)
|
||||
|
||||
@echo "OpenRA is now installed. You will now want to download"
|
||||
@echo "http://open-ra.org/packages/ra-packages.zip and"
|
||||
@echo "http://open-ra.org/packages/cnc-packages.zip"
|
||||
@echo "http://open-ra.org/packages/ra-packages.php and"
|
||||
@echo "http://open-ra.org/packages/cnc-packages.php"
|
||||
@echo "and extract their contents to"
|
||||
@echo "$(INSTALL_DIR)/mods/ra/packages and "
|
||||
@echo "$(INSTALL_DIR)/mods/cnc/packages respectively."
|
||||
|
||||
@@ -35,31 +35,34 @@ namespace OpenRA.Graphics
|
||||
public static int TicksSinceLastMove = 0;
|
||||
public static int2 LastMousePos;
|
||||
|
||||
public void Scroll(float2 delta)
|
||||
public void Scroll(float2 delta){
|
||||
this.Scroll(delta, false);
|
||||
}
|
||||
|
||||
public void Scroll(float2 delta, bool ignoreBorders)
|
||||
{
|
||||
float2 topLeftBorder = (Game.CellSize* mapStart).ToFloat2();
|
||||
float2 bottomRightBorder = (Game.CellSize* mapEnd).ToFloat2();
|
||||
float2 newScrollPosition = scrollPosition + delta;
|
||||
|
||||
if(newScrollPosition.Y < topLeftBorder.Y)
|
||||
newScrollPosition.Y = topLeftBorder.Y;
|
||||
|
||||
if(newScrollPosition.X < topLeftBorder.X)
|
||||
newScrollPosition.X = topLeftBorder.X;
|
||||
float2 newScrollPosition = scrollPosition + delta;
|
||||
|
||||
if(newScrollPosition.Y > bottomRightBorder.Y-screenSize.Y)
|
||||
newScrollPosition.Y = bottomRightBorder.Y-screenSize.Y;
|
||||
|
||||
if(newScrollPosition.X > bottomRightBorder.X-screenSize.X)
|
||||
newScrollPosition.X = bottomRightBorder.X-screenSize.X;
|
||||
|
||||
scrollPosition = newScrollPosition;
|
||||
if(!ignoreBorders){
|
||||
float2 topLeftBorder = (Game.CellSize* mapStart).ToFloat2();
|
||||
float2 bottomRightBorder = (Game.CellSize* mapEnd).ToFloat2();
|
||||
|
||||
if(newScrollPosition.Y < topLeftBorder.Y)
|
||||
newScrollPosition.Y = topLeftBorder.Y;
|
||||
if(newScrollPosition.X < topLeftBorder.X)
|
||||
newScrollPosition.X = topLeftBorder.X;
|
||||
if(newScrollPosition.Y > bottomRightBorder.Y-screenSize.Y)
|
||||
newScrollPosition.Y = bottomRightBorder.Y-screenSize.Y;
|
||||
if(newScrollPosition.X > bottomRightBorder.X-screenSize.X)
|
||||
newScrollPosition.X = bottomRightBorder.X-screenSize.X;
|
||||
}
|
||||
scrollPosition = newScrollPosition;
|
||||
}
|
||||
|
||||
public ScrollDirection GetBlockedDirections()
|
||||
{
|
||||
int2 topLeftBorder = (Game.CellSize* mapStart);
|
||||
int2 bottomRightBorder = (Game.CellSize* mapEnd);
|
||||
int2 bottomRightBorder = (Game.CellSize* mapEnd);
|
||||
|
||||
ScrollDirection blockedDirections = ScrollDirection.None;
|
||||
|
||||
@@ -154,4 +157,4 @@ namespace OpenRA.Graphics
|
||||
return localPlayer.Shroud.Bounds;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,9 +22,11 @@ namespace OpenRA.Traits
|
||||
List<ShakeEffect> shakeEffects = new List<ShakeEffect>();
|
||||
|
||||
public void Tick (Actor self)
|
||||
{
|
||||
Game.viewport.Scroll(GetScrollOffset());
|
||||
shakeEffects.RemoveAll(t => t.ExpiryTime == ticks);
|
||||
{
|
||||
if(shakeEffects.Any()){
|
||||
Game.viewport.Scroll(GetScrollOffset(), true);
|
||||
shakeEffects.RemoveAll(t => t.ExpiryTime == ticks);
|
||||
}
|
||||
ticks++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
install_ra_packages() {
|
||||
wget http://open-ra.org/packages/ra-packages.zip
|
||||
wget http://open-ra.org/packages/ra-packages.php
|
||||
mkdir -p $pkgdir/usr/share/openra/mods/ra/packages
|
||||
unzip ra-packages.zip -d $pkgdir/usr/share/openra/mods/ra/packages
|
||||
rm ra-packages.zip
|
||||
}
|
||||
|
||||
install_cnc_packages() {
|
||||
wget http://open-ra.org/packages/cnc-packages.zip
|
||||
wget http://open-ra.org/packages/cnc-packages.php
|
||||
mkdir -p $pkgdir/usr/share/openra/mods/cnc/packages
|
||||
unzip cnc-packages.zip -d $pkgdir/usr/share/openra/mods/cnc/packages
|
||||
rm cnc-packages.zip
|
||||
|
||||
@@ -35,7 +35,7 @@ do
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
pushd /tmp/
|
||||
wget http://open-ra.org/packages/ra-packages.zip
|
||||
wget http://open-ra.org/packages/ra-packages.php
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/openra/mods/ra/packages
|
||||
unzip ra-packages.zip -d $RPM_BUILD_ROOT/usr/share/openra/mods/ra/packages
|
||||
rm ra-packages.zip
|
||||
@@ -52,7 +52,7 @@ do
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
pushd /tmp/
|
||||
wget http://open-ra.org/packages/cnc-packages.zip
|
||||
wget http://open-ra.org/packages/cnc-packages.php
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/openra/mods/cnc/packages
|
||||
unzip ra-packages.zip -d $RPM_BUILD_ROOT/usr/share/openra/mods/cnc/packages
|
||||
rm ra-packages.zip
|
||||
|
||||
@@ -21,9 +21,9 @@ SUPPORT_PATH=~/Library/"Application Support"/OpenRA
|
||||
DEPS_PACKAGE="osx-deps-v2.zip"
|
||||
DEPS_URL="http://open-ra.org/releases/mac/osx-deps-v2.zip"
|
||||
RA_PACKAGE="ra-packages.zip"
|
||||
RA_URL="http://open-ra.org/packages/ra-packages.zip"
|
||||
RA_URL="http://open-ra.org/packages/ra-packages.php"
|
||||
CNC_PACKAGE="cnc-packages.zip"
|
||||
CNC_URL="http://open-ra.org/packages/cnc-packages.zip"
|
||||
CNC_URL="http://open-ra.org/packages/cnc-packages.php"
|
||||
|
||||
cd "$EXE_PATH"
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ EOT`
|
||||
/usr/bin/osascript << EOT
|
||||
tell application "Terminal"
|
||||
activate
|
||||
do script "cd \"${SUPPORT_PATH}\"; curl --create-dirs -o \"./Downloads/${1}\" \"${5}\"; unzip -o \"Downloads/${1}\" -d \"${2}\"; touch done; exit;"
|
||||
do script "cd \"${SUPPORT_PATH}\"; curl -L --create-dirs -o \"./Downloads/${1}\" \"${5}\"; unzip -o \"Downloads/${1}\" -d \"${2}\"; touch done; exit;"
|
||||
end tell
|
||||
EOT
|
||||
# Hack around osascript returning before the download finishes
|
||||
|
||||
@@ -28,7 +28,7 @@ msg "\E[32m" "Connecting to GIT server...."
|
||||
if [ -d $_gitname ] ; then
|
||||
pushd $_gitname &> /dev/null && git pull origin
|
||||
msg "\E[32m" "The local files are updated."
|
||||
popd &> /dev/null
|
||||
popd &> /dev/null # $_gitname
|
||||
else
|
||||
git clone $_gitroot $_gitname
|
||||
fi
|
||||
@@ -47,15 +47,13 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
msg "\E[32m" "Starting make..."
|
||||
make prefix=/usr all
|
||||
make prefix=/usr DESTDIR=../built install
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "Build failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make prefix=/usr DESTDIR=../built install
|
||||
popd &> /dev/null
|
||||
popd &> /dev/null
|
||||
pushd packaging &> /dev/null
|
||||
|
||||
#Arch-Linux
|
||||
msg "\E[34m" "Building Arch-Linux package."
|
||||
@@ -98,3 +96,6 @@ else
|
||||
fi
|
||||
popd &> /dev/null
|
||||
|
||||
popd &> /dev/null # packaging
|
||||
popd &> /dev/null # $_gitname-build
|
||||
popd &> /dev/null # ~/openra-package/
|
||||
|
||||
@@ -105,7 +105,7 @@ SectionGroup /e "Mods"
|
||||
IfFileExists "$INSTDIR\mods\ra\packages\redalert.mix" done dlcontent
|
||||
dlcontent:
|
||||
SetOutPath "$OUTDIR\packages"
|
||||
NSISdl::download http://open-ra.org/packages/ra-packages.zip ra-packages.zip
|
||||
NSISdl::download http://open-ra.org/packages/ra-packages.php ra-packages.zip
|
||||
Pop $R0
|
||||
StrCmp $R0 "success" +2
|
||||
Abort
|
||||
@@ -126,7 +126,7 @@ SectionGroup /e "Mods"
|
||||
IfFileExists "$INSTDIR\mods\cnc\packages\conquer.mix" done dlcontent
|
||||
dlcontent:
|
||||
SetOutPath "$OUTDIR\packages"
|
||||
NSISdl::download http://open-ra.org/packages/cnc-packages.zip cnc-packages.zip
|
||||
NSISdl::download http://open-ra.org/packages/cnc-packages.php cnc-packages.zip
|
||||
Pop $R0
|
||||
StrCmp $R0 "success" +2
|
||||
Abort
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<h3>Bug Tracker</h3>
|
||||
<p>
|
||||
If you wish to report a bug, our bug tracker can be found here: <br />
|
||||
<a href="http://openra.res0l.net/projects/show/openra">http://openra.res0l.net/projects/show/openra</a>
|
||||
<a href="http://red-bull.ijw.co.nz:3690/OpenRA">http://red-bull.ijw.co.nz:3690/OpenRA</a>
|
||||
</p>
|
||||
<h3>Obtaining the Source Code</h3>
|
||||
<p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
3
web/packages/cnc-mirrors.txt
Normal file
3
web/packages/cnc-mirrors.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
http://metahash.com/packages/cnc-packages.zip
|
||||
http://openra.res0l.net/packages/cnc-packages.zip
|
||||
http://open-ra.org/packages/cnc-packages.zip
|
||||
8
web/packages/cnc-packages.php
Normal file
8
web/packages/cnc-packages.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$mirrors = file_get_contents("cnc-mirrors.txt");
|
||||
$mirrors_array = explode("\n", $mirrors);
|
||||
|
||||
$mirror = $mirrors_array[array_rand($mirrors_array, 1)];
|
||||
|
||||
header('Location: '. $mirror);
|
||||
?>
|
||||
3
web/packages/ra-mirrors.txt
Normal file
3
web/packages/ra-mirrors.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
http://metahash.com/packages/ra-packages.zip
|
||||
http://openra.res0l.net/packages/ra-packages.zip
|
||||
http://open-ra.org/packages/ra-packages.zip
|
||||
8
web/packages/ra-packages.php
Normal file
8
web/packages/ra-packages.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$mirrors = file_get_contents("ra-mirrors.txt");
|
||||
$mirrors_array = explode("\n", $mirrors);
|
||||
|
||||
$mirror = $mirrors_array[array_rand($mirrors_array, 1)];
|
||||
|
||||
header('Location: '. $mirror);
|
||||
?>
|
||||
Reference in New Issue
Block a user