Skip to content
This repository
Browse code

fixed bug with highscore stripe

gitignore updated
  • Loading branch information...
commit 4ef39d4f8124bc482d972da071d32185e8c67314 1 parent 2ae23cb
Sergey Tikhonov authored
23 .gitignore
... ... @@ -1,6 +1,23 @@
  1 +# Mac OS X
1 2 .DS_Store
2   -build
3   -*.pbxuser
  3 +
  4 +# XCode (and ancestors) per-user config (very noisy, and not relevant)
  5 +*.mode1
4 6 *.mode1v3
5 7 *.mode2v3
6   -*.xcuserstate
  8 +*.perspective
  9 +*.perspectivev3
  10 +*.pbxuser
  11 +
  12 +# Xcode 4
  13 +xcuserdata/
  14 +project.xcworkspace/
  15 +
  16 +# automatic backup files
  17 +*~.nib
  18 +*.swp
  19 +*~
  20 +
  21 +# cocos2d
  22 +PLBlocks.framework/*
  23 +*.pyc
85 tweejump.xcodeproj/xcuserdata/haqu.xcuserdatad/xcschemes/tweejump.xcscheme
... ... @@ -0,0 +1,85 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + version = "1.3">
  4 + <BuildAction
  5 + parallelizeBuildables = "YES"
  6 + buildImplicitDependencies = "YES">
  7 + <BuildActionEntries>
  8 + <BuildActionEntry
  9 + buildForTesting = "YES"
  10 + buildForRunning = "YES"
  11 + buildForProfiling = "YES"
  12 + buildForArchiving = "YES"
  13 + buildForAnalyzing = "YES">
  14 + <BuildableReference
  15 + BuildableIdentifier = "primary"
  16 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  17 + BuildableName = "tweejump.app"
  18 + BlueprintName = "tweejump"
  19 + ReferencedContainer = "container:tweejump.xcodeproj">
  20 + </BuildableReference>
  21 + </BuildActionEntry>
  22 + </BuildActionEntries>
  23 + </BuildAction>
  24 + <TestAction
  25 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  26 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  27 + shouldUseLaunchSchemeArgsEnv = "YES"
  28 + buildConfiguration = "Debug">
  29 + <Testables>
  30 + </Testables>
  31 + <MacroExpansion>
  32 + <BuildableReference
  33 + BuildableIdentifier = "primary"
  34 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  35 + BuildableName = "tweejump.app"
  36 + BlueprintName = "tweejump"
  37 + ReferencedContainer = "container:tweejump.xcodeproj">
  38 + </BuildableReference>
  39 + </MacroExpansion>
  40 + </TestAction>
  41 + <LaunchAction
  42 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  43 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  44 + launchStyle = "0"
  45 + useCustomWorkingDirectory = "NO"
  46 + buildConfiguration = "Debug"
  47 + ignoresPersistentStateOnLaunch = "NO"
  48 + debugDocumentVersioning = "YES"
  49 + allowLocationSimulation = "YES">
  50 + <BuildableProductRunnable>
  51 + <BuildableReference
  52 + BuildableIdentifier = "primary"
  53 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  54 + BuildableName = "tweejump.app"
  55 + BlueprintName = "tweejump"
  56 + ReferencedContainer = "container:tweejump.xcodeproj">
  57 + </BuildableReference>
  58 + </BuildableProductRunnable>
  59 + <AdditionalOptions>
  60 + </AdditionalOptions>
  61 + </LaunchAction>
  62 + <ProfileAction
  63 + shouldUseLaunchSchemeArgsEnv = "YES"
  64 + savedToolIdentifier = ""
  65 + useCustomWorkingDirectory = "NO"
  66 + buildConfiguration = "Release"
  67 + debugDocumentVersioning = "YES">
  68 + <BuildableProductRunnable>
  69 + <BuildableReference
  70 + BuildableIdentifier = "primary"
  71 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  72 + BuildableName = "tweejump.app"
  73 + BlueprintName = "tweejump"
  74 + ReferencedContainer = "container:tweejump.xcodeproj">
  75 + </BuildableReference>
  76 + </BuildableProductRunnable>
  77 + </ProfileAction>
  78 + <AnalyzeAction
  79 + buildConfiguration = "Debug">
  80 + </AnalyzeAction>
  81 + <ArchiveAction
  82 + buildConfiguration = "Release"
  83 + revealArchiveInOrganizer = "YES">
  84 + </ArchiveAction>
  85 +</Scheme>
27 tweejump.xcodeproj/xcuserdata/haqu.xcuserdatad/xcschemes/xcschememanagement.plist
... ... @@ -0,0 +1,27 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>SchemeUserState</key>
  6 + <dict>
  7 + <key>tweejump.xcscheme</key>
  8 + <dict>
  9 + <key>orderHint</key>
  10 + <integer>0</integer>
  11 + </dict>
  12 + </dict>
  13 + <key>SuppressBuildableAutocreation</key>
  14 + <dict>
  15 + <key>1D6058900D05DD3D006BFB54</key>
  16 + <dict>
  17 + <key>primary</key>
  18 + <true/>
  19 + </dict>
  20 + <key>F49E735615ACCF46009C8E84</key>
  21 + <dict>
  22 + <key>primary</key>
  23 + <true/>
  24 + </dict>
  25 + </dict>
  26 +</dict>
  27 +</plist>
56 tweejump/Classes/Highscores.m
@@ -208,31 +208,37 @@ - (void)button2Callback:(id)sender {
208 208 }
209 209
210 210 - (void)draw {
211   -// NSLog(@"draw");
212   -
213   -// if(currentScorePosition < 0) return;
214   -//
215   -// glColor4ub(0,0,0,50);
216   -//
217   -// float w = 320.0f;
218   -// float h = 27.0f;
219   -// float x = (320.0f - w)/2;
220   -// float y = 359.0f - currentScorePosition * h;
221   -//
222   -// GLfloat vertices[4][2];
223   -// GLubyte indices[4] = { 0, 1, 3, 2 };
224   -//
225   -// glVertexPointer(2, GL_FLOAT, 0, vertices);
226   -// glEnableClientState(GL_VERTEX_ARRAY);
227   -//
228   -// vertices[0][0] = x; vertices[0][1] = y;
229   -// vertices[1][0] = x+w; vertices[1][1] = y;
230   -// vertices[2][0] = x+w; vertices[2][1] = y+h;
231   -// vertices[3][0] = x; vertices[3][1] = y+h;
232   -//
233   -// glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, indices);
234   -//
235   -// glDisableClientState(GL_VERTEX_ARRAY);
  211 + [super draw];
  212 +
  213 + if(currentScorePosition < 0) return;
  214 +
  215 + glColor4f(0.0f, 0.0f, 0.0f, 0.2f);
  216 +
  217 + float w = 320.0f;
  218 + float h = 27.0f;
  219 + float x = (320.0f - w) / 2.0f;
  220 + float y = 359.0f - currentScorePosition * h;
  221 +
  222 + GLfloat vertices[4][2];
  223 + GLubyte indices[4] = { 0, 1, 3, 2 };
  224 +
  225 + vertices[0][0] = x; vertices[0][1] = y;
  226 + vertices[1][0] = x+w; vertices[1][1] = y;
  227 + vertices[2][0] = x+w; vertices[2][1] = y+h;
  228 + vertices[3][0] = x; vertices[3][1] = y+h;
  229 +
  230 + glDisable(GL_TEXTURE_2D);
  231 + glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  232 + glDisableClientState(GL_COLOR_ARRAY);
  233 +
  234 + glVertexPointer(2, GL_FLOAT, 0, vertices);
  235 + glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, indices);
  236 +
  237 + glEnableClientState(GL_COLOR_ARRAY);
  238 + glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  239 + glEnable(GL_TEXTURE_2D);
  240 +
  241 + glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
236 242 }
237 243
238 244 - (void)changePlayerDone {

0 comments on commit 4ef39d4

Please sign in to comment.
Something went wrong with that request. Please try again.