Skip to content

Commit

Permalink
walls: Add ┴ and ┘ shaped walls.
Browse files Browse the repository at this point in the history
You can now build walls shaped like
┌─┐ │
│ ├─┘
│ │
instead of
┼─┼ │
│ ┼─┼
│ │
like it used to be.

The blwallh_[tl].pie files will need cleaning up.
  • Loading branch information
Cyp committed Dec 1, 2011
1 parent ae2896f commit aa8b290
Show file tree
Hide file tree
Showing 10 changed files with 372 additions and 89 deletions.
2 changes: 1 addition & 1 deletion data/base/stats/structures.txt
Expand Up @@ -20,7 +20,7 @@ A0CommandCentreNP,HQ,Level One,HARD,0,2,2,Concrete,500,3,10,500,10,100,30,300,1,
A0CyborgFactory,CYBORG FACTORY,Level All,MEDIUM,1,1,2,Concrete,500,2,10,500,100,100,30,150,255,20,ZNULLECM,DefaultSensor1Mk1,1,blcfact1.pie,blbcfact.pie,1,0
A0FacMod1,FACTORY MODULE,Level All,MEDIUM,1,3,3,Concrete,250,2,10,250,100,100,25,150,255,30,ZNULLECM,DefaultSensor1Mk1,0,blfact1.pie,0,1,0
A0HardcreteMk1CWall,CORNER WALL,Level All,HARD,1,1,1,Concrete,125,2,15,250,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLWALLC1.pie,0,0,0
A0HardcreteMk1Wall,WALL,Level All,HARD,1,1,1,Concrete,125,2,15,250,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLWALLH.pie,0,1,0
A0HardcreteMk1Wall,WALL,Level All,HARD,1,1,1,Concrete,125,2,15,250,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,blwallh.pie@blwallc1.pie@blwallh_t.pie@blwallh_l.pie,0,1,0
A0LightFactory,FACTORY,Level All,MEDIUM,1,3,3,Concrete,500,3,10,500,100,100,30,150,255,20,ZNULLECM,BaBaSensor,1,blfact0.pie@factory_module1.pie@blfact1.pie@factory_module2.pie@blfact2.pie,blbfact.pie,1,0
A0PowerGenerator,POWER GENERATOR,Level All,MEDIUM,1,2,2,Concrete,500,2,20,500,30,50,30,300,255,10,ZNULLECM,DefaultSensor1Mk1,0,blpower0.pie@power_module4.pie@blpower4.pie,blbpower.pie,1,0
A0PowMod1,POWER MODULE,Level All,MEDIUM,0,2,2,Concrete,250,2,10,500,0,0,0,150,255,0,ZNULLECM,DefaultSensor1Mk1,0,blpower4.pie,0,1,0
Expand Down
128 changes: 128 additions & 0 deletions data/base/structs/blwallh_l.pie
@@ -0,0 +1,128 @@
PIE 2
TYPE 10200
TEXTURE 0 page-12-player-buildings.png 256 256
LEVELS 1
LEVEL 1
POINTS 64
10 65 0
26 -10 64
26 -10 0
10 65 64
-12 65 64
-28 -10 0
-28 -10 64
-12 65 0
-14 65 0
-14 78 66
-14 78 0
-14 65 66
12 65 66
12 78 0
12 78 66
12 65 0
16 89 0
37 -10 0
37 -10 0
16 89 0
-17 89 0
-38 -10 0
-38 -10 0
-17 89 0
16 89 60
37 -10 67
37 -10 60
16 89 67
-17 89 67
-38 -10 60
-38 -10 67
-17 89 60
-66 65 -12
0 -10 -28
-65 -10 -28
0 65 -12
0 65 10
-65 -10 26
0 -10 26
-66 65 10
-67 65 13
0 77 13
-67 77 13
0 65 13
0 65 -14
-67 77 -14
0 77 -14
-67 65 -14
-69 89 -17
-62 -10 -38
-69 -10 -38
-62 89 -17
-62 89 16
-69 -10 36
-62 -10 36
-69 89 16
0 89 -18
0 -10 -39
0 -10 -39
0 89 -18
0 89 15
0 -10 36
0 -10 36
0 89 15
POLYGONS 57
200 3 0 1 2 91 171 129 207 91 207
200 3 0 3 1 91 171 129 171 129 207
200 3 4 5 6 129 171 91 207 129 207
200 3 4 7 5 129 171 91 171 91 207
200 3 8 9 10 1 233 56 224 1 224
200 3 8 11 9 1 233 56 233 56 224
200 3 12 13 14 56 233 1 224 56 224
200 3 12 15 13 56 233 1 233 1 224
200 3 24 25 26 115 171 123 207 123 207
200 3 24 27 25 115 171 115 171 123 207
200 3 28 29 30 102 171 94 207 94 207
200 3 28 31 29 102 171 102 171 94 207
200 3 0 5 7 105 172 92 207 92 172
200 3 0 2 5 105 172 105 207 92 207
200 3 1 4 6 105 207 92 172 92 207
200 3 1 3 4 105 207 105 172 92 172
200 3 10 13 8 54 224 55 238 45 224
200 3 13 15 8 55 238 45 238 45 224
200 3 14 9 12 55 238 54 224 45 238
200 3 9 11 12 54 224 45 224 45 238
200 3 24 29 31 115 171 94 207 102 171
200 3 24 26 29 115 171 123 207 94 207
200 3 25 28 30 123 207 102 171 94 207
200 3 25 27 28 123 207 115 171 102 171
200 3 14 13 9 56 225 1 225 56 238
200 3 13 10 9 1 225 1 238 56 238
200 3 31 28 24 102 171 102 171 115 171
200 3 28 27 24 102 171 115 171 115 171
200 3 28 27 24 102 171 115 171 115 171
200 3 32 33 34 91 171 129 207 91 207
200 3 32 35 33 91 171 129 171 129 207
200 3 36 37 38 129 171 91 207 129 207
200 3 36 39 37 129 171 91 171 91 207
200 3 40 41 42 1 233 56 224 1 224
200 3 40 43 41 1 233 56 233 56 224
200 3 44 45 46 56 233 1 224 56 224
200 3 44 47 45 56 233 1 233 1 224
200 3 48 49 50 115 171 123 207 123 207
200 3 48 51 49 115 171 115 171 123 207
200 3 52 53 54 102 171 94 207 94 207
200 3 52 55 53 102 171 102 171 94 207
200 3 32 37 39 105 172 92 207 92 172
200 3 32 34 37 105 172 105 207 92 207
200 3 33 36 38 105 207 92 172 92 207
200 3 33 35 36 105 207 105 172 92 172
200 3 42 45 40 54 224 55 238 45 224
200 3 45 47 40 55 238 45 238 45 224
200 3 46 41 44 55 238 54 224 45 238
200 3 41 43 44 54 224 45 224 45 238
200 3 48 53 55 115 171 94 207 102 171
200 3 48 50 53 115 171 123 207 94 207
200 3 49 52 54 123 207 102 171 94 207
200 3 49 51 52 123 207 115 171 102 171
200 3 46 45 41 56 225 1 225 56 238
200 3 45 42 41 1 225 1 238 56 238
200 3 55 52 48 102 171 102 171 115 171
200 3 52 51 48 102 171 115 171 115 171
139 changes: 139 additions & 0 deletions data/base/structs/blwallh_t.pie
@@ -0,0 +1,139 @@
PIE 2
TYPE 10200
TEXTURE 0 page-12-player-buildings.png 256 256
LEVELS 1
LEVEL 1
POINTS 64
10 65 0
26 -10 64
26 -10 0
10 65 64
-12 65 64
-28 -10 0
-28 -10 64
-12 65 0
-14 65 0
-14 78 66
-14 78 0
-14 65 66
12 65 66
12 78 0
12 78 66
12 65 0
16 89 0
37 -10 0
37 -10 0
16 89 0
-17 89 0
-38 -10 0
-38 -10 0
-17 89 0
16 89 60
37 -10 67
37 -10 60
16 89 67
-17 89 67
-38 -10 60
-38 -10 67
-17 89 60
-66 65 -12
65 -10 -28
-65 -10 -28
64 65 -12
64 65 10
-65 -10 26
65 -10 26
-66 65 10
-67 65 13
66 77 13
-67 77 13
66 65 13
66 65 -14
-67 77 -14
66 77 -14
-67 65 -14
-69 89 -17
-62 -10 -38
-69 -10 -38
-62 89 -17
-62 89 16
-69 -10 36
-62 -10 36
-69 89 16
60 89 -18
67 -10 -39
60 -10 -39
67 89 -18
67 89 15
60 -10 36
67 -10 36
60 89 15
POLYGONS 68
200 3 0 1 2 91 171 129 207 91 207
200 3 0 3 1 91 171 129 171 129 207
200 3 4 5 6 129 171 91 207 129 207
200 3 4 7 5 129 171 91 171 91 207
200 3 8 9 10 1 233 56 224 1 224
200 3 8 11 9 1 233 56 233 56 224
200 3 12 13 14 56 233 1 224 56 224
200 3 12 15 13 56 233 1 233 1 224
200 3 24 25 26 115 171 123 207 123 207
200 3 24 27 25 115 171 115 171 123 207
200 3 28 29 30 102 171 94 207 94 207
200 3 28 31 29 102 171 102 171 94 207
200 3 0 5 7 105 172 92 207 92 172
200 3 0 2 5 105 172 105 207 92 207
200 3 1 4 6 105 207 92 172 92 207
200 3 1 3 4 105 207 105 172 92 172
200 3 10 13 8 54 224 55 238 45 224
200 3 13 15 8 55 238 45 238 45 224
200 3 14 9 12 55 238 54 224 45 238
200 3 9 11 12 54 224 45 224 45 238
200 3 24 29 31 115 171 94 207 102 171
200 3 24 26 29 115 171 123 207 94 207
200 3 25 28 30 123 207 102 171 94 207
200 3 25 27 28 123 207 115 171 102 171
200 3 14 13 9 56 225 1 225 56 238
200 3 13 10 9 1 225 1 238 56 238
200 3 31 28 24 102 171 102 171 115 171
200 3 28 27 24 102 171 115 171 115 171
200 3 28 27 24 102 171 115 171 115 171
200 3 32 33 34 91 171 129 207 91 207
200 3 32 35 33 91 171 129 171 129 207
200 3 36 37 38 129 171 91 207 129 207
200 3 36 39 37 129 171 91 171 91 207
200 3 40 41 42 1 233 56 224 1 224
200 3 40 43 41 1 233 56 233 56 224
200 3 44 45 46 56 233 1 224 56 224
200 3 44 47 45 56 233 1 233 1 224
200 3 48 49 50 115 171 123 207 123 207
200 3 48 51 49 115 171 115 171 123 207
200 3 52 53 54 102 171 94 207 94 207
200 3 52 55 53 102 171 102 171 94 207
200 3 56 57 58 115 171 123 207 123 207
200 3 56 59 57 115 171 115 171 123 207
200 3 60 61 62 102 171 94 207 94 207
200 3 60 63 61 102 171 102 171 94 207
200 3 32 37 39 105 172 92 207 92 172
200 3 32 34 37 105 172 105 207 92 207
200 3 33 36 38 105 207 92 172 92 207
200 3 33 35 36 105 207 105 172 92 172
200 3 42 45 40 54 224 55 238 45 224
200 3 45 47 40 55 238 45 238 45 224
200 3 46 41 44 55 238 54 224 45 238
200 3 41 43 44 54 224 45 224 45 238
200 3 48 53 55 115 171 94 207 102 171
200 3 48 50 53 115 171 123 207 94 207
200 3 49 52 54 123 207 102 171 94 207
200 3 49 51 52 123 207 115 171 102 171
200 3 56 61 63 115 171 94 207 102 171
200 3 56 58 61 115 171 123 207 94 207
200 3 57 60 62 123 207 102 171 94 207
200 3 57 59 60 123 207 115 171 102 171
200 3 46 45 41 56 225 1 225 56 238
200 3 45 42 41 1 225 1 238 56 238
200 3 55 52 48 102 171 102 171 115 171
200 3 52 51 48 102 171 115 171 115 171
200 3 63 60 56 102 171 102 171 115 171
200 3 60 59 56 102 171 115 171 115 171
200 3 60 59 56 102 171 115 171 115 171
4 changes: 3 additions & 1 deletion data/base/wrf/piestats.wrf
Expand Up @@ -16,6 +16,9 @@ file IMD "blfact2.pie"
file IMD "factory_module1.pie"
file IMD "factory_module2.pie"
file IMD "blwallh.pie"
file IMD "blwallc1.pie"
file IMD "blwallh_t.pie"
file IMD "blwallh_l.pie"
file IMD "blwallc2.pie"
file IMD "blwall2.pie"
file IMD "blwallc3.pie"
Expand All @@ -35,7 +38,6 @@ file IMD "blbgen.pie"
file IMD "blbhq.pie"
file IMD "blbrbbnk.pie"
file IMD "blbrtowr.pie"
file IMD "blwallc1.pie"
file IMD "blbrlook.pie"
file IMD "icdozer.pie"
file IMD "blrpair3.pie"
Expand Down
2 changes: 1 addition & 1 deletion data/mp/stats/structures.txt
Expand Up @@ -21,7 +21,7 @@ A0CyborgFactory,CYBORG FACTORY,Level All,MEDIUM,1,1,2,Concrete,500,2,10,1000,100
A0FacMod1,FACTORY MODULE,Level All,MEDIUM,1,3,3,Concrete,250,2,10,500,100,100,25,150,255,30,ZNULLECM,DefaultSensor1Mk1,0,blfact1.pie,0,1,0
A0HardcreteMk1CWall,CORNER WALL,Level All,HARD,1,1,1,Concrete,125,2,15,700,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLWALLC1.pie,0,0,0
A0HardcreteMk1Gate,GATE,Level All,HARD,1,1,1,Concrete,250,2,15,700,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLGATEH.pie,0,0,0
A0HardcreteMk1Wall,WALL,Level All,HARD,1,1,1,Concrete,125,2,15,700,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLWALLH.pie,0,1,0
A0HardcreteMk1Wall,WALL,Level All,HARD,1,1,1,Concrete,125,2,15,700,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,blwallh.pie@blwallc1.pie@blwallh_t.pie@blwallh_l.pie,0,1,0
A0LasSatCommand,DOOR,Level All,MEDIUM,1,2,2,Concrete,2500,2,16,1000,10,1000,1,0,255,0,ZNULLECM,0,1,milasbas.pie,0,0,1
A0LightFactory,FACTORY,Level All,MEDIUM,1,3,3,Concrete,500,3,10,1000,100,100,30,150,255,20,ZNULLECM,BaBaSensor,1,blfact0.pie@factory_module1.pie@blfact1.pie@factory_module2.pie@blfact2.pie,blbfact.pie,1,0
A0PowerGenerator,POWER GENERATOR,Level All,MEDIUM,1,2,2,Concrete,500,2,20,1000,30,50,30,300,255,10,ZNULLECM,DefaultSensor1Mk1,0,blpower0.pie@power_module4.pie@blpower4.pie,blbpower.pie,1,0
Expand Down
4 changes: 3 additions & 1 deletion data/mp/wrf/piestats.wrf
Expand Up @@ -16,6 +16,9 @@ file IMD "blfact2.pie"
file IMD "factory_module1.pie"
file IMD "factory_module2.pie"
file IMD "blwallh.pie"
file IMD "blwallc1.pie"
file IMD "blwallh_t.pie"
file IMD "blwallh_l.pie"
file IMD "blgateh.pie"
file IMD "blwallc2.pie"
file IMD "blwall2.pie"
Expand All @@ -36,7 +39,6 @@ file IMD "blbgen.pie"
file IMD "blbhq.pie"
file IMD "blbrbbnk.pie"
file IMD "blbrtowr.pie"
file IMD "blwallc1.pie"
file IMD "blbrlook.pie"
file IMD "icdozer.pie"
file IMD "blrpair3.pie"
Expand Down
18 changes: 0 additions & 18 deletions src/display3d.cpp
Expand Up @@ -1654,24 +1654,6 @@ void displayBlueprints(void)
// Actually render everything.
for (std::vector<Blueprint>::iterator blueprint = blueprints.begin(); blueprint != blueprints.end(); ++blueprint)
{
// Rotate wall if needed.
if (blueprint->stats->type == REF_WALL || blueprint->stats->type == REF_GATE)
{
WallOrientation orientation = structChooseWallTypeBlueprint(map_coord(blueprint->pos.x), map_coord(blueprint->pos.y));
switch (orientation)
{
case WALL_HORIZ: blueprint->dir = DEG(0); break;
case WALL_VERT: blueprint->dir = DEG(90); break;
case WALL_CORNER:
if (blueprint->stats->type != REF_GATE)
{
blueprint->stats = ((WALL_FUNCTION *)blueprint->stats->asFuncList[0])->pCornerStat;
}
break;
case WALL_NEUTRAL: break;
}
}

blueprint->renderBlueprint();
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/game.cpp
Expand Up @@ -4778,6 +4778,11 @@ static bool loadSaveStructure2(const char *pFileName, STRUCTURE **ppList)
psReArmPad->timeStarted = ini.value("Rearm/timeStarted").toInt();
psReArmPad->timeLastUpdated = ini.value("Rearm/timeLastUpdated").toInt();
break;
case REF_WALL:
case REF_GATE:
psStructure->pFunctionality->wall.type = ini.value("Wall/type").toInt();
psStructure->sDisplay.imd = psStructure->pStructureType->pIMD[std::min<unsigned>(psStructure->pFunctionality->wall.type, psStructure->pStructureType->pIMD.size() - 1)];
break;
default:
break;
}
Expand Down Expand Up @@ -4974,6 +4979,10 @@ bool writeStructFile(const char *pFileName)
ini.setValue("Rearm/target/type", psReArmPad->psObj->type);
}
}
else if (psCurr->pStructureType->type == REF_WALL || psCurr->pStructureType->type == REF_GATE)
{
ini.setValue("Wall/type", psCurr->pFunctionality->wall.type);
}
}
ini.endGroup();
}
Expand Down

0 comments on commit aa8b290

Please sign in to comment.